Grid and Random Search for Machine Learning Hyperparameters
Summary
The document introduces hyperparameter optimization for machine learning models used in trading strategies. It describes how choices such as a model's learning rate can change the path taken while minimizing a loss function, which may have multiple local minima. The article then outlines a platform module for defining candidate parameter values and evaluating each resulting strategy with a score, such as the final Sharpe ratio from a backtest.
It distinguishes grid search, which evaluates every specified parameter combination, from random search, which samples combinations and can be more efficient in larger search spaces. Users can set a limit on random-search iterations and choose how many jobs run in parallel. The described module operates on the full visual strategy canvas. The document is an interface guide rather than an empirical comparison: it gives no evidence that a particular search method improves out-of-sample trading results, and it does not discuss validation design or the risk of overfitting when selecting parameters from backtests.
Key ideas
- Hyperparameters can change how a model searches for a minimum in a potentially non-convex loss surface.
- A search space is defined by listing candidate values for each parameter to tune.
- A scoring function ranks parameter sets and can use a backtest metric such as final Sharpe ratio.
- Grid search evaluates all specified combinations, while random search samples combinations and can be more efficient for larger spaces.
- The guide describes platform controls for iteration limits and parallel jobs but provides no out-of-sample evidence.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.