Load an Algorithm-Ready Dataset in a File for a Backtest¶
Helper for loading datasets from a file
Supported environment variables
# to show debug, trace logging please export ``SHARED_LOG_CFG``
# to a debug logger json file. To turn on debugging for this
# library, you can export this variable to the repo's
# included file with the command:
export SHARED_LOG_CFG=/opt/sa/analysis_engine/log/debug-logging.json
-
analysis_engine.load_algo_dataset_from_file.
load_algo_dataset_from_file
(path_to_file, serialize_datasets=['daily', 'minute', 'quote', 'stats', 'peers', 'news1', 'financials', 'earnings', 'dividends', 'company', 'news', 'calls', 'puts', 'pricing', 'tdcalls', 'tdputs'], compress=True, encoding='utf-8')[source]¶ Load an algorithm-ready dataset for algorithm backtesting from a local file
Parameters: - path_to_file – string - path to file holding an algorithm-ready dataset
- serialize_datasets – optional - list of dataset names to deserialize in the dataset
- compress – optional - boolean flag for decompressing
the contents of the
path_to_file
if necessary (default isTrue
and algorithms usezlib
for compression) - encoding – optional - string for data encoding