Help with Optimization Best Practices and Guideline

Hello to all experts and practitioners,

I have tried searching a lot around what are best practices and guidelines for optimization process. However I did not find a satisfactory content about it. Hence posting it here to community for their thoughts and suggestions.

Amibroker is a powerful tool and I particularly like Optimization and walk-forward features. Here I have some queries. Just to give a context I am intraday trader and typically work on 15 minutes or smaller time frames only for intraday trades in equity and commodities.

  1. What is ideal frequency for optimization and re-optimization process? (Should it be done weekly, ,biweekly,monthly?)
    -- I have observed that over a period of time as the market cycle changes even slightly the outcome (Profit and winrate ) changes. In a highly volatile scenario like the one currently I have observed that results fluctuate very often drastically.

  2. What are the key things to look out for while optimization?

  • After optimization we typically get 100s of optimal combinations how do we choose one? What is important from intraday stand point to get consistent results inline with optimization outcome?
  • For example Ulcer Perf. Index,Sharpe Ratio,K-Ratio, % of winners, Avg.Profit/loss, etc or a combination of this?
  1. What is the ideal "in-sample data" duration?
  • I have observed that If optimization is carried on a larger in-sample data/longer duration the results are not that great. Even the outcome when strategy is deployed for trading or out of sample walk-forward are also not good and consistent. From Intraday perspective how far back one should go for in-sample data duration?
    (a week, month, contract duration or more than that?)
  1. When is re-optimization warranted?
  • Say I have a strategy with 80% win rate as per optimization outcome. As long as strategy is performing around + or - 5% of this win rate are we fine to continue without the need of optimization? or something else? In short how to identify that the parameter values optimized are no longer optimal for this strategy for this market/instrument and need re-optimization?

I understand that these questions are not related to AFL programming or just amibroker per say however for anyone who has recently started using amibroker/optimization feature will likely have same dilemma and questions hence posting it here for experts comments and guidelines.



Surprising and disappointing to not receive a single reply :thinking:. Have I asked something irrelevant or something that is not generally practiced by enough users to have these questions or answers to them?

@pawarganesh204, you partially answered your own question here:

However, the other issue is that three of your four questions (all but number 2) don't have definitive answers. Any response to these questions would begin with "It depends...", and if you asked 10 experienced traders these questions you would likely get 10 different answers.

As for question number two, I assume you have already read this: In addition to watching out for parameter sensitivity, you need to consider your trading goals so that you select a robust variation that is likely to be within your personal risk tolerance, has sufficiently high returns to make it worth the time invested in executing trades, etc. So really, we come back to "It depends..." yet again.

In my experience, selecting a strategy variation to trade is as much art as it is science, and like all art, is very specific to the individual.

1 Like

Thanks for your reply. I tend to agree with you that its much of art as well as science. I was hoping that community here will share their own experiences although with "It depends" but nevertheless as least some one shared his view. Hope we will have more practitioners sharing their views.


I think there are no real forum to talk about "trading" in general... Amibroker and Afl forums are really purely for technical issues.

A new forum "Trading discussion" to discuss such issues would be welcome.

1 Like