basic_profit_max
Classes
Base class for reward functions in trading environments. |
|
Base class for reward functions in trading environments. |
|
Base class for reward functions in trading environments. |
|
Base class for reward functions in trading environments. |
|
Base class for reward functions in trading environments. |
Module Contents
- class basic_profit_max.BasicProfitMax(cfg, initial_state)
Bases:
trading.src.alg.environments.reward_functions.base_reward_function.RewardFunctionBase class for reward functions in trading environments. @TODO pass in the profit calculated from the position step
- Parameters:
initial_state (numpy.ndarray)
- initial_net
- previous_net
- __repr__()
- Return type:
str
- reset()
Reset the reward function state.
- compute_reward(pf, df, realized_profit)
Compute the reward for a given action and state transition.
- Parameters:
pf (trading.src.portfolio.portfolio.Portfolio)
df (pandas.DataFrame)
realized_profit (float)
- Return type:
float
- class basic_profit_max.BasicRealizedProfitMax(cfg, initial_state)
Bases:
trading.src.alg.environments.reward_functions.base_reward_function.RewardFunctionBase class for reward functions in trading environments. @TODO pass in the profit calculated from the position step
- Parameters:
initial_state (numpy.ndarray)
- compute_reward(pf, df, realized_profit)
Compute the reward for a given action and state transition.
- Parameters:
pf (trading.src.portfolio.portfolio.Portfolio)
df (pandas.DataFrame)
realized_profit (float)
- Return type:
float
- class basic_profit_max.SharpeRatio(cfg, initial_state)
Bases:
trading.src.alg.environments.reward_functions.base_reward_function.RewardFunctionBase class for reward functions in trading environments. @TODO pass in the profit calculated from the position step
- Parameters:
initial_state (pandas.DataFrame)
- initial_state
- risk_free_rate
- compute_reward(pf, df, realized_profit)
Compute the reward for a given action and state transition.
- Parameters:
pf (trading.src.portfolio.portfolio.Portfolio)
df (pandas.DataFrame)
realized_profit (float)
- Return type:
float
- class basic_profit_max.SortinoRatio(cfg, initial_state)
Bases:
trading.src.alg.environments.reward_functions.base_reward_function.RewardFunctionBase class for reward functions in trading environments. @TODO pass in the profit calculated from the position step
- Parameters:
initial_state (pandas.DataFrame)
- initial_state
- risk_free_rate
- compute_reward(pf, df, realized_profit)
Compute the reward for a given action and state transition.
- Parameters:
pf (trading.src.portfolio.portfolio.Portfolio)
df (pandas.DataFrame)
realized_profit (float)
- Return type:
float
- class basic_profit_max.CalmarRatio(cfg, initial_state)
Bases:
trading.src.alg.environments.reward_functions.base_reward_function.RewardFunctionBase class for reward functions in trading environments. @TODO pass in the profit calculated from the position step
- Parameters:
initial_state (pandas.DataFrame)
- initial_state
- risk_free_rate
- compute_reward(pf, df, realized_profit)
Compute the reward for a given action and state transition.
- Parameters:
pf (trading.src.portfolio.portfolio.Portfolio)
df (pandas.DataFrame)
realized_profit (float)
- Return type:
float