symbol start_date stock_score
AA 2/13/2012 0.876536739
WFM 2/13/2012 0.056418644
FDX 2/14/2012 0.976608748
M 2/15/2012 0.352700668
AAPL 2/16/2012 0.718324572
I want to use fetche_csv to save a csv file into pandas data frame like above. Then I define a function(get_stock_length)to be called each day.
I expect the result should be:
2/13/2012: AA, WFM length 2
2/14/2012: FDX length 1
2/15/2012: M length 1
2/16/2012: AAPL length 1
The printed result gives me:
2/13/2012 length 2
2/14/2012 length 3
2/15/2012 length 4
2/16/2012 length 5
As you can see from the backtest , the green line keeps going upward, meaning data.fetcher_assets keeps appending symbols and gets larger and larger. Any ideas of how to fix it? Thanks in advance