Heerozh / spectre

GPU-accelerated Factors analysis library and Backtester
GNU General Public License v3.0
627 stars 108 forks source link

Backtest example graphs in README.md need updating? #6

Closed natemoser closed 4 years ago

natemoser commented 4 years ago

I just downloaded pricing using

from spectre.data import YahooDownloader
YahooDownloader.ingest(start_date="2001", save_to="./prices/yahoo", symbols=None, skip_exists=True)

and then ran the example code in https://github.com/Heerozh/spectre#back-testing and got pretty different results, as seen in the screenshot below.

Seems like this could either be updated/corrected pricing data from Yahoo, or changes in the example code? Looking at https://github.com/Heerozh/spectre/blame/master/README.md it does look like there have a been a couple of changes to the code since the img link was added, and maybe the image just needs to be updated with results from the latest example code?

image

Heerozh commented 4 years ago

Yes, there are some changes in the code after adding this image. Since this example purchased about 500 stocks, so it is very sensitive to any changes. Generally, I will not update it unless some major bug fixes.

But I think the main reason is that yahoo's data is adjusted, that is, the data will change over time (due to dividend/split), the price data you download now is different from when I added this picture, and current SP500 components are also different.

natemoser commented 4 years ago

Thanks, makes sense (and I hadn't considered that the set of SP500 tickers would change over time too!).