Methodology
How the Bayesian fusion engine works
Methodology
1. Data Pipeline
- 10 cryptocurrency pairs on the MEXC exchange (BTC, ETH, SOL, BNB, XRP, DOGE, PEPE, WIF, SUI, AVAX)
- 5 timeframes: 1m, 5m, 1h, 4h, 1d
- OHLCV ingestion every 60 seconds
- PostgreSQL time-series storage with upsert deduplication
2. Strategy Layer
Eight independent strategies produce signals (BUY / SELL / NEUTRAL) with confidence scores in the range 0.0–1.0.
Technical strategies:
- RSI + MACD (momentum)
- Bollinger Bands (mean reversion)
- EMA Crossover (trend following)
- Volume Spike (volume confirmation)
Empirical strategies (academic evidence base):
- Intraday Time-Series Momentum (TSMOM)
- Post-Shock Mean Reversion
- Walk-Forward EMA with Volatility Targeting
Sentiment strategy:
- A composite score from the Fear & Greed Index, CryptoCompare news, crypto RSS feeds (11 sources), and macro feeds (FT, Fed, CNBC)
3. Market Regime Detection
Using EMA(200) + ADX(14) on daily candles:
- BULL: price > EMA200 and ADX ≥ 25
- BEAR: price < EMA200 and ADX ≥ 25
- SIDEWAYS: ADX < 25
The regime sets the Bayesian prior probability of an upward move, P(BUY):
- BULL → prior = 0.60
- BEAR → prior = 0.40
- SIDEWAYS → prior = 0.50
4. Bayesian Fusion Engine
The engine combines all eight strategy votes as a naive-Bayes product:
P(BUY | s1…s8) ∝ P(BUY) × ∏ P(si | BUY)^(2 × wi)
where wi is the reliability weight of strategy i, learned from historical
performance. The exponent amplifies high-reliability voters and damps the rest.
Decision thresholds on the posterior confidence:
- confidence > 0.65 → EXECUTE
- confidence 0.35–0.65 → WATCH
- confidence < 0.35 → SKIP
5. Adaptive Daily Reweighting
Every night at 02:00 UTC:
- Performance metrics are computed (24h and 7d win rate, Sharpe ratio).
- Market regime is detected per symbol.
- Regime multipliers are applied — momentum strategies are boosted in trending markets, mean-reversion strategies in sideways markets.
- Claude AI (Anthropic
claude-sonnet-4-6) analyses the performance data and recommends weight adjustments. - Final weights blend three sources: statistical (50%) + decay (30%) + AI (20%).
- The weights are persisted and applied to the next day’s fusion.
6. Shadow Portfolio
A $1,000 USDT paper-trading portfolio tracks system performance:
- Position sizing: 1% of portfolio risk per trade
- Stop loss: 1.5× ATR below entry
- Take profit: 3× ATR above entry (2:1 reward/risk)
- Transaction costs modelled: MEXC 0% maker, 0.1% taker
- No real money is traded
7. Blog Generation
Daily Alpha Brief posts are generated automatically:
- Data is extracted from the live database
- Claude AI writes the narrative sections
- The Hugo static site is rebuilt and deployed to Cloudflare Pages
- Posts are published at approximately 03:00 UTC daily