AI4Finance-Foundation / FinRL-Trading

For trading. Please star.
https://ai4finance.org
MIT License
2.01k stars 729 forks source link

What is StockTradingRLEnv.StockEnv for? #13

Open Pit-Storm opened 3 years ago

Pit-Storm commented 3 years ago

HI @BruceYanghy

as you know I'm expanding your work for my masters thesis. And for that, I stepped over the following class:

StockEnv

As far as I scanned over the Code, this Env isn't used anywhere. Can you please explain why this orphan env is there and (more important) you built three different Envs for training validation and trading?

Would be great to hear from you :-)

Kind regards!

BruceYanghy commented 3 years ago

HI @BruceYanghy

as you know I'm expanding your work for my masters thesis. And for that, I stepped over the following class:

StockEnv

As far as I scanned over the Code, this Env isn't used anywhere. Can you please explain why this orphan env is there and (more important) you built three different Envs for training validation and trading?

Would be great to hear from you :-)

Kind regards!

That's not used. I will remove that. Thanks.

Pit-Storm commented 3 years ago

And can you give a hint what the differences between the three used envs are?

I just need a lead to the right direction.

Thank you!

BruceYanghy commented 3 years ago

And can you give a hint what the differences between the three used envs are? I just need a lead to the right direction. Thank you!

Sure.

The 3 used envs are for different purposes: training, validation, trading.

Training v.s. Validation and Trading: turbulence index is used as a risk signal after the actions which are the trading signals generated by the DRL algorithms. Turbulence index should not be included in training.

Validation v.s. Trading: Validation is just for hyperparameter tuning and model selection purposes, trading env has a previous_state parameter because it is quarterly rebalance, the DRL algorithms can't always start from the beginning (initial state is $1,000,000).