tensortrade.env.rewards.pbr module¶
- class tensortrade.env.rewards.pbr.PBR(*args, **kwargs)[source]¶
Bases:
AbstractRewardScheme
A reward scheme for position-based returns.
Let \(p_t\) denote the price at time t.
Let \(x_t\) denote the position at time t.
Let \(R_t\) denote the reward at time t.
Then the reward is defined as, \(R_{t} = (p_{t} - p_{t-1}) \cdot x_{t}\).
- Parameters:
price (Stream) – The price stream to use for computing rewards.
- registered_name = 'pbr'¶