Strategy Analytics

Coffee — Moving Average & Risk Layers

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

1.00% of current equity at risk per trade · contracts = equity × 1.00% ÷ (20-day ATR × point value), rounded down to whole contracts · $1,000,000 start, profits reinvested

Instrument
Coffee (KC=F)
History
1978-12-14 → 2026-09-22
Trading Days / Year
252
Volatility Grid
20–60% (step 5)
All results are net of trading costs. Every round turn (entry + exit) of one contract pays $5.00 commission + 1.5 ticks of slippage (1.5 × $18.75) = $33.13, i.e. 0.08833 price points at $375 per point, times the trade's contract count. Half is charged on entry and half on exit (a position still open at the end has paid only its entry half), so it weighs more on short, frequent trades. Profit Factor is gross profit ÷ gross loss over the trades the account took (not the ATR target multiple sections 4–5 call “profit factor”); Avg Trade and Avg Loss are net account dollars at the chosen sizing. Contract rolls are not charged as extra round turns.
Position sizing: ATR risk on a compounding $1,000,000 account, whole contracts. Every trade buys equity × risk ÷ (20-day ATR at entry × point value) contracts, rounded down to a whole contract, where equity is what the account holds when the trade opens — so profits are reinvested and losses shrink the next position. A trade that rounds down to zero contracts is not taken; the account stays flat through it. Risk is the setting at the top of the page, 0.25% to 5% (default 1%): it sets the position size from one ATR, while the exit is whatever the strategy's own rules say (the opposite signal, or the ATR stop of the sections that have one). Below 5% the same setting offers the sizing used until 14 October 2026 — the whole account in the contracts' notional value, compounding. Every CAGR, drawdown, ratio, trade count, average trade and equity curve follows the setting. Sharpe and Sortino are the annualized mean daily return over its volatility and downside deviation. Points per contract (total profit, long/short split) do not depend on the sizing. Buy-and-hold is a plain, unleveraged holding of the price.
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 14.7%, p10 17.6%, p25 23.8%, p50 29.7%, p75 37.6%, p90 47.5%, p95 56.0%. Metrics annualize with 252 trading days per year. A cell at −100% CAGR means the $1,000,000 account was wiped out at the chosen sizing: it went to zero, and the account stops there. History from 1978-12-14: this card now runs on Norgate's Panama-adjusted series, which for most markets starts in 1978–1983 — years or decades before the feeds this site used earlier (1998–2019, depending on the market). Trend results include the 1980s–90s trends and buy-and-hold includes decades of roll cost, so neither is comparable to figures from those earlier feeds.

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 on the $1,000,000 account, every trade sized as chosen above, profits reinvested.

Total Return By SMA Period

System A (Long Only) vs System B (Long & Short, stop-and-reverse on the SMA slope). Total return on the $1,000,000 account at the chosen sizing.

2. Risk Metrics — Base Systems

