# Introduction to Optimization of a Trading System

227
0

## Introduction

Once the system developer tested and validated the trading system, the next stage corresponds to the optimization process. The developer will estimate different values for the key model parameters.
This educational article will introduce the basic concepts in the optimization process of a trading system.

## The Optimization Process

Before getting started into the optimization process, the developer must weigh and adjust the investor’s interests with the purpose of the optimization and limitations both the strategy and reality. In this regard, the optimization must align with realistic objectives. For example, the drawdown should not exceed 10% of the trading account, or to obtain a yearly net profit of 15% from the invested capital.

The optimization of a trading system is the stage that seeks the best or most effective use, which allows investors to obtain the highest performance of the trading system. In this context, the optimization could be the search of what inputs could maximize the profits or accomplish the investor’s requirements to minimize the drawdown. To achieve this, the developer must evaluate the variables that conform to the rules and formulas that define and models the system’s structure.

The system developer must consider that an incorrect optimization can drive to obtain serious errors. For this reason, the optimization process is a critical stage in trading system development.

## What is the Optimization of Trading Systems?

In general terms, the optimization process is a mathematical method oriented to improve or find an “optimal” solution to a specific problem. In the trading system development, the optimization corresponds to the best parameter selection that allows the strategy to obtain the peak performance in the real market.

## Getting Started

Once the system developer tested the trading strategy’s capability to catch market movements, the steps to start the optimization are as follows:

1. Selection of the model parameters that have the most significant impact on the system’s performance; if a model’s variable is not relevant, it could be fixed.
2. Selection of a significant range of data needed to test the parameter to be optimized. This range must generate a significative sample to study the model. For example, the amount of data required to evaluate a 20-day moving average is lower than the one needed to assess a 200-day moving average.
3. Selecting the data sample size. It must be representative enough to ensure the statistical validity to make estimations. The size also must be representative of the market as a whole.
4. Selection of the model evaluation type, this stage will depend on the evaluation type, objective, or test criteria; this selection will change depending on the kind of trading model.
5. Selection of the test result evaluation type, this stage must evaluate the results of the optimization process with a statistical significance, meaning the results are not due to chanve. For example, a P-value below 5% would be statistically “significant,” and below 1% would be “highly significant.” Additionally, the average and the standard deviation of the results must be evaluated. As a final note, profit spikes should be considered as abnormal and be discarded.

The figure summarizes the five selections that the system developer must take before to start the optimization process.

## Conclusions

The optimization process is a critical stage that comes after the testing process. In this stage, the system developer seeks to determine the appropriate value for the most robust trading strategy implementation.

Nevertheless, before starting with the optimization, the developer must take a set of decisions, such as which the objective of the optimization? Is it realistic?

Once defined the target of the optimization, the developer must select which parameters to optimize, the range of data to be used in the analysis, how much data will require the sample, which will be the evaluation type of the model, and the evaluation criteria of the test results.

Finally, when all these five steps have been completed, the system developer is ready to start to perform the optimization.