INNER CODE UNIT · Python
_run_demo
initial-d/ml-quant-trading · src/mlquant/cli/main.py:201
def _run_demo(ctx: click.Context, config_path: str) -> None:
"""Run all demo stages with an explicit, existing config path."""
stages = (
("1/5 Generate deterministic synthetic data", cmd_gen_data),
("2/5 Compute the 213-factor tensor", cmd_features),
("3/5 Train the baseline model", cmd_train),
("4/5 Build portfolio weights", cmd_portfolio),
("5/5 Run the cost-aware backtest", cmd_backtest),
)
click.echo("mlquant demo — data → factors → model → portfolio → backtest\n")
for label, command in stages:
click.echo(f"[{label}]")
ctx.invoke(command, config_path=config_path)
click.echo()
click.echo("Demo complete. Inspect the backtest summary above and artifacts/ for outputs.")
click.echo("\nNext steps")
click.echo(f" Customize or inspect the source: {PROJECT_URL}")
click.echo(f" Share a reproducible run: {REPRODUCTION_REPORT_URL}")