CAGR, total return, max drawdown, Sharpe, trade count, profit factor and the average trade / average losing trade for every base variant of both systems over 11,982 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: TradesA: Profit FactorA: Avg TradeA: Avg LossB: CAGRB: Total ReturnB: Max DDB: SharpeB: SortinoB: CalmarB: TradesB: Profit FactorB: Avg TradeB: Avg Loss
201.1%65.4%-71.6%0.150.220.011501.12$4,360−$54,0331.1%68.2%-80.5%0.150.220.013001.05$2,272−$74,303
231.3%81.7%-68.1%0.170.250.021271.18$6,432−$50,4771.7%123.5%-72.3%0.190.290.022541.12$4,863−$65,414
261.5%107.4%-64.4%0.190.290.021141.23$9,417−$57,2251.8%136.7%-71.7%0.200.300.032281.13$5,996−$71,813
291.7%126.1%-65.1%0.200.310.031001.27$12,610−$64,9582.2%178.8%-71.8%0.220.340.032001.17$8,941−$82,706
321.7%127.8%-60.6%0.200.310.03911.31$14,040−$66,1052.3%190.9%-63.6%0.230.350.041821.21$10,490−$79,579
351.7%124.1%-61.7%0.200.300.03831.34$14,950−$63,6772.4%204.8%-64.5%0.230.350.041661.28$12,335−$72,973
381.9%146.2%-61.6%0.210.320.03761.42$19,231−$63,7952.3%192.9%-67.4%0.230.340.031521.30$12,687−$66,043
412.1%172.0%-61.4%0.230.350.03681.50$25,302−$68,7222.7%250.9%-69.9%0.250.380.041351.38$18,585−$76,715
442.4%209.2%-58.8%0.250.380.04621.61$33,736−$77,6003.4%387.3%-65.4%0.300.460.051231.52$31,484−$94,900
472.2%177.4%-60.9%0.230.360.04591.52$30,066−$79,4042.8%273.8%-69.9%0.260.400.041171.37$23,403−$99,276
502.2%182.2%-58.6%0.230.360.04541.51$33,740−$91,1562.8%278.8%-69.9%0.270.400.041071.31$26,053−$132,249
532.2%186.1%-57.5%0.240.360.04521.51$35,796−$95,7642.9%292.2%-68.0%0.270.400.041031.30$28,365−$143,591
562.1%163.4%-55.5%0.230.340.04501.48$32,673−$89,4012.9%295.5%-64.6%0.270.410.05991.33$29,845−$135,629
591.8%135.7%-55.8%0.210.310.03491.40$27,689−$92,0672.5%224.0%-64.5%0.240.360.04971.26$23,093−$131,071
622.0%158.9%-57.9%0.220.340.03471.46$33,809−$98,0392.6%236.8%-67.4%0.250.370.04931.28$25,466−$137,247
652.0%151.7%-58.0%0.220.330.03451.48$33,711−$96,0972.4%211.7%-68.0%0.240.350.04891.28$23,782−$127,088
681.6%116.9%-60.1%0.190.290.03451.39$25,968−$91,0081.9%139.5%-70.2%0.200.300.03891.21$15,672−$112,268
711.3%83.4%-60.6%0.170.250.02451.31$18,523−$82,0011.1%71.1%-71.4%0.150.220.02891.13$7,988−$88,842
741.4%92.4%-57.7%0.170.260.02421.35$21,999−$84,8211.6%113.4%-69.6%0.180.270.02831.20$13,667−$103,157
771.3%81.6%-56.9%0.160.250.02411.33$19,907−$83,1661.3%87.5%-69.7%0.160.240.02811.16$10,802−$98,639
801.6%116.5%-58.5%0.190.290.03381.50$30,654−$86,2021.8%134.6%-72.2%0.200.290.03751.25$17,951−$105,094
852.0%156.1%-55.6%0.220.340.04351.70$44,598−$92,8712.5%226.3%-63.9%0.250.370.04691.39$32,796−$128,885
901.7%124.4%-54.4%0.200.300.03351.61$35,528−$84,4372.0%158.7%-64.4%0.210.320.03691.31$22,994−$109,499
951.6%111.8%-52.6%0.190.290.03341.57$32,869−$84,9381.7%126.2%-63.1%0.190.280.03671.26$18,828−$108,232
1001.1%69.7%-52.7%0.150.230.02331.41$21,125−$77,6461.2%79.0%-64.8%0.160.230.02651.20$12,150−$93,084

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: TradesA: Profit FactorA: Avg TradeA: Avg LossB: CAGRB: Total ReturnB: Max DDB: SharpeB: SortinoB: CalmarB: TradesB: Profit FactorB: Avg TradeB: Avg Loss
301.3%87.8%-57.6%0.170.260.024691.15$1,872−$17,4791.5%107.7%-60.5%0.180.270.039391.09$1,147−$19,196
331.5%105.0%-70.5%0.190.290.024551.14$2,307−$21,9011.7%127.0%-77.5%0.190.290.029101.07$1,395−$28,860
361.5%101.3%-71.1%0.180.280.024261.16$2,377−$21,3211.5%106.7%-77.3%0.180.270.028521.08$1,253−$23,370
392.3%188.4%-62.8%0.240.380.044081.27$4,617−$23,9742.9%289.3%-68.9%0.270.410.048161.17$3,546−$30,103
422.0%156.3%-65.1%0.220.350.033831.26$4,081−$21,8512.7%248.2%-73.1%0.250.380.047661.20$3,240−$23,946
451.6%109.2%-63.7%0.190.290.023821.20$2,859−$20,7351.6%112.0%-71.7%0.180.270.027641.11$1,465−$20,283
482.6%233.8%-58.6%0.270.420.043451.34$6,777−$29,3123.6%439.6%-62.2%0.320.480.066901.23$6,371−$40,400
513.1%324.5%-45.7%0.310.490.073281.48$9,893−$30,5614.1%569.8%-48.2%0.350.530.086561.33$8,686−$40,121
543.6%448.0%-49.9%0.350.550.073061.57$14,640−$36,9604.9%884.4%-54.6%0.400.610.096121.40$14,451−$56,254
573.2%344.0%-47.8%0.320.490.073041.58$11,316−$27,7154.2%610.4%-49.2%0.360.540.096081.42$10,040−$37,126
602.2%187.5%-62.5%0.240.380.043261.31$5,752−$26,4772.6%236.3%-72.3%0.250.370.046511.19$3,629−$29,515
632.7%250.1%-57.1%0.280.430.053441.40$7,271−$25,3723.4%384.3%-63.2%0.300.450.056871.26$5,594−$32,144
663.2%356.6%-54.0%0.320.500.063061.48$11,653−$33,9324.2%618.4%-60.4%0.360.540.076111.29$10,120−$52,084
692.5%230.2%-52.7%0.260.410.053101.33$7,425−$31,0293.1%330.3%-54.3%0.280.430.066191.17$5,336−$43,516
702.4%211.6%-55.5%0.260.390.043041.34$6,960−$28,2622.9%281.7%-62.2%0.270.400.056071.19$4,641−$35,535
752.1%163.3%-58.4%0.230.350.042961.31$5,517−$24,3072.2%186.2%-67.9%0.230.340.035911.15$3,151−$29,697
803.2%353.2%-55.0%0.310.490.062561.64$13,798−$30,4214.1%581.7%-66.2%0.350.530.065111.40$11,383−$41,750
852.7%250.5%-59.8%0.280.430.042601.54$9,634−$24,7803.7%472.9%-71.8%0.330.490.055191.37$9,111−$33,849
902.7%254.7%-48.1%0.280.430.062341.64$10,885−$25,2743.8%502.3%-53.1%0.330.500.074671.48$10,756−$33,355
953.0%301.7%-45.4%0.310.470.072281.82$13,232−$24,4374.6%731.7%-49.1%0.390.580.094551.66$16,082−$36,978
1002.9%280.7%-50.6%0.290.450.062301.65$12,205−$27,7154.2%622.3%-58.9%0.360.540.074591.46$13,557−$44,779
1051.6%116.6%-55.1%0.200.300.031971.40$5,919−$21,9952.6%239.0%-64.9%0.260.380.043931.26$6,082−$34,174
1101.6%117.7%-55.4%0.200.300.032061.40$5,711−$21,4722.5%227.0%-66.1%0.250.370.044111.25$5,523−$32,028
1151.1%68.8%-55.7%0.150.230.022001.27$3,443−$17,7391.7%118.9%-60.4%0.190.280.033991.17$2,980−$25,701
1200.4%22.5%-62.1%0.090.140.012041.10$1,103−$14,8790.4%18.1%-71.9%0.090.130.004071.04$444−$17,583

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: TradesA: Profit FactorA: Avg TradeA: Avg LossB: CAGRB: Total ReturnB: Max DDB: SharpeB: SortinoB: CalmarB: TradesB: Profit FactorB: Avg TradeB: Avg Loss
201.3%81.1%-65.8%0.170.260.021131.19$7,177−$54,7251.9%145.5%-75.0%0.210.320.032371.12$6,141−$84,029
231.4%98.1%-63.4%0.190.280.02981.28$10,006−$53,2162.0%151.9%-70.8%0.220.320.032091.16$7,267−$73,047
261.6%116.9%-60.8%0.200.310.03921.33$12,703−$53,4371.9%142.9%-71.0%0.210.320.031941.16$7,368−$71,535
291.9%142.3%-58.7%0.220.340.03821.40$17,353−$59,6762.3%198.5%-67.6%0.240.360.031741.22$11,409−$79,863
321.8%133.7%-56.1%0.210.320.03761.40$17,594−$61,0062.7%260.3%-61.0%0.270.410.041581.30$16,477−$86,416
351.7%120.6%-59.6%0.200.300.03721.39$16,755−$58,2352.4%212.6%-64.2%0.240.370.041491.29$14,265−$75,469
382.0%154.8%-60.3%0.220.340.03661.49$23,457−$66,6952.3%195.7%-66.8%0.230.350.031391.31$14,080−$70,772
412.3%192.7%-59.6%0.240.370.04601.59$32,113−$72,1802.5%220.9%-69.2%0.240.370.041261.34$17,536−$78,429
442.4%207.4%-56.2%0.250.380.04561.67$37,028−$75,9143.1%325.1%-64.4%0.280.430.051171.48$27,785−$89,397
472.1%173.9%-57.3%0.230.360.04541.55$32,201−$76,4342.5%220.8%-67.9%0.240.370.041121.32$19,715−$92,807
502.0%155.9%-56.9%0.220.340.04521.48$29,985−$83,9132.4%210.6%-69.1%0.240.360.031051.26$20,061−$116,814
531.9%143.3%-56.4%0.210.330.03511.44$28,095−$85,6972.3%190.2%-67.7%0.230.340.031021.23$18,651−$119,070
561.7%126.4%-56.5%0.200.310.03501.39$25,287−$84,2792.3%194.8%-66.0%0.230.350.03991.25$19,674−$113,667
591.6%108.4%-56.5%0.190.280.03491.34$22,124−$85,7912.0%153.7%-64.9%0.210.310.03971.21$15,846−$109,298
621.8%129.8%-57.8%0.200.310.03471.41$27,621−$90,5972.0%155.7%-68.3%0.210.310.03931.21$16,740−$115,945
651.8%133.7%-57.9%0.210.310.03451.43$29,721−$93,9212.0%156.9%-67.9%0.210.310.03891.23$17,629−$113,742
681.6%110.5%-59.8%0.190.290.03451.37$24,567−$90,2901.5%105.9%-70.0%0.180.260.02891.17$11,902−$103,444
711.2%79.9%-60.6%0.160.240.02451.29$17,757−$82,0771.0%57.5%-71.1%0.140.200.01891.11$6,462−$87,445
741.3%88.2%-58.7%0.170.260.02421.33$21,006−$84,9931.4%91.0%-69.7%0.170.250.02831.16$10,961−$100,805
771.3%80.8%-56.9%0.160.250.02411.32$19,698−$83,4511.2%76.2%-69.4%0.150.230.02811.14$9,402−$95,988
801.6%111.5%-58.7%0.190.290.03381.49$29,357−$85,1221.7%125.4%-72.1%0.190.280.02751.23$16,714−$105,128
852.0%154.5%-54.8%0.220.340.04351.71$44,137−$90,7562.5%226.2%-63.7%0.250.370.04691.39$32,783−$128,959
901.7%121.9%-53.4%0.200.300.03351.61$34,838−$83,8611.9%145.7%-64.2%0.210.300.03691.30$21,120−$107,332
951.6%111.8%-52.6%0.190.290.03341.57$32,869−$84,9381.7%126.2%-63.1%0.190.280.03671.26$18,828−$108,232
1001.1%69.7%-52.7%0.150.230.02331.41$21,125−$77,6461.2%79.0%-64.8%0.160.230.02651.20$12,150−$93,084

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. The swept multiple is labelled ATR Target below, so it is not confused with the Profit Factor column (gross profit ÷ gross loss).

