TimeMatrix Features · Practical Tutorial

Gann Backtest: A Step-by-Step Tutorial

Run a Daily Gann condition study, inspect confirmed pivots and occurrence returns, then compare exposure-adjusted Active Geometry.

By TimeMatrix · Updated · Desktop walkthrough

Gann Backtest is a member tool in the Chart page. Its calculations use retained Daily history even when the visible chart uses another timeframe. The public geometry demo is a separate feature.

Step 1

Choose a market and study mode

Open Chart, select AAPL, and open Gann Backtest in the lower tabs. Use a Daily chart so the displayed candles are easy to compare with the study. Choose Condition Study for the first exercise.

Set History from and History through to a period covered by the retained data. Record the range you requested and the coverage actually reported. A request does not guarantee that every calendar day has a stored market bar.

Step 2

Define one reproducible condition

Use the following starting settings. They define an exercise, not an optimized trading rule. Keep advanced filters at their defaults for the first run.

  1. Set Model to Square of 9 and Price source to Close.
  2. Set Anchor to Latest confirmed low, Pivot bars each side to 5, and Time origin to Confirmation date.
  3. Choose Gann square-root angle for Price translation and Above or below anchor for Direction.
  4. Choose Price at Square / Hex angle, Target angle 90°, and Angular orb 2°.
  5. Choose One observation per episode, Close to close, and Bull / bear threshold 0%.
Gann Condition Study configured with confirmed-low anchors and a 90-degree target
Example controls: five pivot bars each side, Confirmation date, a 90° target, and a 2° orb. The date fields are requests; verify actual retained coverage when you run. No study result is shown. Select the image to view it at full size.

Step 3

Understand when an anchor becomes available

A pivot with five bars on each side needs five later bars to confirm it. The anchor is not available on the original pivot date merely because it looks obvious in hindsight. Confirmation date makes that distinction explicit in the time count.

The angular orb allows a tolerance around the chosen angle. Widening it generally admits more observations and changes the question being tested. One observation per episode avoids counting every consecutive matching bar as a separate occurrence.

Before running, write down the target, orb, sampling, return definition, and evaluation dates. Keep these unchanged while reviewing the first result.

Step 4

Run the study and inspect occurrences

Select Run Gann backtest. Read warnings and available coverage before interpreting the summary. Check occurrence count, average and median returns, bullish/bearish shares, control comparisons, and uncertainty where shown.

A close-to-close return of $100 to $101 is (101 ÷ 100 − 1) × 100 = 1%. This example explains the arithmetic only. It is not an actual result, a net trading return, or proof of a profitable strategy.

  1. Inspect several occurrence rows, including negative outcomes. Compare their dates with the Daily chart highlights.
  2. Read the measurement horizon in the result. Do not substitute an arbitrary entry or exit from the chart.
  3. Check whether the occurrence table is limited while the aggregate covers more eligible observations.
  4. Use Clear chart highlights when you finish inspecting the overlay.

Step 5

Reserve a later period for validation

Open Advanced market, sampling and validation filters. Set Train / test split and choose Training only while developing the condition. After freezing the settings, switch to Testing only and rerun.

Compare sample sizes as well as averages. A large percentage based on a handful of observations is fragile. Repeatedly changing the rule after viewing testing results turns that period into another development sample.

The tool reports conditional historical outcomes. It does not turn these observations into a complete execution simulation with position sizing, fees, slippage, or an equity curve.

Step 6

Try an exposure-adjusted geometry scan

Switch to Active Geometry. Keep the market, history, anchor, and translation fixed. Choose an Outcome, Angular bin, and Move threshold; Turning point also uses a Turning window. Select Scan active geometry.

Read the number of eligible observations in each bin before its event rate. If a hypothetical bin has 20 events in 100 eligible observations, its event rate is 20%. Against a 10% baseline, the lift is 2×. Those numbers are an arithmetic illustration, not a TimeMatrix study result.

Compare lift with exposure, uncertainty, and adjusted significance. Scanning many bins creates more opportunities for chance patterns. Active Geometry produces an aggregate scan; it does not create the Condition Study chart overlay.

Save a member filter template with a descriptive name after the setup is stable. A template preserves filters; record the result date and data coverage separately.

Common questions

Why are there no occurrences?

Check retained Daily coverage, pivot confirmation, target angle, orb, and advanced restrictions. Relax one condition at a time and record the changed hypothesis.

Does switching to an intraday chart make this intraday testing?

No. This tool tests Daily history. Keep the chart on Daily when inspecting its highlighted occurrences.

Should I pick the highest-lift bin?

A maximum selected from many bins needs independent validation. Review exposure and adjusted significance, then test a fixed hypothesis on a separate period.