Strategy Analytics

Cocoa — Moving Average & Risk Layers

The same sections as the Corn MA page, on Cocoa (CC=F). Volatility ranges are calibrated to this market rather than copied from Corn.

Instrument
Cocoa (CC=F)
History
2000-01-03 → 2026-07-29
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 16.5%, p10 18.8%, p25 22.9%, p50 29.1%, p75 37.0%, p90 48.6%, p95 59.4%. 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 6,663 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-3.8%-64.3%-88.8%-0.15-0.20-0.0496-16.9%-99.3%-99.7%-0.49-0.69-0.17192
23-1.7%-35.7%-87.2%-0.06-0.09-0.0281-13.2%-97.7%-99.2%-0.39-0.55-0.13162
26-1.6%-34.6%-86.6%-0.06-0.08-0.0271-13.2%-97.6%-99.3%-0.39-0.55-0.13142
29-3.6%-62.2%-86.8%-0.13-0.19-0.0466-16.9%-99.3%-99.6%-0.49-0.68-0.17132
32-4.0%-66.5%-89.1%-0.15-0.21-0.0562-17.7%-99.4%-99.7%-0.52-0.71-0.18124
35-1.6%-34.2%-85.1%-0.06-0.08-0.0255-14.0%-98.1%-99.4%-0.41-0.57-0.14110
38-0.8%-19.0%-78.8%-0.03-0.04-0.0150-11.9%-96.5%-98.7%-0.35-0.48-0.1299
41-0.8%-18.8%-84.6%-0.03-0.04-0.0146-11.7%-96.3%-98.8%-0.34-0.47-0.1291
44-0.1%-3.3%-82.5%-0.00-0.01-0.0042-9.8%-93.5%-98.2%-0.29-0.40-0.1083
470.0%0.6%-83.3%0.000.000.0038-9.7%-93.3%-98.4%-0.29-0.40-0.1075
50-0.1%-1.5%-81.9%-0.00-0.00-0.0036-9.8%-93.5%-98.1%-0.30-0.40-0.1071
53-0.7%-16.4%-84.1%-0.03-0.04-0.0135-11.1%-95.5%-98.6%-0.33-0.45-0.1169
56-1.4%-31.9%-84.8%-0.05-0.07-0.0233-12.7%-97.2%-99.1%-0.38-0.51-0.1365
59-2.0%-41.4%-84.8%-0.08-0.10-0.0232-13.7%-98.0%-99.2%-0.41-0.55-0.1463
62-2.7%-52.0%-85.6%-0.10-0.14-0.0332-15.5%-98.9%-99.5%-0.46-0.62-0.1663
65-1.9%-39.1%-80.3%-0.07-0.10-0.0230-13.6%-97.9%-99.1%-0.40-0.54-0.1459
680.1%2.8%-75.2%0.000.010.0027-10.5%-94.7%-98.0%-0.31-0.42-0.1154
712.4%87.1%-67.2%0.090.130.0425-5.7%-78.9%-94.1%-0.17-0.23-0.0650
744.9%250.6%-63.8%0.190.260.0821-0.8%-19.3%-85.8%-0.02-0.03-0.0142
774.4%211.0%-57.9%0.170.240.0821-1.5%-33.8%-86.9%-0.05-0.06-0.0242
804.3%201.9%-58.4%0.170.230.0721-1.8%-38.7%-87.3%-0.06-0.08-0.0242
853.3%138.9%-61.8%0.130.180.0521-3.6%-62.1%-88.5%-0.11-0.15-0.0442
904.2%194.7%-58.4%0.160.220.0719-1.9%-39.1%-82.6%-0.06-0.08-0.0238
953.4%142.4%-60.0%0.130.180.0619-3.8%-63.6%-85.8%-0.11-0.16-0.0438
1003.2%129.7%-60.0%0.120.170.0519-4.2%-67.8%-87.1%-0.13-0.18-0.0538

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-4.2%-67.7%-94.4%-0.16-0.22-0.04302-17.6%-99.4%-99.8%-0.52-0.72-0.18604
33-1.0%-24.0%-86.2%-0.04-0.06-0.01258-11.8%-96.4%-99.0%-0.35-0.49-0.12516
360.9%26.5%-83.6%0.030.050.01263-8.9%-91.5%-98.5%-0.27-0.37-0.09526
391.2%35.8%-74.2%0.040.060.02241-8.3%-89.9%-95.8%-0.25-0.34-0.09482
421.9%66.4%-68.2%0.070.100.03233-6.9%-84.7%-94.4%-0.21-0.29-0.07466
451.0%29.2%-81.2%0.040.050.01234-8.7%-91.1%-98.0%-0.26-0.37-0.09468
480.5%14.5%-81.5%0.020.030.01243-9.0%-91.7%-98.7%-0.27-0.38-0.09485
51-1.8%-38.1%-88.5%-0.07-0.10-0.02229-13.3%-97.7%-99.5%-0.40-0.55-0.13457
54-0.8%-18.2%-82.1%-0.03-0.04-0.01218-11.1%-95.6%-98.3%-0.33-0.46-0.11435
570.3%7.3%-80.4%0.010.010.00220-9.3%-92.4%-97.6%-0.28-0.39-0.10439
601.3%39.0%-72.3%0.050.070.02207-8.0%-89.1%-95.8%-0.24-0.33-0.08414
63-1.8%-38.6%-81.4%-0.07-0.10-0.02202-12.9%-97.4%-98.7%-0.39-0.53-0.13404
66-2.1%-42.9%-84.0%-0.08-0.11-0.02198-13.8%-98.1%-99.1%-0.42-0.56-0.14396
69-4.1%-66.7%-90.7%-0.16-0.21-0.04203-17.6%-99.4%-99.8%-0.53-0.71-0.18406
70-3.0%-55.4%-90.7%-0.12-0.16-0.03218-15.5%-98.8%-99.7%-0.47-0.63-0.16436
752.6%96.3%-69.1%0.100.140.04182-4.6%-71.3%-92.6%-0.14-0.19-0.05364
803.1%124.3%-71.7%0.120.160.04152-4.8%-72.8%-93.2%-0.15-0.20-0.05304
851.3%41.9%-71.7%0.050.070.02184-8.0%-89.1%-96.8%-0.25-0.34-0.08368
904.5%221.8%-65.7%0.170.240.07170-1.8%-38.2%-86.0%-0.06-0.08-0.02340
953.1%122.4%-67.2%0.120.160.05170-3.9%-65.0%-91.1%-0.12-0.17-0.04340
1003.4%139.8%-75.6%0.130.180.04152-3.0%-55.8%-94.4%-0.09-0.13-0.03303
1052.9%112.1%-75.2%0.110.160.04157-3.9%-64.7%-96.0%-0.12-0.17-0.04313
110-1.6%-34.0%-89.6%-0.06-0.08-0.02163-11.7%-96.2%-99.3%-0.36-0.50-0.12325
115-1.1%-24.7%-90.2%-0.04-0.06-0.01188-11.0%-95.4%-99.4%-0.34-0.48-0.11375
1200.5%15.4%-71.3%0.020.030.01157-7.8%-88.4%-96.0%-0.24-0.34-0.08314

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-4.2%-68.0%-88.4%-0.18-0.24-0.0582-14.6%-98.4%-99.5%-0.48-0.65-0.15162
23-2.5%-49.0%-87.2%-0.10-0.14-0.0371-11.9%-96.5%-99.1%-0.39-0.53-0.12140
26-2.4%-47.8%-87.1%-0.10-0.14-0.0364-12.3%-96.9%-99.2%-0.40-0.55-0.12126
29-4.2%-67.6%-88.3%-0.17-0.23-0.0561-15.1%-98.7%-99.4%-0.48-0.65-0.15119
32-4.7%-72.1%-90.6%-0.19-0.25-0.0559-16.1%-99.0%-99.6%-0.51-0.69-0.16114
35-3.0%-55.8%-86.1%-0.12-0.17-0.0453-13.9%-98.1%-99.3%-0.44-0.60-0.14103
38-2.6%-49.7%-81.9%-0.10-0.14-0.0349-11.0%-95.5%-98.2%-0.35-0.48-0.1193
41-2.0%-41.8%-85.8%-0.08-0.11-0.0245-10.3%-94.3%-98.4%-0.32-0.44-0.1086
44-1.3%-28.8%-83.4%-0.05-0.07-0.0241-10.7%-95.0%-98.4%-0.32-0.44-0.1180
47-1.1%-24.5%-83.9%-0.04-0.05-0.0138-10.7%-95.0%-98.7%-0.32-0.44-0.1174
50-1.1%-26.1%-82.5%-0.04-0.06-0.0136-10.5%-94.7%-98.3%-0.32-0.43-0.1170
53-1.7%-37.3%-84.7%-0.07-0.09-0.0235-11.8%-96.3%-98.7%-0.36-0.48-0.1268
56-2.3%-46.3%-85.3%-0.09-0.12-0.0333-13.2%-97.6%-99.2%-0.40-0.53-0.1364
59-2.6%-49.7%-85.4%-0.10-0.13-0.0332-13.8%-98.0%-99.2%-0.41-0.56-0.1462
62-3.3%-58.8%-86.1%-0.13-0.17-0.0432-15.6%-98.9%-99.6%-0.46-0.62-0.1662
65-2.2%-44.4%-80.9%-0.08-0.11-0.0330-13.5%-97.8%-99.1%-0.40-0.54-0.1458
68-0.1%-2.9%-72.7%-0.00-0.01-0.0027-10.3%-94.3%-98.0%-0.31-0.42-0.1053
712.2%76.8%-67.2%0.080.120.0325-5.4%-77.2%-94.1%-0.16-0.22-0.0649
744.6%231.2%-57.9%0.180.250.0821-1.0%-23.8%-85.8%-0.03-0.04-0.0142
774.4%211.0%-57.9%0.170.240.0821-1.5%-33.8%-86.9%-0.05-0.06-0.0242
804.3%201.9%-58.4%0.170.230.0721-1.8%-38.7%-87.3%-0.06-0.08-0.0242
853.3%138.9%-61.8%0.130.180.0521-3.6%-62.1%-88.5%-0.11-0.15-0.0442
904.2%194.7%-58.4%0.160.220.0719-1.9%-39.1%-82.6%-0.06-0.08-0.0238
953.4%142.4%-60.0%0.130.180.0619-3.8%-63.6%-85.8%-0.11-0.16-0.0438
1003.2%129.7%-60.0%0.120.170.0519-4.2%-67.8%-87.1%-0.13-0.18-0.0538

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…

13. Reset / No Reset

Section 7's trailing stop with the client's 2026-08-04 question on top: after a stop-out, does re-entering beat staying out? No Reset shuts that side until the SMA slope has flipped away and back, so a market that keeps falling leaves the saved profit saved. Reset waits for a new high — the side re-opens when the market closes back above the stopped-out trade's highest high, at a worse price than the exit, so that a reversal is not missed. Immediate is what section 7 itself does, since its entry signal is a state and not an event: the next bar re-enters while the slope still points the same way. Both directions are swept, so System A only resets long and System B resets whichever side was stopped out.

Loading reset-rule grid…

Source: Yahoo Finance daily OHLC, full available history. Generated 2026-07-30 08:41:49 UTC.