Trade Tester

Author: Optuma Team Last updated: Apr 1, 2020 05:09

Overview

The Trade Tester is very similar to the Signal Tester, with the key difference being the ability to include exit signals.

img0

*Note: The Signal & Trade Tester module is available for Enterprise Services clients only. Trader/Professional Services clients may purchase the module from the* Tool Store*.*

Setting up a Trade Test

To create a new Trade Test click the New button and in the Settings column select Trade Test from the Test Mode option:

*Note: All properties with a * are required to be set by the user to run a Test.*

Security Selection

  • Comparison Index: Allows the user to select a code (usually an Index) which will display alongside the Signal Test results to be used as a comparison to measure performance.

In the example above the Orange Band represents the performance of the XJO over the same time period.

  • * Trade Test On: Allows the user to select running the Trade Test on a Single Code, or Multiple Codes.
  • * Codes to Test: Used to enter the Single Code, or Select a list of codes (via the Security Selector) the Trade Test will use.
  • * Date Range: Used to select the length of time the Trade Test will run over when looking for the selected criteria to be met. Options range from Last Day to Everything (uses Last 10 Years by default).
  • * Data Timeframe: Sets the timeframe the criteria is used on (1 Day, 1 Week, 1 Month, etc). For example, when manually analysing a chart you apply your criteria / tools to a 1 Week chart, you would set the Timeframe in the Signal Tester to 1 Week.

Grouping

By default, the results of the Signal Test will be condensed into a single line (with high low bands). The Grouping option allows you to display results for individual years, or other custom groups (such as GICS Sectors, if you have Bloomberg data).

This gives you the ability to see the results of price movement after the signal has been found through different market conditions (Bull, Bear, Sideways, etc).

Calculation Rules

  • Average Style: Allows the user to select how the combined results are averaged. The options are Median (default) or Mean. The Mean is the basic average of the results. The Median value takes the numeric value separating the higher half of a sample from the lower half to produce the average line.
  • Periods Before: Allows the user to select how many bars before each signal are displayed on the Signal Test results. Set to 30 bars by default.
  • * Periods After: Allows the user to select how many bars after each signal are displayed on the Signal Test results. Set to 252 bars by default (a typical trading year for equities).

Results Display

  • Comparison Index: Allows you to display the statistics of the selected comparison index along side the statistics of the selected Signal test for direct comparison.

The Comparison Index allows you to select other signal tests as well. This allows you to directly compare the statistics / results of two signal tests side by side.

  • Draw Style: Allows the user to select between Line (default) which is a composite of all the results averaged out as a Median or Mean, or individual components (a line for each signal).
  • Show High Low Bands: Allows the user to display / hide the upper and lower bands on the results graph.

    In the above example, High Low Bands have been turned off.

  • Auto Scale: The scale on the Signal Test results page will automatically recalculate to show the Max / Minimum values. If this option is disabled the scales can be manually set.

Trade Results Tab

This tab shows the individual trade results. Click on any row to open a chart showing the signals.

  • Date: The trade entry date
  • Close At Signal: This is the closing price of the bar at the entry signal date.
  • Index At Signal: This is the closing price of the comparison index (if one is selected) at the trigger signal date.
  • Close At End: This is the closing price of the bar x bars from the trigger signal date. For example if you set the Periods After to be 50 days, this would be the closing price 50 bars after the initial trigger.
  • Index at End: This is the closing price of the comparison index x bars from the trigger signal.
  • Stop Date: If you have a stop or Profit Target set in settings, the date the trigger was stopped out will display here.

Profit Analysis

A graph of the Profit Analysis is displayed below the main Signal Test graph.

  • Profit Factor Display Style: Allows the user to adjust the type of graph displayed for the Profit Analysis. The options are Distribution (default) and Ranked.
  • Logarithmic Profit: Allows the user to set the display of the X Axis of the Profit Analysis chart to use a Logarithmic scale.

    An example of the Profit Analysis graph set to Log Scale

  • Stop Loss: Add a Stop Loss (as a percentage value) to the Signal Test. The Signal Test will automatically recalculate when this value is entered / adjusted.
  • Profit Target: Add a Profit Target (as a percentage value) to the Signal Test. The Signal Test will automatically recalculate when this value is entered / adjusted.

