AI4Finance-Foundation / FinRL-Meta

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

[Discussion] How to design the structure of tutorials with two versions (notebook and python) #134

Open zhumingpassional opened 2 years ago

zhumingpassional commented 2 years ago

We will provide tutorials with two versions, notebook and python. The python version will be more efficient to debug locally step by step. The notebook .ipynb can be obtained by directly copying from corresponding .py except the front install commands.

There may be several structures:

  1. Like the current architecture in FinRL-Meta, tutorials_notebook and tutorials_python
  2. tutorials -> 1-Introduction_notebook 1-Introduction_python
  3. tutorials -> 1-Introduction -> FinRL_StockTrading_NeurIPS_2018 -> FinRL_StockTrading_NeurIPS_2018.py, FinRL_StockTrading_NeurIPS_2018.ipynb

Would you like to provide any ideas, or suggestions for the file structure? Moreover, the reasons of your suggestion are also welcome. Thanks very much.

VinceGa commented 2 years ago

Here's my feedback:

  1. Both Py and ipynb versions should have a better way to explicitly manage dependency.
  2. From ipynb we can easily generate a py file, but it's not that easy the other way around.
FarzanTabrizi commented 2 years ago

Hi I think project could be extended to FOREX (EURUSD, GBPJPY,...) and Metals like Gold, for this task project should have these sections 1) download historical data for the asset on specific time frame this task can be done using yfinance and config file right now but if it can be accessible form the main project page it's a privilege. 2) other assets historical data on specific TF can be added to df since some assets have correlation + or - with each other. 3) indicators can be added to df on main asset only or to main and correlation assets. adding indicators now can be done with config file but if it can be accessible form the main project page it's a privilege. 4) FOREX environment can be obtained from gym-anytrading 'forex-v0' reference: https://github.com/AminHP/gym-anytrading 5) in action-space now we have buy,sell but it's better to be buy,sell,do_nothing. with the mentioned structure I think much more accurate predictions can be made I hope this idea helps to get better results and step forward to practical application that can work on real market best regards

zhumingpassional commented 2 years ago

@VinceGa

  1. In our notebooks, the ipynb is copied from the corresponding py, therefore, they are almost the same except that notebooks have the install commands.
  2. The py files directly generated from notebooks generally cannot run successfully.
segatrade commented 2 years ago
  1. tutorials -> 1-Introduction -> FinRL_StockTrading_NeurIPS_2018 -> .py, .ipynb

This is best way I think. For every tutorial we have directory. .py and .ipynb inside it together. It will be easier to update both tutorials if something changed. Also I think it will be better if .ipynb will mostly import from .py - that remove duplicates