Strategy Analytics

Brazilian Real — Moving Average & Risk Layers

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

Instrument
Brazilian Real (6L=F)
History
2016-01-26 → 2026-08-18
Trading Days / Year
252
Volatility Grid
10–30% (step 2.5)
Read this before the numbers. CME Brazilian real futures, quoted in USD per real, so a long position is long the real against the dollar. The QuantConnect series (calendar-roll continuous) before 2016 is gap-ridden and is cut at load time, so this card's history starts 2016. It is ratio back-adjusted and carries no real price, so the trading cost is charged against the adjusted price, which sits below the real one in early years (about 0.56x in 2016, 0.84x in 2024, measured against CME's unadjusted 6L): early trades pay up to ~1.8x their real cost share, and their dollar figures (Avg Trade, Avg Loss) are in adjusted units.
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 × $5.00) = $12.50, i.e. 0.000125 price points at $100,000 per point. Half is charged on entry and half on exit (a position still open at the end has paid only its entry half); on the compounding curve the cost is a share of the contract's real value at entry, so it weighs more on short, frequent trades. Profit Factor is gross profit ÷ gross loss over all trades (not the ATR target multiple sections 4–5 call “profit factor”); Avg Trade and Avg Loss are net USD per contract. Contract rolls are not charged as extra round turns.
How this market is calibrated. The volatility factor grid is 10–30%, 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 9.0%, p10 10.2%, p25 12.1%, p50 15.4%, p75 19.5%, p90 26.4%, p95 32.9%. Metrics annualize with 252 trading days per year. A cell at −100% CAGR means a position lost more than its stake — typically a short in a contract that more than doubled before the exit — and the later numbers in that cell are not meaningful.

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, trade count, profit factor and the average trade / average losing trade for every base variant of both systems over 2,699 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
20-4.9%-41.8%-61.1%-0.24-0.36-0.08330.51−$242−$774-12.6%-76.4%-83.5%-0.46-0.65-0.15660.47−$287−$809
23-4.3%-37.9%-58.2%-0.21-0.31-0.07280.47−$261−$770-11.4%-72.7%-80.7%-0.42-0.58-0.14560.43−$315−$812
26-3.4%-31.2%-56.1%-0.17-0.25-0.06250.53−$237−$742-9.6%-66.1%-76.9%-0.35-0.49-0.13490.47−$303−$841
29-4.0%-35.6%-59.0%-0.20-0.29-0.07240.46−$286−$741-10.8%-70.5%-79.9%-0.39-0.55-0.13470.41−$355−$833
32-5.0%-42.1%-62.7%-0.25-0.36-0.08240.38−$353−$759-12.5%-76.1%-83.3%-0.46-0.64-0.15470.35−$424−$874
35-5.9%-47.8%-66.0%-0.29-0.42-0.09240.32−$418−$816-14.2%-80.6%-86.2%-0.52-0.72-0.16470.30−$487−$939
38-4.3%-37.6%-60.1%-0.21-0.31-0.07190.49−$357−$1,031-11.2%-71.9%-80.9%-0.41-0.57-0.14380.43−$432−$1,029
41-4.7%-40.4%-61.9%-0.23-0.34-0.08190.46−$394−$1,060-12.0%-74.4%-82.6%-0.44-0.61-0.14380.40−$468−$1,021
44-5.1%-42.7%-63.9%-0.25-0.36-0.08190.44−$425−$1,103-12.6%-76.4%-84.4%-0.46-0.64-0.15370.38−$513−$1,088
47-3.8%-33.7%-57.8%-0.18-0.27-0.07160.52−$353−$1,177-10.2%-68.4%-78.9%-0.37-0.52-0.13310.45−$456−$1,178
50-2.4%-23.0%-53.5%-0.12-0.17-0.05130.68−$244−$1,106-7.6%-57.0%-74.0%-0.28-0.39-0.10250.58−$365−$1,211
53-2.6%-24.7%-54.5%-0.13-0.19-0.05130.65−$268−$1,106-8.0%-59.0%-75.2%-0.29-0.41-0.11250.56−$389−$1,228
56-2.7%-25.2%-54.8%-0.13-0.19-0.05130.64−$275−$1,117-8.1%-59.4%-75.5%-0.30-0.42-0.11250.55−$397−$1,233
59-6.4%-50.5%-58.4%-0.39-0.45-0.11130.27−$858−$1,524-12.2%-75.1%-79.0%-0.50-0.62-0.15250.32−$749−$1,456
62-5.6%-46.1%-54.7%-0.34-0.40-0.10120.29−$848−$1,584-10.9%-70.8%-75.4%-0.45-0.56-0.14230.36−$729−$1,549
65-5.7%-46.7%-55.1%-0.35-0.41-0.10120.28−$863−$1,604-11.0%-71.4%-76.0%-0.46-0.57-0.15230.36−$745−$1,570
68-6.0%-48.4%-56.6%-0.37-0.44-0.11120.26−$909−$1,647-11.6%-73.3%-77.6%-0.48-0.60-0.15230.34−$793−$1,617
71-6.0%-48.4%-56.6%-0.37-0.44-0.11120.26−$909−$1,647-11.6%-73.3%-77.6%-0.48-0.60-0.15230.34−$793−$1,617
74-6.0%-48.4%-56.6%-0.37-0.44-0.11120.26−$909−$1,647-11.6%-73.3%-77.6%-0.48-0.60-0.15230.34−$793−$1,617
77-6.0%-48.6%-56.7%-0.37-0.44-0.11120.26−$912−$1,651-11.6%-73.4%-77.7%-0.48-0.60-0.15230.33−$796−$1,619
80-6.2%-49.7%-57.6%-0.39-0.45-0.11120.26−$936−$1,683-12.0%-74.6%-78.7%-0.50-0.62-0.15230.33−$821−$1,649
85-6.7%-52.6%-60.1%-0.42-0.49-0.11120.24−$1,001−$1,762-13.1%-77.8%-81.3%-0.54-0.68-0.16230.31−$889−$1,737
90-5.4%-45.0%-53.7%-0.33-0.39-0.10100.37−$967−$1,919-10.5%-69.4%-74.2%-0.44-0.54-0.14190.40−$829−$1,882
95-4.0%-35.3%-48.3%-0.30-0.37-0.08100.47−$629−$1,497-9.1%-64.0%-71.2%-0.41-0.53-0.13190.46−$652−$1,641
100-3.4%-30.6%-46.3%-0.25-0.31-0.0790.54−$544−$1,512-7.8%-58.1%-69.9%-0.36-0.46-0.11170.52−$564−$1,654

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
30-11.6%-73.4%-82.2%-0.55-0.77-0.141490.39−$137−$307-25.4%-95.7%-96.9%-0.96-1.21-0.262980.36−$150−$311
33-8.1%-59.6%-75.9%-0.38-0.54-0.111290.51−$106−$314-19.6%-90.3%-94.0%-0.74-0.95-0.212580.47−$122−$336
36-9.5%-65.6%-78.5%-0.45-0.63-0.121270.43−$130−$325-21.7%-92.7%-95.0%-0.82-1.04-0.232540.41−$145−$341
39-6.5%-51.4%-71.1%-0.31-0.43-0.091180.55−$96−$334-16.5%-85.4%-90.8%-0.62-0.80-0.182360.52−$112−$350
42-9.3%-64.8%-77.6%-0.44-0.62-0.121100.41−$148−$334-21.3%-92.3%-94.6%-0.81-1.03-0.222200.38−$166−$353
45-9.3%-64.9%-78.1%-0.44-0.62-0.121150.42−$140−$338-21.0%-92.0%-94.6%-0.80-1.02-0.222310.39−$155−$361
48-8.2%-60.2%-75.6%-0.39-0.55-0.11990.46−$146−$353-19.3%-89.9%-93.5%-0.73-0.94-0.211990.40−$165−$359
51-7.4%-56.1%-73.9%-0.35-0.49-0.10940.50−$131−$358-17.5%-87.2%-92.3%-0.67-0.85-0.191880.45−$148−$360
54-7.7%-57.4%-73.9%-0.36-0.51-0.10960.47−$136−$357-17.9%-87.8%-92.3%-0.68-0.87-0.191930.42−$151−$341
57-7.3%-55.6%-71.5%-0.34-0.48-0.10940.49−$127−$338-17.4%-87.0%-90.7%-0.66-0.85-0.191890.43−$144−$338
60-7.7%-57.5%-74.0%-0.36-0.51-0.10910.46−$139−$327-17.9%-87.9%-92.2%-0.68-0.88-0.191830.39−$157−$326
63-5.8%-47.0%-67.3%-0.27-0.38-0.09830.52−$117−$344-14.6%-81.6%-88.1%-0.56-0.72-0.171670.47−$135−$349
66-5.7%-46.5%-68.3%-0.27-0.38-0.08770.52−$122−$367-14.4%-81.1%-88.7%-0.55-0.71-0.161550.48−$141−$379
69-6.1%-48.8%-68.6%-0.29-0.41-0.09890.51−$115−$317-15.1%-82.7%-88.9%-0.58-0.75-0.171790.45−$132−$308
70-5.1%-42.8%-65.3%-0.24-0.34-0.08830.55−$102−$339-13.2%-78.1%-86.3%-0.51-0.65-0.151670.49−$121−$348
75-7.9%-58.3%-73.8%-0.37-0.52-0.11880.40−$155−$331-18.2%-88.4%-92.4%-0.70-0.89-0.201770.37−$171−$356
80-7.6%-57.2%-74.9%-0.36-0.51-0.10790.43−$163−$339-17.9%-87.9%-92.9%-0.69-0.88-0.191590.40−$182−$365
85-5.7%-46.8%-69.0%-0.27-0.38-0.08760.51−$122−$336-14.4%-81.2%-89.1%-0.55-0.71-0.161530.46−$143−$355
90-7.2%-55.1%-72.9%-0.34-0.48-0.10810.44−$144−$380-17.1%-86.5%-91.8%-0.65-0.84-0.191630.41−$161−$382
95-7.6%-57.2%-71.3%-0.51-0.61-0.11780.43−$162−$366-18.0%-88.1%-91.8%-0.84-0.97-0.201560.40−$183−$381
100-8.6%-61.6%-73.4%-0.58-0.68-0.12720.36−$195−$383-19.7%-90.4%-92.9%-0.92-1.06-0.211440.34−$218−$408
105-9.3%-64.8%-74.6%-0.63-0.74-0.12790.34−$197−$394-20.5%-91.4%-93.7%-0.97-1.10-0.221570.33−$213−$399
110-7.2%-54.9%-66.6%-0.49-0.58-0.11730.40−$160−$349-16.4%-85.3%-88.9%-0.78-0.89-0.181450.42−$172−$391
115-5.1%-43.1%-58.9%-0.35-0.41-0.09730.54−$113−$398-12.7%-76.6%-83.0%-0.60-0.69-0.151450.52−$126−$392
120-5.6%-45.8%-60.6%-0.38-0.45-0.09750.56−$114−$366-13.4%-78.5%-83.9%-0.63-0.73-0.161490.53−$126−$366

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.

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…

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: QuantConnect ratio-adjusted continuous futures (daily OHLC), full available history. Generated 2026-10-06 13:16:09 UTC.