MCPcopy Create free account

hub / github.com/austin-starks/Deep-RL-Stocks / functions

Functions92 in github.com/austin-starks/Deep-RL-Stocks

↓ 6 callersMethodget_date_and_time
Gets current date and time
models/environment.py:142
↓ 5 callersMethodget_stock_prices
Gets the current stock price at this epoch
models/state.py:111
↓ 5 callersMethodto_numpy
Returns the numpy array representing the state object Alias for self.get_state()
models/state.py:284
↓ 4 callersMethod__init__
( self, inchannel, outchannel, activation=nn.PReLU, )
models/model.py:63
↓ 4 callersMethodget_stock_prices
Gets the current stock price at this epoch
old_results/original/train.py:178
↓ 4 callersMethodreset
Resets the environment to a random date in the first 33% of the range with a random amount of positions and random amount of buying p
models/environment.py:114
↓ 4 callersMethodreset
Resets the environment to a random date in the first 33% of the range with a random amount of positions and random amount of buying
old_results/original/train.py:152
↓ 4 callersMethodstep
Takes action in the current state to get to the next state Returns an array [new_state, reward, done] where: - new_state
models/environment.py:69
↓ 4 callersMethodstep
Takes action in the current state to get to the next state Returns an array [new_state, reward, done] where: - new_state
old_results/original/train.py:81
↓ 3 callersMethodcalculate_portfolio_value
Returns: the current portfolio value
models/state.py:156
↓ 3 callersFunctionget_data
(filename)
utility/graph.py:21
↓ 2 callersMethod__init__
( self, state_dim, action_dim, max_action, discount=0.99, tau=
old_results/original/model.py:68
↓ 2 callersFunctionappend_portfolio_value
(df, env)
main.py:137
↓ 2 callersFunctionappend_portfolio_value
(df, env)
old_results/original/train.py:319
↓ 2 callersMethodcalculate_portfolio_value
Calculates the current portfolio value
old_results/original/train.py:200
↓ 2 callersMethodget_date_and_time
Gets current date and time
old_results/original/train.py:189
↓ 2 callersMethodget_graph_state
(self, current_date, current_time)
models/state.py:66
↓ 2 callersMethodget_holdings
Returns: the current holdings
models/environment.py:159
↓ 2 callersMethodget_state
Returns: the internal array representing the state
models/state.py:292
↓ 2 callersMethodget_stock_df
(self, stock_name)
models/state.py:80
↓ 2 callersMethodincrement_date
Increments the date by one epoch
models/environment.py:89
↓ 2 callersMethodincrement_date
Increments the date by one epoch
old_results/original/train.py:127
↓ 2 callersMethodsample
(self, batch_size)
models/model.py:319
↓ 2 callersMethodsample
(self, batch_size)
old_results/original/model.py:206
↓ 2 callersMethodselect_action
(self, state_tup)
models/model.py:202
↓ 2 callersMethodselect_action
(self, state)
old_results/original/model.py:97
↓ 2 callersMethodtrain
(self, replay_buffer, batch_size=100)
old_results/original/model.py:101
↓ 1 callersMethodQ1
(self, state, action)
models/model.py:163
↓ 1 callersMethodQ1
(self, state, action)
old_results/original/model.py:58
↓ 1 callersMethodadd
(self, state, action, next_state, reward, done)
models/model.py:310
↓ 1 callersMethodadd
(self, state, action, next_state, reward, done)
old_results/original/model.py:197
↓ 1 callersMethodadvance_state
Advances the state to the next state Parameter remaining_money (int): The buing power in the new state Parameter holdings (in
models/state.py:165
↓ 1 callersMethodcalculate_portfolio_value
Calculates the current portfolio value
models/environment.py:153
↓ 1 callersMethodcalculate_reward
(self, holdings, remaining_money, stock_prices_new, action_is_invalid=False)
models/environment.py:54
↓ 1 callersMethodcalculate_reward
(self, holdings, remaining_money, stock_prices_new)
old_results/original/train.py:73
↓ 1 callersFunctioncombine
(portfolio, stock)
utility/graph.py:25
↓ 1 callersMethodcopy
Returns a copy of the internal state
models/state.py:341
↓ 1 callersMethodget_new_holdings
Returns: the new holdings after performing action in the current state
models/state.py:121
↓ 1 callersMethodget_new_holdings
Gets the new holdingd after taking action
old_results/original/train.py:112
↓ 1 callersFunctiongraph
(portfolio_df=None, filename='test_results.png')
utility/graph.py:67
↓ 1 callersMethodinit_weights
(self)
models/model.py:118
↓ 1 callersMethodinitialize_date
Returns: True if start_date and end_date are in the right format. False otherwise
models/environment.py:165
↓ 1 callersMethodinitialize_date
Returns: True if start_date and end_date are in the right format. False otherwise
old_results/original/train.py:209
↓ 1 callersMethodinitialize_graph
(self)
models/state.py:52
↓ 1 callersMethodinitialize_starting_epoch
Gets the starting epoch of a cycle
models/environment.py:190
↓ 1 callersMethodinitialize_starting_epoch
Gets the starting epoch of a cycle
old_results/original/train.py:234
↓ 1 callersMethodis_done
Returns: True if the episode is done. False otherwise
models/environment.py:108
↓ 1 callersMethodis_done
Returns: True if the episode is done. False otherwise
old_results/original/train.py:146
↓ 1 callersFunctionis_greedy
(t)
main.py:23
↓ 1 callersMethodload
(self, filename)
models/model.py:280
↓ 1 callersMethodload
(self, filename)
old_results/original/model.py:168
↓ 1 callersFunctionnormalize_stock_date
(portfolio, stock)
utility/graph.py:4
↓ 1 callersFunctionplot
(portfolio, filename)
utility/graph.py:58
↓ 1 callersMethodreset
Resets the state to the initial state
models/state.py:322
↓ 1 callersFunctionrun
( stock_names, start_date, end_date, random_start=True, save_location="results/initial_pol
main.py:49
↓ 1 callersMethodsave
(self, filename)
models/model.py:274
↓ 1 callersMethodsave
(self, filename)
old_results/original/model.py:161
↓ 1 callersFunctionselect_action
(env, state, policy, t)
main.py:31
↓ 1 callersFunctiontest
( stock_names, start_date, end_date, policy, replay_buffer, save_location="results/ini
main.py:147
↓ 1 callersMethodtrain
(self, replay_buffer, batch_size=100)
models/model.py:213
Method__getitem__
Returns: get item of the past state
models/state.py:316
Method__init__
Initializes the State of the environment Parameter stock_name: the name of the stocks for the state. Precondition: stock_name
models/state.py:14
Method__init__
Initializes the past state
models/state.py:302
Method__init__
Initializes the environment. Parameter stock_names: the name of the stocks for this environment. Precondition: stock_names mu
models/environment.py:18
Method__init__
(self, in_channel, out_channel)
models/model.py:16
Method__init__
(self, in_channel, out_channel, stride=1)
models/model.py:31
Method__init__
(self, state_dim, action_dim, max_action)
models/model.py:107
Method__init__
(self, state_dim, action_dim)
models/model.py:134
Method__init__
( self, state_dim, action_dim, max_action, discount=0.99, tau=
models/model.py:173
Method__init__
(self, state_dim, action_dim, max_size=int(1e6))
models/model.py:295
Method__init__
Initializes the environment. Parameter stock_name: the name of the stock for this environment. Precondition: stock_n
old_results/original/train.py:28
Method__init__
(self, state_dim, action_dim, max_action)
old_results/original/model.py:17
Method__init__
(self, state_dim, action_dim)
old_results/original/model.py:33
Method__init__
(self, state_dim, action_dim, max_size=int(1e6))
old_results/original/model.py:181
Method__len__
Returns: The length of the state
models/state.py:310
Methodadd
Adds the state to the past state queue
models/state.py:331
Methodforward
(self, x)
models/model.py:23
Methodforward
(self, x)
models/model.py:51
Methodforward
(self, X, X_immediate=None)
models/model.py:97
Methodforward
(self, state)
models/model.py:123
Methodforward
(self, state, action)
models/model.py:149
Methodforward
(self, state)
old_results/original/model.py:26
Methodforward
(self, state, action)
old_results/original/model.py:46
Methodget_holdings
Returns: the current holdings
models/state.py:150
Methodget_holdings
Returns: the current holdings
old_results/original/train.py:106
Methodget_indicator_state
Returns: The past 'days' of the indicator state
models/state.py:88
Methodget_indicators
Adds indicators to the dataframe
models/state.py:181
Methodget_outside_environment
(self, stocks)
models/state.py:74
Functionlog_info
Logs info to the console and to the logs This function prints the message and saves the message to the log
utility/utils.py:3
Methodreset
Resets the state with the new parameters
models/state.py:273
Functionrun
(stock_names, start_date, end_date, random_start=True, save_location="init
old_results/original/train.py:249
Functiontest
(stock_names, start_date, end_date, policy, replay_buffer, )
old_results/original/train.py:326