INNER CODE UNIT · Python

run

GuntharDeNiro/gunbot-quant · gunbot_quant/cli/main.py:101

def run(
    scenario_name: Annotated[str, typer.Argument(help="The name of the scenario to run. Use 'list-scenarios' to see options.")]
):
    """Runs a single backtesting scenario."""
    print(f"--- Starting Quant Toolbox: Running Scenario '{scenario_name}' ---")
    
    scenario_def = next((s for s in SCENARIOS if s["name"] == scenario_name), None)
    if not scenario_def:
        print(f"❌ Error: Scenario '{scenario_name}' not found.")
        print("Use 'list-scenarios' to see available options.")
        raise typer.Exit(code=1)

    print(f"\n{'#' * 70}\n### CONFIGURING SCENARIO: {scenario_name}\n{'#' * 70}\n")
    
    config = get_scenario_config(scenario_def)
    run_batch_backtest(config)
    print(f"\n--- ✅ Scenario '{scenario_name}' finished. Results are in 'results/{scenario_name}' ---")

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…