Hi everyone, 

The parameter optimization feature was recently shipped and I wanted to share a simple long/hold strategy that utilizes it. We build our algorithm in the algorithm framework and we aim to optimize our take-profit parameter. 

First, we need to add a new parameter in Algorithm Parameters which can be found here:


Once we do this, call self.GetParameter("take-profit") in our initialize method to get our value. It is important to note that although you may be able to call GetParameter in your Alpha Model or any other module, you will be unable to optimize the parameter unless it is called in the initialize method. 

Now let's start optimizing our parameter:

First, we select our optimization strategy and our target. Currently, Grid Search is the only optimization strategy available.


The second step is to constrain our take-profit parameter between 0.01 and 0.1 and to set our step count to 0.01 decimals. Therefore, we will have 10 backtests.


Lastly, we select our nodes and receive a cost estimate. You can click on each node and read a small description below it to better understand its optimal use. 


And now we have our optimized parameter! take-profit = 0.04