trading-rl icon indicating copy to clipboard operation
trading-rl copied to clipboard

self.prev_fin_pos doubt

Open mg64ve opened this issue 4 years ago • 0 comments

I am reviewing my code but I am still not able to publish yet. I have my function for pnl calculation, I am not sure if it is correct. But now, reviewing my code I got a doubt on the following:

self.action = SELL
self.value -= self.value * self.turn  # Update s(t+1) = s(t) + [s(t) * a]
self.short_actions.append([self.position, c_val])
self.prev_fin_pos = SELL

Shouldn't be the following?

self.prev_fin_pos = self.action
self.action = SELL
self.value -= self.value * self.turn  # Update s(t+1) = s(t) + [s(t) * a]
self.short_actions.append([self.position, c_val])

Kindly let me know what you think about it. Thanks

mg64ve avatar Jan 06 '20 06:01 mg64ve