Hi,
Passing numerical search space for parameters to the optimization is very intuitive like below:
{
"name":"parameter_name",
"min":30,
"max":90,
"step":30
},
However, when it comes to non-numeric parameters such as strings (e.g, to be used to determine start and end dates of the backtest, `lean optimize` is unable to parse those.
I have tried passing them as if they were numeric (i.e. min and max being the same), passing them as a single element dictionary (i.e. name: value) but both of them failed. Is there a way to pass non-numeric or non-optimized parameters to LEAN local?
{'start_date' : '2010-01-01'}
or
{
"name":"start_Date",
"min":'2010-01-01',
"max":'2010-01-01'
}
Nottakumasato
Looks like the below also works for non-numeric parameter passing:
Nottakumasato
But if I want to pass multiple non-numeric values as the parameter than the optimization errors out
Louis Szeto
Hi Nottakumasato
You may use the trick of encoding your parameter with numerical value:
Then set the parameter config by
Best
Louis
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Nottakumasato
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!