CTA Trend Following

Cocoa — Concentration, Ensemble & The Twelve Sections

Kaufman's robust-region method on Cocoa (CC=F), then the same twelve sections as the market card — all of it on data ending 2015-12-31.

As of 2015-12-31 — the last ten years are withheld. Every number on this tab is computed on bars up to and including 2015-12-31, and nothing after that date is read by any calculation here. The cut happens on the raw price frame before any indicator touches it, so no parameter on this tab was chosen with knowledge of what came next. This market's window is 2000-01-03 → 2015-12-31 (4,006 daily bars). The withheld data still exists and has not been touched — it is the out-of-sample test for whatever comes out of this work, and it is only worth having once the strategies are fixed.
Funded entries
SMA 90, SMA 95, SMA 100
Direction
System A — Long Only
Plateau
SMA 90–100 (3/25 tested)
Efficiency ratio (20d)
0.235
Narrow plateau — treat with caution. The good region covers only 3 of 25 tested periods (12%), below the 20% bar this tab uses to call a region broad. The entries are necessarily close together, so they will move together — the mean pairwise correlation between them is 0.92. This market is excluded from the funded book on the index page.

K1. Where The Results Concentrate

Kaufman's method: rather than take the best of the 50 base cells, or their median, find the contiguous stretch of SMA periods that all work. The plateau is the region holding at or above 70% of the smoothed peak. Its width is the honest measure of how much room for error this market gives you.

Sortino By SMA Period — Where The Results Concentrate

Bars are each tested period on its own. The line averages each period with the tested period either side (3-point neighbourhood), which is what the selection reads. The shaded band is the plateau; the outlined bars are the funded entries.

Plateau
SMA 90–100
Width
3 of 25 tested (12%)
Periods in profit
40% of 25
Best / median / worst
0.29 / -0.08 / -0.34

Why this direction

SystemPlateau meanCoveragePeriods in profit
System A — Long Only0.19712%40%
System B — Long & Short0.0000%0%

The direction is chosen on the plateau, not on the best cell. A direction that covers at least 20% of the grid wins over one that scores higher across three adjacent periods, because that narrow high score is exactly the fluke this method exists to avoid.

Speed preference vs efficiency ratio

Speed bandMean sortino
short(SMA 30–54)-0.138
medium(SMA 55–80)-0.018
long(SMA 81–120)0.045

Efficiency ratio over this window: 10d 0.345, 20d 0.235, 60d 0.115. A high ER means price travels in straighter lines, which should favour faster SMAs; a low ER means the path is noisy and a slower SMA should do better. The index page tests that across all markets rather than asserting it here.

K2. The Funded Ensemble — 3 Entries, Equal Weight

Each selected period is funded with 33% of the market's capital and runs as its own base system. They are deliberately spread across the plateau: adjacent periods would be one system counted several times, which is the overfit this is meant to avoid.

EntryBandWeightCAGRMax DDSharpeSortinoCalmarTradesWin rate
SMA 90long33.3%4.9%-41.4%0.210.290.1210531.4%
SMA 95long33.3%4.1%-48.6%0.170.240.089834.7%
SMA 100long33.3%3.3%-59.8%0.140.200.059735.1%
Ensemble (equal weight)100.0%4.2%-48.8%0.190.260.09300
Mean pairwise correlation between the members' daily returns is 0.919. The ensemble's Sortino is +0.016 against the average of its members, and its drawdown +0.011 — that difference is the combination working (or not), rather than any member being good.

The ensemble against the three readings it replaces

On sortino, the tab's selection metric.

ReadingsortinoEnsemble minus thisWhat it is
Ensemble0.2613 periods from the plateau, equal weight.
Buy & hold0.410-0.148Holding the future outright over the same window.
Median cell-0.200+0.461The middle of all 50 cells — what picking a parameter at random gets you. This is the reading the earlier cross-market tables used.
Best single cell — SMA 900.295-0.033The luckiest point on the surface. In sample it must win; the question is by how little, because whatever it wins by is what you are betting survives.

Ensemble Equity — Month-End Cumulative Return

