mirror of
https://github.com/PyP-Quant/quant-trading-strategy-templates.git
synced 2026-08-20 06:13:00 +00:00
EURGBP Volume proxy divergence 5m
This strategy implements a volume proxy divergence approach for EURGBP on 5-minute candles using HistGradientBoostingClassifier.
Overview
- Pair: EURGBP
- Timeframe: 5m
- Model: HistGradientBoostingClassifier with feature engineering focused on volume-price divergence
- Goal: Identify divergences between price action and volume-weighted price action to predict reversals
Features Engineered
- Returns: 1, 3, 6, 12 period returns
- ATR-normalized candle range and close location value (from idea)
- Volume proxy divergence:
- Price RSI (momentum of price changes)
- Volume-price RSI (momentum of volume-weighted price changes)
- Volume proxy divergence (difference between the two RSIs)
- Volume MACD, signal line, histogram
- Distance from EMAs (from idea): 20, 50, and 200 period EMAs
- Prior swing high and swing low distance (from idea)
- Volume features: Z-score and ratio to moving average
- Rolling volatility percentile (from idea): Fast/slow volatility ratio, volatility percentile
Configuration
See quant.config.json for hyperparameters:
lookback: 100 candles for predictionhorizon: 5 candles forward for labeling (5m timeframe)threshold: 0.0006 (6 pips) for ATR-normalized breakoutmin_confidence: 0.50 minimum probability for signal generation
Usage
This template follows the PyP Quant Mode contract:
def train(data, config):
return model, metrics
def predict(model, market_data, config):
return {"signal": "UP|DOWN|HOLD", "confidence": 0.0, "metadata": {}}
Disclaimer
Educational template only. Not financial advice. Past performance does not guarantee future results.