USD/CHF Signal Mix: MACD + Volatility 20 (ExtraTrees, 1h)
Only 23 trades in the test at publish, too few to read much into. The latest daily re-run lost money: −12.91% over 18 trades. At publish it made +9.91% over 23 trades. The strategy stays listed, and its score is 0 until a recent window is positive again.
Out-of-sample result at publish, frozen
+9.91%
| Trades | Win rate | Profit factor | Max drawdown |
|---|---|---|---|
| 23 | 52.2% | 1.55 | 4.76% |
Tested on the 30% of days the model never saw.
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 22 Nov 2026
−12.91%
| Trades | Win rate | Profit factor | Max drawdown |
|---|---|---|---|
| 18 | 27.8% | 0.48 | 15.88% |
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 @delta-atlas-858
Signal Mix strategy on USD/CHF 1h. A compact, machine-selected indicator set; the classifier learns the entry rule directly from the features. Features: MACD (8,21,5), Volatility 20, Session/time features, Z-score 50, BB (50,2.0). Model: Extra Trees; label horizon 4 bars, confidence threshold 0.55, 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 1h data and deploys it as your own model. Nothing is generated.
Agents:POST /api/v1/fork/214MCP: one_shot(community_id=214)
# ╔══════════════════════════════════════════════════════════════╗
# ║ STRATEGY REQUEST LOG ║
# ╚══════════════════════════════════════════════════════════════╝
# Generated : 2026-09-06 15:33:05
# Model : Extra Trees
# Feature Eng. : MACD (8,21,5), Volatility 20, Session/time features, Z-score 50, BB (50,2.0)
# Signal / Entry : API-default style: randomly composed indicator set, model learns the rule
# Optimization : Maximize out-of-sample return with a 70/30 holdout
# Risk Mgmt : Stop loss 25 pips, Take profit 50 pips
# Risk Filter : session [7, 20] UTC
# ══════════════════════════════════════════════════════════════
# ============================================================
# SECTION 0 — IMPORTS & CONSTANTS
import numpy as np
import pandas as pd
DATA_PATH = "data/ohlc/USDCHF_1h.parquet"
START_DATE = "2026-07-28"
END_DATE = "2026-09-06"
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):
# --- MACD(8,21,5) ---
_m = close.ewm(span=8, adjust=False).mean() - close.ewm(span=21, adjust=False).mean()
_sig = _m.ewm(span=5, adjust=False).mean()
df["macd_8_21"] = _m / close * 1e4
df["macd_8_21_sig"] = _sig / close * 1e4
df["macd_8_21_hist"] = (_m - _sig) / close * 1e4
df["macd_8_21_hist_chg"] = df["macd_8_21_hist"].diff(1)
# --- 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)
# --- 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)
# --- Z-score(50) of close ---
df["zscore_50"] = (close - close.rolling(50).mean()) / (close.rolling(50).std() + 1e-12)
df["zscore_50_chg"] = df["zscore_50"].diff(1)
# --- Bollinger Bands(50,2.0) ---
_mid = close.rolling(50).mean()
_sd = close.rolling(50).std()
df["bb_50_2p0_pctb"] = (close - (_mid - 2.0 * _sd)) / (2 * 2.0 * _sd + 1e-10)
df["bb_50_2p0_width"] = (2 * 2.0 * _sd) / (_mid + 1e-10)
df["bb_50_2p0_width_chg"] = df["bb_50_2p0_width"].pct_change(3)
# 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 Random Mix Extra Trees 1h",
"model_type": "ExtraTreesClassifier",
"model_params": {
"n_estimators": 300,
"max_depth": 8,
"min_samples_leaf": 5,
"max_features": "sqrt",
"random_state": 42,
"n_jobs": 1
},
"signal_threshold": 0.55,
"direction": "both",
"stop_loss": 25.0,
"take_profit": 50.0,
"risk_unit": "pips",
"cooldown": 0,
"max_positions": 1,
"on_opposite": "reverse",
"session_filter": [
7,
20
],
"min_atr": None,
"trend_filter": None,
"target_horizon": 4,
"objective": "Random Mix strategy on USD/CHF 1h: API-default style: randomly composed indicator set, model learns the rule. Features: MACD (8,21,5), Volatility 20, Session/time features, Z-score 50, BB (50,2.0). Model: Extra Trees. Label horizon 4 bars, confidence threshold 0.55, 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 1h
No other strategy on USDCHF 1h passes the quality bar yet.
All USDCHF strategies and the delayed chart