base_reward_function
Classes
Base class for reward functions in trading environments. |
Module Contents
- class base_reward_function.RewardFunction(cfg, initial_state)
Base class for reward functions in trading environments. @TODO pass in the profit calculated from the position step
- Parameters:
initial_state (pandas.DataFrame)
- cfg
- initial_state
- __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