Each funded entry gets 33% of the market's capital and runs independently. Everything stops on 2015-12-31.

Below: the same twelve sections as the market card, rebuilt in-sample. Identical code, identical grids — only the window differs. Use them to see what each risk layer would have done to the funded periods above. Section 13 (Reset / No Reset, added 2026-08-04) is deliberately not here: the client asked for it on the markets “koja imaju sve podatke”, and this tab is the one that does not. The full-history card for Cocoa is here — do not read it while choosing parameters.
Instrument
Cocoa (CC=F)
History
2000-01-03 → 2015-12-31
Trading Days / Year
252
Volatility Grid
20–60% (step 5)
How this market is calibrated. The volatility factor grid is 20–60%, derived from p10-p90 of annualized 20-day volatility, rounded to a nice step on this market's own history — not Corn's 20–60%, which would be meaningless here. Annualized 20-day volatility percentiles: p5 15.3%, p10 17.6%, p25 22.0%, p50 28.6%, p75 36.0%, p90 43.7%, p95 47.7%. Metrics annualize with 252 trading days per year.

1. Moving Average Optimization

SMA periods 30, 33, 36, 39, 42, 45, 48, 51, 54, 57, 60, 63, 66, 69, 70, 75, 80, 85, 90, 95, 100, 105, 110, 115, 120. Entry when the SMA turns up, exit when it turns down (System A flat, System B reverses short). Returns are percentages of capital on a compounding equity curve.

Total Return By SMA Period

System A (Long Only) vs System B (Long & Short, stop-and-reverse on the SMA slope). Percentage return on a compounding equity curve.

2. Risk Metrics — Base Systems

CAGR, total return, max drawdown, Sharpe and trade count for every base variant of both systems over 4,006 daily bars. System A = Long Only, System B = Long & Short (stop-and-reverse).

Donchian Breakout — Pure Channel

Lookback N grid 20–80 step 3, then 85, 90, 95, 100. Exit on the opposite N-period band break.

NA: CAGRA: Total ReturnA: Max DDA: SharpeA: SortinoA: CalmarA: TradesB: CAGRB: Total ReturnB: Max DDB: SharpeB: SortinoB: CalmarB: Trades
20-5.7%-60.3%-78.3%-0.24-0.33-0.0759-20.6%-97.5%-98.3%-0.67-0.91-0.21119
23-3.2%-40.3%-69.9%-0.13-0.18-0.0550-16.5%-94.3%-95.1%-0.54-0.74-0.17101
26-3.6%-43.9%-67.1%-0.15-0.21-0.0544-17.4%-95.2%-95.4%-0.56-0.77-0.1889
29-5.3%-58.1%-72.4%-0.22-0.30-0.0743-20.6%-97.5%-97.6%-0.67-0.91-0.2187
32-6.6%-66.0%-77.1%-0.28-0.38-0.0941-22.8%-98.4%-98.5%-0.74-1.01-0.2382
35-5.8%-61.5%-73.9%-0.24-0.34-0.0837-21.6%-97.9%-98.0%-0.70-0.95-0.2274
38-5.1%-56.5%-71.7%-0.21-0.30-0.0734-19.2%-96.6%-96.9%-0.62-0.85-0.2067
41-3.2%-40.6%-73.8%-0.13-0.19-0.0430-15.8%-93.6%-95.3%-0.51-0.71-0.1759
44-1.8%-25.1%-70.3%-0.07-0.10-0.0327-13.2%-89.5%-92.0%-0.43-0.60-0.1453
47-1.0%-14.8%-74.7%-0.04-0.06-0.0123-12.1%-87.0%-94.5%-0.40-0.54-0.1345
50-0.5%-8.2%-67.4%-0.02-0.03-0.0121-11.0%-84.2%-92.6%-0.37-0.50-0.1241
53-1.0%-14.1%-69.4%-0.04-0.06-0.0120-11.8%-86.3%-94.3%-0.39-0.53-0.1239
56-1.4%-20.5%-71.5%-0.06-0.08-0.0219-12.7%-88.4%-95.1%-0.42-0.57-0.1337
59-1.3%-19.3%-71.5%-0.06-0.08-0.0218-12.6%-88.2%-94.5%-0.42-0.56-0.1335
62-1.6%-22.3%-72.2%-0.07-0.09-0.0218-13.1%-89.3%-94.8%-0.43-0.59-0.1435
650.9%14.4%-64.8%0.040.050.0116-8.2%-74.4%-88.3%-0.27-0.37-0.0931
683.3%66.9%-57.9%0.140.200.0614-4.6%-52.9%-82.4%-0.15-0.21-0.0628
714.7%107.1%-47.1%0.200.280.1013-1.2%-17.6%-68.4%-0.04-0.06-0.0226
747.0%193.6%-40.4%0.310.430.17113.3%68.5%-51.7%0.120.160.0622
776.8%182.6%-40.4%0.290.420.17112.8%55.6%-54.6%0.100.140.0522
806.7%180.0%-40.4%0.290.410.17112.6%51.1%-54.6%0.090.130.0522
855.7%140.8%-41.0%0.260.370.14110.5%8.2%-62.1%0.020.020.0122
904.9%115.3%-42.9%0.230.320.1211-1.0%-14.3%-63.3%-0.03-0.05-0.0222
954.3%94.1%-39.1%0.200.280.1111-2.4%-31.8%-63.4%-0.08-0.12-0.0422
1004.0%87.6%-39.7%0.180.260.1011-2.8%-36.4%-65.0%-0.10-0.14-0.0422