Loading atr target 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. Click an ATR target under the charts to take it off them and let the axis rescale to the rest.

Loading atr target 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. A bar that opens past the stop fills at its open, not at the stop.

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. A bar that opens past the stop fills at its open. Swept 1.0 → 10.0 (step 0.5).

Loading trailing factor grid…

7b. ATR Trailing Stop — Equity Curve

Section 7 as an equity curve: pick an SMA period, direction and trailing factor to see the strategy's month-end cumulative return, net of costs, against the plain SMA system with no stop. Every factor of the section-7 sweep is here, so any row of its table can be looked at as a curve.

Loading equity curves…

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…

11b. Volatility Filter + ATR Trailing Stop — Equity Curve

Section 11 as an equity curve: pick an SMA period, direction, trailing factor and volatility cap to see the combined strategy's month-end cumulative return, net of costs, against the trailing stop alone (section 7, same factor) and the plain SMA system. Trailing factors 1, 2, 3, 4, 5, 6, 7, 8, 9, 10; the section-11 matrix above keeps every half-step.

Loading equity curves…

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: Norgate Data continuous futures, Panama (difference) back-adjusted, rolled one business day before last trade or first notice; percentages over the real contract price (daily OHLC), truncated at 2026-09-22 — nothing after that date was read by any calculation on this page. Generated 2026-11-26 20:53:21 UTC.