Open Hongshen-Yang opened 1 year ago
You can create a custom function that calls the yfinance library and passes a parameter "interval" with the desired period:
data = yf.download(tickers='VALE3.SA', period='5d', interval='60m')
The function that you can use to create your own is in:
finrl/meta/preprocessor/yahoodownloader.py
You can create a custom function that calls the yfinance library and passes a parameter "interval" with the desired period:
data = yf.download(tickers='VALE3.SA', period='5d', interval='60m')
The function that you can use to create your own is in: finrl/meta/preprocessor/yahoodownloader.py
Thank you mmmarchetti. Your suggestion focus on the "downloading" side.
Such as INDICATOR
in the preprocessor
. It uses days to calculate some indicators. Example:
https://github.com/AI4Finance-Foundation/FinRL/blob/e85aaab4ede4d8ed0a245da967c10b6a1cd66d7d/finrl/meta/preprocessor/preprocessors.py#L228
Same applies to StockTradingEnv
. Some functions are by-default built upon daily data.
https://github.com/AI4Finance-Foundation/FinRL/blob/e85aaab4ede4d8ed0a245da967c10b6a1cd66d7d/finrl/meta/env_stock_trading/env_stocktrading.py#L243
Do you have an easy idea about how to switch to higher frequency? Thanks
Is your feature request related to a problem? Please describe. The majority of the functionalities in FinRL-meta are daily based, including technical
INDICATORS
andStockTradingEnv
. If want to trade in higher frequency based on timestamp instead of days, where should be modified?Describe the solution you'd like Be able to trade based on timestamp instead of daily data
Describe alternatives you've considered An ugly solution is to create fake dates based on timestamp and convert back before plotting graphs.