AI4Finance-Foundation / FinRL-Meta

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

How to customize the data source? #238

Closed shengzhou1216 closed 1 year ago

shengzhou1216 commented 1 year ago

How to customize the data source? or How to use "User-imported Datasets" as described in the following figure

YangletLiu commented 1 year ago

Would you like to check the data processor at: https://github.com/AI4Finance-Foundation/FinRL-Meta/tree/master/meta/data_processors

shengzhou1216 commented 1 year ago

I want to fetch data from a local database instead of downloading it from a remote server. How can I achieve this? Do i just need to customize a data_processor class (i.e. extends the _Base class)?

Would you like to check the data processor at: https://github.com/AI4Finance-Foundation/FinRL-Meta/tree/master/meta/data_processors

ZiyiXia commented 1 year ago

Yeah, customize a data_processor class should be the most straightforward way. Basically your main work will be in the download_data() function, and make sure that the dataframe you generated by your data is in the correct form that clean_data(), `add_technical_indicator(), etc. could work with. Otherwise you need to modify those functions specifically.

shengzhou1216 commented 1 year ago

thx. :+1: