INNER CODE UNIT · Python

cmd_demo

initial-d/ml-quant-trading · src/mlquant/cli/main.py:189

def cmd_demo(ctx: click.Context, config_path: str | None) -> None:
    """Run the complete synthetic factor-to-backtest pipeline."""
    if config_path is not None:
        _run_demo(ctx, config_path)
        return

    default_config = files("mlquant.configs").joinpath("small.yaml")
    with as_file(default_config) as default_path:
        click.echo("Using packaged default config (override with --config PATH).\n")
        _run_demo(ctx, str(default_path))


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),

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…