+1 888 340 6572

Portfolio Optimization

From MultiCharts


Understanding Optimization

Strategy optimization is the search for the set of optimum parameters for the defined criteria. By testing a range of signal input values, optimization aids in selecting the values that correspond, based on historical data, to the best strategy performance. Optimization aids in better understanding of strategy's characteristics and in creating new criteria for entries and exits.

There are two optimization methods:

  • Exhaustive Search
  • Genetic Algorithm


To learn more about optimization and its techniques, see Understanding Optimization

Once a portfolio has been created, strategy configured, and portfolio settings selected, portfolio optimization can be run.

Exhaustive Search Portfolio Optimization

To perform portfolio optimization:

  1. Open Portfolio Trader window.
  2. Click the Optimization button on the toolbar, or select Portfolio in the main menu and then click Run Optimization.
  3. In the Select Optimization Method dialog box that appears, select Exhaustive Search.
  4. In the Exhaustive Search Properties window that appears, select the Optimizable Inputs tab.
  5. Check/uncheck the check box to the left of the signal name and input name to enable/disable optimization for this input or check the check box to the left of the Signal Name column heading to enable optimization for all inputs (at least one input should be selected to perform optimization).
  6. The Current Value column shows input values that are currently selected for the signals applied on the chart.
  7. In the Start Value column, enter the desired starting values for each of the inputs.
  8. In the End Value column, enter the desired ending values for each of the inputs.
  9. In the Step column, enter the desired step size, for each of the inputs.
  10. The Step Count column shows current number of steps for an input.
  11. Select the Optimization Criteria tab.
  12. Select the Use Limitation checkbox to limit the output to a defined number of the best results; unselect the checkbox to list all the results in the optimization report.
    When Use Limitation checkbox is checked, Optimization dialog window shows current best results for selected сriteria during optimization.
  13. Enter the desired number of best results in the Show N best results box.
  14. Select the best results criteria in the best results for list box.
  15. Select Ascending or Descending option to sort the output in ascending or descending order, respectively.
  16. Click OK to run the optimization and generate the Optimization Report.

Genetic Algorithms Portfolio Optimization

To perform portfolio optimization:

  1. Open Portfolio Trader window.
  2. Click the Optimization button on the toolbar, or select Portfolio in the main menu and then click Run Optimization.
  3. In the Select Optimization Method dialog box that appears, select Genetic Algorithm.
  4. In the Genetic Algorithm Properties window that appears, select the Optimizable Inputs tab.
  5. Check/uncheck the check box to the left of the signal name and input name to enable/disable optimization for this input or check the check box to the left of the Signal Name column heading to enable optimization for all inputs (at least one input should be selected to perform optimization).
  6. The Current Value column shows input values that are currently selected for the signals applied on the chart.
  7. In the Start Value column, enter the desired starting values for each of the inputs.
  8. In the End Value column, enter the desired ending values for each of the inputs.
  9. In the Step column, enter the desired step size, for each of the inputs.
  10. The Step Count column shows current number of steps for an input.
  11. Select the Algorithm-specific Properties tab.
  12. Select the best results criteria in the Criteria list box.
  13. Select Ascending or Descending option to sort the output in ascending or descending order, respectively.
  14. Set the Genetic Algorithm properties. For information on GA properties, see Understanding Genetic Algorithm Optimization.
  15. Click OK to run the optimization and generate the Optimization Report.
  16. Optimization dialogue window shows Average fitness value for current population during optimization.

Using Optimization Report

After the optimization process is complete, a Strategy Optimization Report is generated and displayed in the Optimization Report window. Only one Optimization Report window can be open at a time.

The report lists the results of all input combinations (subject to limitations options), arranged by the specified criteria in the specified order. Each row lists a set of performance results for each combination of inputs.

Sorting the Optimization Report

The report can be sorted by values in any three of the criteria, in either ascending or descending order.

To sort the report:

  1. Select the most significant sort criterion in the Sort by list box at the top left of the report window, and then select Ascending or Descending to specify the sort order.
  2. Select the second most significant sort criterion in the Then by list box at the top center of the report window, and then select Ascending or Descending to specify the sort order.
  3. Select the least significant sort criterion in the Then by list box at the top right of the report window, and then select Ascending or Descending to specify the sort order.

Applying an Inputs Combination to the Strategy

A combination of inputs listed in any row of the report can be applied directly to the portfolio strategy.

To apply an inputs combination:

  1. Double-click the row with the desired inputs combination.
  2. In the dialog box that appears, click Yes to apply the input combination, or click No to cancel.
Once a new inputs combination is applied to the strategy, the portfolio will have to be backtested again.

Working with 2D Graphs

To display a Strategy Optimization Report as a 2D graph select the 2D Graph tab. In the 2D Graph view the results of the report are presented as lines. The lines represent the performance indices per one or several strategy inputs. The base input selector is located in the lower part of the window, additional inputs are configured in the graph settings.

To learn more about working with 2D Graphs, see this page.

Working with 3D Graphs

As the name suggests, this option allows for viewing the optimization report in the 3D format. The 3D Graph can be zoomed in and out and also rotated with the help of the scroll-wheel and left mouse button correspondingly.

To learn more about working with 3D Graphs, see this page.

Saving Strategy Optimization Reports

The Strategy Optimization Report can be exported in .ors and .csv formats. 2D and 3D graphs can be also saved as .png.

To export a Strategy Optimization Report:

  1. In the Optimization Report click Save as button.
  2. In the Save As dialog window navigate to the required file location.
  3. Type in the file name in the File Name field.
  4. Click Save.