rr_trading
Attributes
Classes
Functions
|
Initialize logging before any command runs. |
Print the current user configuration. |
|
|
Interactive setup wizard for the user configuration. |
|
Run the model on the Alpaca paper trading account. |
|
Run the model on the Alpaca live trading account. |
|
Module Contents
- rr_trading.app
- rr_trading.FORMAT = '%(message)s'
- rr_trading.rr_trading(ctx, log_level_console=typer.Option('INFO', '--log-level-console', help='Logging level for console (e.g., DEBUG, INFO, WARNING, ERROR, CRITICAL, NOTSET)'), log_level_file=typer.Option('NOTSET', '--log-level-file', help='Logging level for file log (e.g., DEBUG, INFO, WARNING, ERROR, CRITICAL, NOTSET)'))
Initialize logging before any command runs.
- Parameters:
ctx (typer.Context)
log_level_console (str)
log_level_file (str)
- rr_trading.print_config()
Print the current user configuration.
- rr_trading.setup()
Interactive setup wizard for the user configuration.
- rr_trading.paper_trade(config, predict_time_str='', predict_time_end_str='', account_uuid='')
Run the model on the Alpaca paper trading account. Explicit command for paper and live trading for total seperation
- Parameters:
config (Annotated[str, typer.Option('--config', '-c', help='Path to the RRTrade configuration file.')])
predict_time_str (Annotated[str, typer.Option('--timestamp', '-t', help='Timestamp for which to run the model (YYYY-MM-DD).')])
predict_time_end_str (Annotated[str, typer.Option('--timestamp_end', '-e', help='Timestamp for which to end if wanting a forward testing range: (YYYY-MM-DD).')])
account_uuid (Annotated[str, typer.Option('--uuid', '-u', help='UUID for the trading account.')])
- rr_trading.live_trade(config, confirmation=False)
Run the model on the Alpaca live trading account. Explicit command for paper and live trading for total seperation
- Parameters:
config (Annotated[str, typer.Option('--config', '-c', help='Path to the RRTrade configuration file.')])
confirmation (Annotated[bool, typer.Option('--confirm', '-y', help='Confirm live trading execution.')])
- rr_trading.push_backtest(config, backtest_dir, account_uuid='')
- Parameters:
config (Annotated[str, typer.Option('--config', '-c', help='Path to the RRTrade configuration file.')])
backtest_dir (Annotated[str, typer.Option('--backtest-dir', '-b', help='Directory where backtest results are stored.')])
account_uuid (Annotated[str, typer.Option('--uuid', '-u', help='UUID for the trading account.')])