Moving Average — SMA Slope

SMA period grid 30→70 step 3, then 70→120 step 5. Exit/reverse when the SMA slope flips.

SMAA: CAGRA: Total ReturnA: Max DDA: SharpeA: SortinoA: CalmarA: TradesB: CAGRB: Total ReturnB: Max DDB: SharpeB: SortinoB: CalmarB: Trades
30-5.6%-60.1%-82.3%-0.23-0.32-0.07193-20.5%-97.4%-98.0%-0.68-0.91-0.21387
33-1.4%-20.2%-65.9%-0.06-0.08-0.02154-12.9%-88.8%-92.1%-0.43-0.59-0.14309
36-2.5%-33.2%-63.5%-0.11-0.15-0.04159-15.4%-92.9%-93.3%-0.51-0.70-0.16318
390.5%8.7%-58.7%0.020.030.01139-10.0%-81.4%-83.7%-0.34-0.47-0.12279
420.5%7.6%-56.1%0.020.030.01142-9.8%-80.4%-81.5%-0.33-0.45-0.12285
45-0.8%-11.6%-63.4%-0.03-0.05-0.01147-11.8%-86.5%-90.0%-0.40-0.55-0.13294
48-4.3%-50.4%-72.0%-0.18-0.25-0.06151-17.7%-95.4%-95.9%-0.59-0.80-0.18301
51-5.9%-61.8%-76.9%-0.25-0.34-0.08142-20.6%-97.4%-97.7%-0.69-0.92-0.21283
54-1.7%-24.4%-68.2%-0.07-0.10-0.03138-13.4%-89.9%-91.7%-0.45-0.61-0.15275
57-1.6%-22.1%-64.2%-0.07-0.09-0.02145-13.2%-89.4%-90.5%-0.44-0.60-0.15289
601.4%25.6%-65.6%0.060.090.02131-7.8%-72.3%-86.1%-0.26-0.36-0.09262
63-1.7%-24.3%-73.0%-0.07-0.10-0.02130-13.4%-89.8%-93.6%-0.46-0.62-0.14260
660.1%1.4%-71.2%0.000.010.00119-9.8%-80.7%-89.1%-0.33-0.45-0.11239
69-2.8%-36.1%-79.0%-0.12-0.16-0.04118-15.2%-92.7%-96.1%-0.52-0.69-0.16237
70-3.2%-40.3%-79.2%-0.14-0.19-0.04135-16.0%-93.7%-96.0%-0.54-0.72-0.17271
751.7%30.6%-59.4%0.070.100.03110-6.2%-63.9%-84.9%-0.21-0.29-0.07221
803.6%75.1%-45.9%0.150.210.0889-3.6%-44.0%-72.5%-0.12-0.17-0.05179
85-0.3%-4.3%-61.0%-0.01-0.02-0.00110-10.8%-83.8%-90.3%-0.37-0.51-0.12220
904.9%114.1%-41.4%0.210.290.12105-0.9%-12.9%-57.0%-0.03-0.04-0.02210
954.1%89.3%-48.6%0.170.240.0898-2.3%-31.3%-70.0%-0.08-0.11-0.03196
1003.3%66.7%-59.8%0.140.200.0597-3.3%-41.7%-79.7%-0.12-0.16-0.04193
1051.3%23.3%-58.4%0.060.080.0298-7.3%-70.2%-85.7%-0.25-0.35-0.09195
110-2.5%-32.7%-75.2%-0.11-0.15-0.03105-13.8%-90.5%-94.7%-0.47-0.64-0.15209
115-3.6%-44.5%-78.2%-0.16-0.21-0.05114-16.0%-93.7%-95.9%-0.55-0.74-0.17228
120-1.3%-18.7%-65.2%-0.06-0.08-0.0295-12.3%-87.5%-92.9%-0.42-0.57-0.13191

