Whats a good method to optimise a parameter outside of an insample backtest? (So perhaps while running)
Thanks for all the help.
Sincerely.
Hi Jane,
I'm having trouble understanding your query. Can you help me with the following doubts:
Q.1 Can you explain the purpose for optimising a parameter of an insample backtest?
Q.2 Which method are you currently using?
Q.3 Is there a specific parameter that you want to optimise?
Understanding your query would help me resolve your query in a better manner.
Thanks,
Rushda
Q.1 Can you explain the purpose for optimising a parameter of an insample backtest?
To optimize each pair parameters during the insample to be used out of sample.
Q.2 Which method are you currently using?
Grid search is the method I use so for eg:(look-back period, standard deviation distance)
Q.3 Is there a specific parameter that you want to optimise?
I built a code to find extremas to draw trendlines, how could I find out how many extremas should I use? I don’t think I can put everything I would like to optimize an insample backtest. Btw the code in question is a mean reversion pair trading system.
Thank you very much for all the help and diligence.
Hi Jane,
Thank you for providing more information. Based on your response, it seems like you want to optimize a parameters for your mean reversion pair trading system, especially to find extremas to draw trendline.
One approach you could consider is to use an out-of-sample validation set to test different parameter values. This would involve splitting your data into a training set and a validation set, where you would use the training set to optimize your parameters and the validation set to evaluate their performance.
You could also consider using other optimization techniques such as random search instead of the grid search.
Specific to your question about finding the optimal number of extremas to use in your code, you could consider testing different values and using a validation set to evaluate their performance. Alternatively, you could use techniques such as cross-validation to estimate the performance of your code with different numbers of extremas.
I hope this helps.