Build an Algorithm Request Dictionary

Build a dictionary for running an algorithm

analysis_engine.build_algo_request.build_algo_request(ticker=None, tickers=None, use_key=None, start_date=None, end_date=None, datasets=None, balance=None, commission=None, num_shares=None, config_file=None, config_dict=None, load_config=None, history_config=None, report_config=None, extract_config=None, timeseries=None, trade_strategy=None, cache_freq='daily', label='algo')[source]

Create a dictionary for building an algorithm. This is opinionated to how the underlying date-based caching strategy is running per day. Each business day becomes a possible dataset to process with an algorithm.

Parameters:
  • ticker – ticker
  • tickers – optional - list of tickers
  • use_key – redis and s3 to store the algo result
  • start_date – string date format YYYY-MM-DD HH:MM:SS
  • end_date – string date format YYYY-MM-DD HH:MM:SS
  • datasets – list of string dataset types
  • balance – starting capital balance
  • commission – commission for buy or sell
  • num_shares – optional - integer number of starting shares
  • cache_freq – optional - cache frequency (daily is default)
  • label – optional - algo log tracking name
  • config_file – path to a json file containing custom algorithm object member values (like indicator configuration and predict future date units ahead for a backtest)
  • config_dict – optional - dictionary that can be passed to derived class implementations of: def load_from_config(config_dict=config_dict)

Timeseries

Parameters:timeseries – optional - string to set day or minute backtesting or live trading (default is minute)

Trading Strategy

Parameters:trade_strategy – optional - string to set the type of Trading Strategy for backtesting or live trading (default is count)

Algorithm Dataset Extraction, Loading and Publishing arguments

Parameters:
  • load_config – optional - dictionary for setting member variables to load an agorithm-ready dataset from a file, s3 or redis
  • history_config – optional - dictionary for setting member variables to publish an algo trade history to s3, redis, a file or slack
  • report_config – optional - dictionary for setting member variables to publish an algo trading performance report to s3, redis, a file or slack
  • extract_config – optional - dictionary for setting member variables to publish an algo trading performance report to s3, redis, a file or slack