CLI parameters guide

HyperOptimizer passes trial parameters as command-line arguments. Your program should parse them like any other CLI flag.

Argument shape

Every optimized parameter is passed with the --hpo- prefix.

--hpo-lookback-window=50
--hpo-risk-multiplier=1.4
--hpo-timeframe=5m

Most Python CLI parsers expose these as underscore names, such as args.hpo_lookback_window.

Python example

import argparse

def parse_args():
    parser = argparse.ArgumentParser()
    parser.add_argument("--hpo-lookback-window", type=int, required=True)
    parser.add_argument("--hpo-risk-multiplier", type=float, required=True)
    parser.add_argument("--hpo-timeframe", type=str, default="5m")
    return parser.parse_args()

args = parse_args()

Mapping to your workload

Keep the HPO boundary small. Parse the CLI arguments near your entrypoint, then pass clean domain values into your model, backtest, or simulation.

config = StrategyConfig(
    lookback_window=args.hpo_lookback_window,
    risk_multiplier=args.hpo_risk_multiplier,
    timeframe=args.hpo_timeframe,
)

result = run_backtest(config)

Next, emit metrics.

Was this page helpful?