Open ericng-tx opened 4 years ago
ohlcv
and adjustments
just tell the engine what the name of price columns are, you can have extra columns in your data source (such as csv files) as you want.
OHLCV.close
is sugar way represents spectre.factors.ColumnDataFactor (inputs = ['close'])
,
so you can use this method to read any columns:
spectre.factors.ColumnDataFactor (inputs=['col_name'])
Good question btw, I will add to the document.
Can the ColumnDataFactor also be used for adding something like sector code (that is specific to a symbol) after the data have been loaded?
Can the ColumnDataFactor also be used for adding something like sector code (that is specific to a symbol) after the data have been loaded?
Static data needs to be included in your DataLoader
in order to maximize performance.
But there is a low-performance but convenient method for your needs:
spectre.factors.AssetClassifierDataFactor({'AAPL': 1, ...}, default=-1)
Other than ohlcv columns ('open', 'high', 'low', 'close', 'volume') and adjustments columns ('ex-dividend', 'split_ratio'), how do we add fundamentals data columns? Thanks a lot