edtechre / pybroker

Algorithmic Trading in Python with Machine Learning

Home Page:https://www.pybroker.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

caching data bug in month or week frequence

frankygtd opened this issue · comments

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

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

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