tensortrade-org / tensortrade

An open source reinforcement learning framework for training, evaluating, and deploying robust trading agents.
https://discord.gg/ZZ7BGWh
Apache License 2.0
4.52k stars 1.02k forks source link

Justify IntradayObserver #414

Open abstractguy opened 2 years ago

abstractguy commented 2 years ago

Justify IntradayObserver or remove from code (daily timesteps also work using the default observer)

Haakam21 commented 2 years ago

When using intraday data (minute, hourly, etc) and the default observer, the agent can hold overnight, during which equities experience large price swings. These price swings introduce significant noise into the reward function, preventing the agent from learning useful intraday strategies.

The IntradayOberserver prevents holding overnight by resetting for every trading day (each trading day is an episode).