2b. EMA-170 Direction Filter On The Donchian Breakout

Client 2026-07-30. The same Donchian channel and N grid as section 2, with one extra precondition: a long may only open while the 170-period EMA is rising, a short only while it is falling. The band break is still required on top, so the filter only removes trades. Exits are untouched. The unfiltered Donchian table in section 2 is the baseline — read them side by side.

Donchian gated by the EMA-170 direction

Same lookback grid as section 2. Compare row for row against the unfiltered Donchian table above.

NA: CAGRA: Total ReturnA: Max DDA: SharpeA: SortinoA: CalmarA: TradesB: CAGRB: Total ReturnB: Max DDB: SharpeB: SortinoB: CalmarB: Trades
20-5.7%-60.8%-76.1%-0.26-0.35-0.0851-18.6%-96.2%-96.9%-0.65-0.88-0.19100
23-3.9%-46.5%-72.3%-0.17-0.23-0.0544-14.9%-92.4%-93.4%-0.53-0.72-0.1686
26-4.5%-51.6%-70.9%-0.20-0.27-0.0640-16.4%-94.2%-94.5%-0.57-0.78-0.1778
29-6.2%-64.1%-76.2%-0.27-0.37-0.0840-19.3%-96.7%-96.9%-0.67-0.91-0.2077
32-7.8%-72.5%-81.4%-0.34-0.46-0.1040-21.8%-98.0%-98.1%-0.76-1.01-0.2275
35-6.7%-66.8%-77.4%-0.29-0.39-0.0936-20.5%-97.4%-97.5%-0.70-0.95-0.2169
38-5.7%-60.4%-75.4%-0.25-0.34-0.0833-17.3%-95.2%-95.7%-0.59-0.80-0.1862
41-3.6%-43.7%-75.2%-0.15-0.21-0.0529-13.9%-90.8%-94.3%-0.47-0.64-0.1555
44-2.0%-27.4%-73.2%-0.08-0.12-0.0326-13.2%-89.4%-93.3%-0.43-0.60-0.1450
47-1.2%-17.8%-75.6%-0.05-0.07-0.0223-12.2%-87.5%-95.4%-0.41-0.55-0.1344
50-0.8%-11.4%-68.6%-0.03-0.05-0.0121-10.7%-83.3%-93.2%-0.36-0.49-0.1140
53-1.2%-17.1%-70.5%-0.05-0.07-0.0220-11.5%-85.6%-94.8%-0.38-0.52-0.1238
56-1.6%-23.2%-72.5%-0.07-0.10-0.0219-12.4%-87.7%-95.5%-0.41-0.55-0.1336
59-1.6%-22.1%-72.5%-0.07-0.09-0.0218-12.0%-87.0%-94.7%-0.40-0.54-0.1334
62-1.8%-25.0%-73.1%-0.08-0.11-0.0218-12.6%-88.2%-95.0%-0.41-0.56-0.1334
650.6%10.4%-66.0%0.030.040.0116-7.6%-71.7%-88.7%-0.25-0.34-0.0930
683.3%66.9%-57.9%0.140.200.0614-3.8%-46.1%-82.4%-0.13-0.18-0.0527
714.7%107.1%-47.1%0.200.280.1013-0.4%-5.8%-68.4%-0.01-0.02-0.0125
747.0%193.6%-40.4%0.310.430.17113.3%68.5%-51.7%0.120.160.0622
776.8%182.6%-40.4%0.290.420.17112.8%55.6%-54.6%0.100.140.0522
806.7%180.0%-40.4%0.290.410.17112.6%51.1%-54.6%0.090.130.0522
855.7%140.8%-41.0%0.260.370.14110.5%8.2%-62.1%0.020.020.0122
904.9%115.3%-42.9%0.230.320.1211-1.0%-14.3%-63.3%-0.03-0.05-0.0222
954.3%94.1%-39.1%0.200.280.1111-2.4%-31.8%-63.4%-0.08-0.12-0.0422
1004.0%87.6%-39.7%0.180.260.1011-2.8%-36.4%-65.0%-0.10-0.14-0.0422

