QuantRocket logo


Moonshot Parameter Scans

You can use parameter scans to test variations of your strategy. In this notebook we'll test several different window lengths for calculating momentum.

A parameter scan can target any strategy parameter defined as a class attribute on the strategy. In this example MOMENTUM_WINDOW is the parameter we will target:

class UpMinusDown(Moonshot):

    CODE = "umd"

We'll compare 3 window lengths: 12 months (approx. 252 trading days), 6 months (126 trading days), and 3 months (63 trading days):

As with the backtest, a parameter scan returns a CSV, which we can use to generate a tear sheet using Moonchart: