edtechre / pybroker

Algorithmic Trading in Python with Machine Learning
https://www.pybroker.com
Other
2.09k stars 262 forks source link

caching data bug in month or week frequence #96

Closed frankygtd closed 9 months ago

frankygtd commented 10 months ago

I just read the code in class DataSource. it will concatenate cached data and uncached data by "df = pd.concat((cached_df, df))". then there will be a bug when frequency is month or week. here are some example data. image weekly data before 2024-01-05 is cached. image monthly data before 2024-01-05 is cached.

three cached points: 2024-01-05, 2024-01-16, 2024-01-19

raw data is correct. image

please help to check it, thanks

edtechre commented 10 months ago

Thank you @frankygtd. Can you provide sample code to reproduce this? Monthly caching is no longer supported as of v1.1.30.

frankygtd commented 9 months ago

if so, I will close caching option for monthly data. Thanks