Skip to content

CLI parameters

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

Every optimized parameter is passed with the --hpo- prefix unless you change flag mode in the experiment workbench.

--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.

In the command workbench you can switch managed parameters to plain flags:

--lookback-window=50
--risk-multiplier=1.4

Use this when your entrypoint already expects unprefixed names. Keep dashboard slugs aligned with the flags your parser declares.

You can edit a command template with {{slug}} placeholders. Managed parameters are either appended or substituted into those placeholders.

python main.py --config prod.yaml --hpo-lookback-window {{lookback-window}}

Full-line # comments in the template are stripped before the command runs. Prefer the default --hpo-* contract unless you have a reason to customize.

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

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)