Expand description
§Dated daily history for research
The live fetcher (fetcher.rs) throws timestamps away because the live
analyzers only ever look at “the latest bar”. A backtest cannot do that:
to split train from test honestly we need to know when every bar
happened. This module downloads long daily histories from Yahoo, keeps
the date, and stores dividend-and-split adjusted OHLC so that a $1
dividend never looks like a $1 crash to the indicator.
File format (data/history/SYMBOL.csv):
date,open,high,low,close,volume
2004-01-02,10.21,10.40,10.11,10.33,123400The extra date column is ignored by fetcher::load_ohlcv_csv, so these
files also work with every older tool in the crate.
Structs§
- Dated
Bar - One daily bar plus the calendar date it closed on.
Functions§
- fetch_
daily - Download
range(e.g."25y"or"max") of daily bars forsymbol. - fetch_
price_ scale - How many real dollars one adjusted dollar was worth on each date.
- load
- Read a file written by
save. - load_
scale - save
- Write bars as
date,open,high,low,close,volume. - save_
scale - Save / load
date,scalefiles written forfetch_price_scale.