AI4Finance-Foundation / FinRL-Meta

FinRL­-Meta: Dynamic datasets and market environments for FinRL.
https://ai4finance.org
MIT License
1.2k stars 560 forks source link

Update train.py #230

Closed mhdmyz closed 1 year ago

mhdmyz commented 1 year ago

I highly suggest for simplifying and easier debugging and better readability and understandability of the codes, the environment creation gets it's own function and gets separated from the train and test functions. One of the prominent advantages of FinRL-Meta is it's modularity and having different independent layers, which the proposed change helps going further in this direction.

zhumingpassional commented 1 year ago

in the train function, how to init the dp = DataProcessor?

mhdmyz commented 1 year ago

The DataProcessor is initialized in the create_train_env function which results env_train which will be given as an input to the train function.