Skip to the page

USD/CHF Breakout: Donchian 30 (Gradient Boosting, 15m)

USDCHF 15m, published 9 Sep 2026 by @vega-puma-338. Community id 293.

The latest daily re-run made +11.60% over 54 trades. At publish it made +8.02% over 63 trades.

Out-of-sample result at publish, frozen

+8.02%

TradesWin rateProfit factorMax drawdown
6361.9%1.326.48%

A strategy can be published only when this test made money, so this number was chosen to be positive. The daily re-run is the fairer read.

Daily re-run 24 Nov 2026

+11.60%

TradesWin rateProfit factorMax drawdown
5448.1%1.5311.55%

This exact code trained again on the last 40 days, the last 30% held out. A loss shows here and never removes the page.

Description as published by @vega-puma-338

Breakout strategy on USD/CHF 15min: Trade Donchian channel breakouts confirmed by volatility expansion. Features: Donchian 30, ATR 14, Volatility 20, ROC 5, BB (20,2.0), Session/time features. Model: Gradient Boosting. Label horizon 5 bars, confidence threshold 0.60, direction both. Risk: 25 pip stop / 50 pip target (1:2 R/R), 1.0 lot on $10k, $6 round-trip commission.

Walk-forward check at publish: noise, attempt 3.

Run it yourself

Trains this exact code on fresh USDCHF 15m data and deploys it as your own model. Nothing is generated.

Agents: POST /api/v1/fork/293MCP: one_shot(community_id=293)
strategy.py
# ╔══════════════════════════════════════════════════════════════╗
# ║                  STRATEGY REQUEST LOG                       ║
# ╚══════════════════════════════════════════════════════════════╝
# Generated        : 2026-09-09 01:03:05
# Model            : Gradient Boosting
# Feature Eng.     : Donchian 30, ATR 14, Volatility 20, ROC 5, BB (20,2.0), Session/time features
# Signal / Entry   : Trade Donchian channel breakouts confirmed by volatility expansion
# Optimization     : Maximize out-of-sample return with a 70/30 holdout
# Risk Mgmt        : Stop loss 25 pips, Take profit 50 pips
# Risk Filter      : —
# ══════════════════════════════════════════════════════════════

# ============================================================
# SECTION 0 — IMPORTS & CONSTANTS
import numpy as np
import pandas as pd

DATA_PATH = "data/ohlc/USDCHF_15min.parquet"
START_DATE = "2026-07-31"
END_DATE   = "2026-09-09"
VALIDATION_DATE = ""
TRAIN_SPLIT = 0.7
LEVERAGE = 30.0
LOTS = 1.0
BALANCE = 10000.0
RISK_UNIT = 'pips'
STOP_LOSS = 25.0
TAKE_PROFIT = 50.0
AUX_FEEDS = []

# SECTION 1 — FEATURE ENGINEERING
def feature_engineering(df, close, open_, high, low):
    # --- Donchian channel(30) position & breakout ---
    _dh = high.rolling(30).max().shift(1)
    _dl = low.rolling(30).min().shift(1)
    df["donch_30_pos"] = (close - _dl) / (_dh - _dl + 1e-10)
    df["donch_30_break_up"] = (close > _dh).astype(float)
    df["donch_30_break_dn"] = (close < _dl).astype(float)
    # --- ATR(14) normalised ---
    _tr = pd.concat([high - low, (high - close.shift(1)).abs(), (low - close.shift(1)).abs()], axis=1).max(axis=1)
    _atr = _tr.ewm(alpha=1.0/14, adjust=False).mean()
    df["atr_14_pct"] = _atr / close
    df["atr_14_ratio"] = _atr / (_atr.rolling(56).mean() + 1e-12)
    # --- Realised volatility(20) ---
    _r2 = close.pct_change()
    df["vol_20"] = _r2.rolling(20).std() * 1e4
    df["vol_20_ratio"] = df["vol_20"] / (_r2.rolling(80).std() * 1e4 + 1e-9)
    # --- Rate of change(5) ---
    df["roc_5"] = close.pct_change(5) * 1e4
    # --- Bollinger Bands(20,2.0) ---
    _mid = close.rolling(20).mean()
    _sd = close.rolling(20).std()
    df["bb_20_2p0_pctb"] = (close - (_mid - 2.0 * _sd)) / (2 * 2.0 * _sd + 1e-10)
    df["bb_20_2p0_width"] = (2 * 2.0 * _sd) / (_mid + 1e-10)
    df["bb_20_2p0_width_chg"] = df["bb_20_2p0_width"].pct_change(3)
    # --- Time-of-day / day-of-week (UTC) ---
    _h = df.index.hour + df.index.minute / 60.0
    df["hour_sin"] = np.sin(2 * np.pi * _h / 24.0)
    df["hour_cos"] = np.cos(2 * np.pi * _h / 24.0)
    df["dow"] = df.index.dayofweek.astype(float)
    df["london_open"] = ((df.index.hour >= 7) & (df.index.hour < 10)).astype(float)
    df["ny_open"] = ((df.index.hour >= 13) & (df.index.hour < 16)).astype(float)

    # Fill indicator warm-up gaps without looking ahead
    df = df.ffill().fillna(0.0)
    return df


# SECTION 2 — STRATEGY CONFIG
def strategy_config():
    return {
        "title": "USD/CHF Breakout Gradient Boosting 15min",
        "model_type": "GradientBoostingClassifier",
        "model_params": {
                "n_estimators": 300,
                "max_depth": 3,
                "learning_rate": 0.03,
                "subsample": 0.7,
                "random_state": 42
        },
        "signal_threshold": 0.6,
        "direction": "both",
        "stop_loss": 25.0,
        "take_profit": 50.0,
        "risk_unit": "pips",
        "cooldown": 0,
        "max_positions": 1,
        "on_opposite": "reverse",
        "session_filter": None,
        "min_atr": None,
        "trend_filter": None,
        "target_horizon": 5,
        "objective": "Breakout strategy on USD/CHF 15min: Trade Donchian channel breakouts confirmed by volatility expansion. Features: Donchian 30, ATR 14, Volatility 20, ROC 5, BB (20,2.0), Session/time features. Model: Gradient Boosting. Label horizon 5 bars, confidence threshold 0.60, direction both. Risk: 25 pip stop / 50 pip target (1:2 R/R), 1.0 lot on $10k, $6 round-trip commission.",
        "notes": "Generated by the QuantifyMe strategy forge. SL/TP are in pips and match the dashboard defaults, so pasting this code into the Code tab reproduces the published backtest on the same window."
    }

More on USDCHF 15m

All USDCHF strategies and the delayed chart
QuantifyMe
DocsAgentsCommunityPricing
Sign in