Monte Carlo Simulation

Monte Carlo simulations are used to model the probability of different outcomes in a process that cannot easily be predicted due to the intervention of random variables.

By analysing historical price data from a random selection of Signals, you can determine the drift, standard deviation, variance and average price movement for a random selection of signals within the total number of results generated. These are the foundations of a Monte Carlo simulation.

  • Simulation Display Style: Allows the user to adjust the type of graph displayed for the Monte Carlo Simulation. The options are Distribution (default), Ranked and Win / Loss Count.
  • Logarithmic Simulation: Allows the user to set the display of the X Axis of the Monte Carlo Simulation chart to use a Logarithmic scale.

    An example of the Monte Carlo Simulation graph set to Log Scale

  • * Number of Tests: Sets the number of tests used to create the random samples used to generate the Monte Carlo Simulation. Setting the value higher will improve the statistical results generated by the simulation (Mean and Median returns, etc). Has a minimum value of 100.
  • * Signals per Test: Sets the number of results per Test used to create the random samples to generate the Monte Carlo Simulation. Has a minimum value of 2.

Report Options

The properties contained in this section are used when generating a PDF report of the selected Signal Test.

  • Description: Enter a general description of the signal test which will display at the top of the 1st page of the PDF report.
  • Returns Commentary: The text entered here will display under the Signal Distribution graph at the bottom of the 1st page of the PDF report.
  • Distribution Commentary: The text entered here will display under the Profit Analysis Distribution and Ranked graphs on the second page of the PDF report.
  • Monte Carlo Commentary: The text entered here will display under the Monte Carlo Simulation Distribution, Ranked and Win / Loss Count graphs on the second page of the PDF report.
  • Include Script: Tick this checkbox to include the details of the script used to generate the Signal Test. If selected the script will display on the top right of the 1st page of the PDF report.
  • Report Header Colour: Allows the user to adjust the colour of the header bar displayed at the top of the 1st page of the PDF. By default, dark blue will be used.
  • Report Header Logo: Allows the user to replace the default Optuma Logo displayed on the top right corner of the 1st page with a custom logo image (we recommend using a PNG image file). The logo image size will be adjusted automatically to fit within the report header.

Statistics

A table of statistical values will be displayed to the left of the Profit Analysis graph of each Signal Test. These values include:

  • Probability of Gain (%): The percentage of signals that saw an increase in value once triggered.
  • Probability of Loss (%): The percentage of signals that saw a decrease in value once triggered.
  • Mean Return: Displays the value of the Signal Tests average line (using the Mean calculation method).
  • Median Return: Displays the value of the Signal Tests average line (using the Median calculation method).
  • 80th Percentile: Shows the 80th percentile value. For example, if the 4th highest return in a sample of 20 Signals is 5%, 80% of the values will be lower than 5%.
  • 20th Percentile: Shows the 20th percentile value. For example, if the 4th lowest return in a sample of 20 Signals is -5%, 20% of the values will be lower than -5%.
  • Skewness: Skewness describes asymmetry from the normal distribution in a set of statistical data. Skewness can come in the form of “negative skewness” or “positive skewness”.
    • An asymmetrical distribution with a long tail to the right (higher values) has a positive skew.
    • An asymmetrical distribution with a long tail to the left (lower values) has a negative skew.
  • Kurtosis: The Kurtosis value describes the trend / curve across the Signal Test / Profit Analysis and Monte Carlo Simulation graphs. A high kurtosis value indicates a chart with fat tails and a low, even distribution, whereas a low kurtosis indicates a chart with skinny tails and a distribution concentrated toward the mean.
  • Standard Deviation: The Standard Deviation of all individual component results for the selection period.