Prepare a Ready-Dataset for a Backtest¶
Helper for converting a dictionary to an algorithm-ready dataset
-
analysis_engine.prepare_dict_for_algo.prepare_dict_for_algo(data, compress=False, encoding='utf-8', convert_to_dict=False, dataset_names=None)[source]¶ Parameters: - data – string holding contents of an algorithm-ready file, s3 key or redis-key
- compress – optional - boolean flag for decompressing
the contents of the
dataif necessary (default isFalseand algorithms usezlibfor compression) - convert_to_dict – optional - bool for s3 use
Falseand for files useTrue - encoding – optional - string for data encoding
- dataset_names – optional - list of string keys
for each dataset node in:
dataset[ticker][0]['data'][dataset_names[0]]