3. Equity Curve Explorer

Pick a period, direction and ATR profit target (or Base) to see its month-end cumulative return, starting at 0%.

Every ATR profit target is overlaid against the base system.

Loading equity curves…

4. Profit Factor Sweep

An ATR profit target swept 1.5 → 10.0 (step 0.5) for every variant. Target = entry ± PF × ATR₂₀, frozen at entry.

Loading profit factor grid…

5. Volatility-Adjusted Profit Target (Dynamic)

The same sweep as section 4, but the target is recomputed each day from the current ATR instead of frozen at entry, so it breathes with volatility while staying anchored to the entry price.

Loading profit factor grid…

6. Stop Loss Sweep

A protective ATR stop swept 1.5 → 10.0 (step 0.5). Stop = entry ∓ SL × ATR₂₀, no take-profit; the position still reverses on the opposite SMA-slope signal if the stop is not hit first.

Loading stop loss factor grid…

7. ATR Trailing Stop Sweep

A trailing ATR stop, distinct from section 6: stop = best price reached since entry ∓ f × ATR₂₀, recomputed daily. It ratchets in the trade's favour and retreats when volatility rises. Swept 1.0 → 10.0 (step 0.5).

Loading trailing factor grid…

8. Stop Loss + Time Stop — Equity Curves

The full strategy: SMA entry, ATR stop loss, and a time stop that exits a trade still not in profit 5/10/15/20/30/40 days after entry. Split into one file per SMA period so this loads in a fraction of the Corn page's payload.

Loading equity curves…

9. Time Stop Only — Equity Curves

The time stop judged on its own, with no ATR stop, against the plain SMA baseline. Each line exits a trade still underwater 5/10/15/20/30/40 days after entry.

Loading equity curves…

10. Volatility Filter Sweep

Volatility is the annualized standard deviation of daily returns — the standard deviation of the last 20 daily returns × √252. The factor is a maximum: a new position opens only on a day at or below it, so the strategy stands aside in turbulence. An open trade is never closed by the filter.

Loading volatility factor grid…

11. Volatility Filter + ATR Trailing Stop

The first combined risk layer: the section-10 filter and the section-7 trailing stop in one strategy, swept together across every combination. The last column is section 7 on its own, so you can read left to right whether adding the filter helps.

Loading the volatility × trailing-stop grid…

12. Volatility Regime Switch

The same threshold as section 10, but acting as a regime switch: above it the open position is closed at that day's close, nothing opens while volatility stays high, and the position re-opens on the first calm day the SMA slope still points the right way — no fresh signal required.

Loading volatility factor grid…

Source: Yahoo Finance daily OHLC, truncated at 2015-12-31 — nothing after that date was read by any calculation on this page. Generated 2026-08-03 05:31:57 UTC.