Skip to content

Find better parametersfor your NautilusTrader strategy

Package your NautilusTrader backtest in Docker and define your parameter ranges. HyperOptimizer runs the search and collects results on managed infrastructure.

Why HyperOptimizer for NautilusTrader?

High-performance optimization for high-performance trading

Smarter than manual tuning

Stop guessing lookback windows and multipliers. Bayesian optimization uses completed results to suggest new parameter combinations. Validate promising configurations on held-out data.

Parallel backtests

Run multiple Nautilus backtests simultaneously. Each trial runs in a separate container. Actual concurrency depends on plan capacity, available compute, and scheduling.

Bring your strategy and data

Your Nautilus strategy runs in a managed trial container. HyperOptimizer processes the image, execution logs, and metrics needed to run and inspect the experiment.

Clear results

Leaderboard ranked by Sharpe, PnL, or any custom metric. Convergence plots and Pareto frontiers for multi-objective experiments like return vs. drawdown.

How it works

From backtest to optimized in three steps

1

Dockerize your backtest

Package your Nautilus engine, strategy, data, and dependencies in a Docker image. Set the default command to your backtest script.

2

Parse args & emit metrics

Read --hpo-* flags, run engine.run(), and print metrics from engine.get_result().

3

Define the search and launch

Set parameter ranges and objectives in hpo.toml or the dashboard. Launch managed backtests and inspect each configuration’s metrics and logs.

Example

Emit backtest results as metrics

After engine.run()

result = engine.get_result()

metrics = {
    "total_pnl": float(result.stats_pnls.get("PnL", 0)),
    "total_orders": result.total_orders,
    "elapsed_time": result.elapsed_time,
}

for key, value in metrics.items():
    print(f"hpo.metrics.{key}={json.dumps(value, default=str)}")

Optimize your Nautilus strategy

Follow the NautilusTrader integration guide for a step-by-step walkthrough with full code examples.