Contents
  1. Strategy universe construction
  2. Statistical filtering — Deflated Sharpe
  3. Portfolio optimization — Ledoit-Wolf shrinkage
  4. Walk-forward analysis design
  5. Markov-switching regime detection
  6. Meta-labeling with Random Forest
  7. Position sizing & vol targeting
  8. Execution & risk controls
  9. Operational infrastructure
  10. References
01

Strategy universe construction

The Glixi v22 portfolio is constructed from 16 systematic strategy blocks spanning 7 asset classes: US equity indices (futures + UCITS ETFs), Treasury futures, FX (EUR, JPY), commodities (gold, crude oil), VIX term structure, sector ETFs, and individual liquid equities.

Each block represents a distinct systematic edge documented in academic literature: trend-following, cross-sectional momentum, mean reversion, statistical arbitrage (Avellaneda-Lee residuals), volatility-carry harvesting, calendar effects, and regime-aware allocation.

Blocks were discovered through 87,624 backtest configurations across 11 systematic concepts and 96 instruments. The 16 surviving blocks passed a four-layer validation gate described in section 2.

Asset class 1
US Equity Indices
ES, NQ (CME micro futures) + CSPX, CNDX (UCITS ETFs for EU PRIIPs compliance)
Asset class 2
Treasury Futures
ZN, ZB + IDTL UCITS for long-duration exposure
Asset class 3
Commodities
GC (gold), CL (crude oil), MGC, MCL micro versions
Asset class 4
FX
6E (EUR), 6J (JPY) carry and trend signals
Asset class 5
VIX term structure
VIX9D / VIX / VIX3M / VIX6M curve trades
Asset class 6
Sector ETFs
XLK, XLF, XLE, XLP, XLU rotation strategies
Asset class 7
Liquid stocks
S&P 100 components for stat-arb pairs trading
02

Statistical filtering — Deflated Sharpe Ratio

With 87K backtests, naïve Sharpe selection guarantees false positives via multiple-testing. We apply López de Prado's Deflated Sharpe Ratio (DSR) with Bonferroni-style correction to control the family-wise error rate.

DSR = Φ((SR_obs − E[max SR | N trials]) · √(T−1) / σ_SR)

where E[max SR] is the expected maximum Sharpe ratio under the null hypothesis of no skill, given N independent trials, accounting for the skewness and kurtosis of the returns distribution. Strategies passing DSR ≥ 0.99 after this correction are retained.

Result: 383 strategies passed DSR, from which 16 were selected based on additional criteria including correlation profile, capacity, and drawdown characteristics.

Bailey, D. H. & López de Prado, M. (2014). "The Deflated Sharpe Ratio: Correcting for Selection Bias, Backtest Overfitting, and Non-Normality." Journal of Portfolio Management, 40(5), 94–107.
03

Portfolio optimization — Ledoit-Wolf shrinkage

The naïve sample covariance matrix is notoriously unstable with limited data. Following Ledoit & Wolf (2003), we replace it with a shrinkage estimator that combines the sample covariance with a structured target (constant correlation), shrinking toward the target by an analytically optimal coefficient.

Σ_shrunk = δ · F + (1 − δ) · S where: S = sample covariance matrix F = constant-correlation target matrix δ = optimal shrinkage intensity (analytically derived)

The optimizer maximizes the Sharpe Ratio or Sortino Ratio under the constraints:

Solved via SLSQP from 20 random Dirichlet starting points to escape local optima. The 15% concentration cap is critical — without it, the prior version (v21) concentrated 38.7% in a single block, creating fragility risk.

Ledoit, O. & Wolf, M. (2003). "Improved estimation of the covariance matrix of stock returns with an application to portfolio selection." Journal of Empirical Finance, 10(5), 603–621.
04

Walk-forward analysis design

Portfolio weights are re-fit periodically using only data available at the fit time. The resulting out-of-sample series is concatenated and evaluated as a single coherent track.

ParameterValue
Fit window504 trading days (2 years)
Test window63 trading days (1 quarter)
Re-fit frequencyEvery 63 days (quarterly)
OOS aggregationConcatenated unseen periods
OOS years achieved12.5 years

Sensitivity analysis was performed across 4 alternative configurations (252/21, 504/126, 756/126). Resulting OOS Sharpe ranged from 3.44 to 3.76 — within 9% across all configurations, demonstrating that the strategy is not parameter-fragile.

05

Markov-switching regime detection

A 3-state Hidden Markov Model fitted via Expectation-Maximization on SPY daily returns identifies the current macro regime: BULL_LOWVOL, NEUTRAL, or BEAR. The model's smoothed marginal probabilities are computed daily.

The regime classification multiplies aggregate portfolio exposure to dampen losses during stress periods and amplify gains during favorable regimes:

RegimeExposure multiplierInterpretation
BULL_LOWVOL1.2×Increase exposure 20%
NEUTRAL0.8×Decrease exposure 20%
BEAR0.3×Reduce exposure 70%

The regime gate is the primary mechanism that allowed Glixi Institutional to remain positive throughout the COVID crash (+3.68%) while S&P lost −34%.

Hamilton, J. D. (1989). "A new approach to the economic analysis of nonstationary time series and the business cycle." Econometrica, 57(2), 357–384.
06

Meta-labeling with Random Forest

Following López de Prado's Advances in Financial Machine Learning (Chapter 3), we apply a secondary Random Forest classifier on top of primary trade signals. The meta-model does NOT predict direction — it predicts whether the primary signal is likely to be profitable.

Features include: ATR percentile, RSI(5), VIX level & slope, regime state, day-of-week, and prior 5-day return. A trade is taken only if the meta-classifier's probability exceeds the threshold:

VariantMeta thresholdEffect
Institutional0.65Strict — fewer but higher-precision trades
Aggressive0.55Loose — more trades, higher activity

The meta-labeling layer empirically removes ~30% of low-precision signals, lifting trade-level precision by approximately 12 percentage points.

López de Prado, M. (2018). Advances in Financial Machine Learning. Wiley.
07

Position sizing & vol targeting

Position sizing combines two layers:

Layer 1 — ATR-based risk per trade: initial position size sets risk to a fixed percentage of NAV given the asset's recent realized volatility (14-day ATR).

size = (NAV × risk_pct) / (entry_price × ATR_14 × stop_multiple)

Layer 2 — Portfolio-level vol targeting: at the portfolio level, exposure is scaled to maintain a constant annualized volatility target.

scale_t = vol_target / realized_vol_20d_annualized exposure_t = base_position × scale_t (capped at max_lev = 8x)
ParameterInstitutionalAggressive
Vol target (annual)30%22%
Risk per trade0.8%1.5%
Max leverage cap8.0×8.0×
Max margin usage85%95%
08

Execution & risk controls

Production-grade execution and a multi-layered risk control framework:

ControlConfiguration
Daily kill-switchNAV drawdown > −3% → auto-flatten all positions
EOD futures flattenAll futures positions closed at session close (no gap risk)
Concentration limit15% maximum exposure per strategy block
Telegram kill-switch/close command via secured bot (24/7 mobile)
Pause mechanism/pause halts cron execution without liquidating
Health checkSunday 20:00 ES cron · auto-restart bot if dead
Backup snapshotsDaily equity + trade log archived to ~/backups/
09

Operational infrastructure

ComponentImplementation
BrokerInteractive Brokers (paper trading then live)
API bridgeib_insync (Python ↔ IBKR TWS/Gateway)
Trading platformIB Gateway (port 4002 paper · 4001 live)
Daily cron22:00 ES (Mon-Fri), post US market close
Health-check cronSunday 20:00 ES
Mobile controlTelegram bot · 9 commands · per-user authorization
Public dashboardVercel-hosted · daily JSON sync
Live trackerDaily 22:30 ES cron · drift z-score · /tracking
Data sourcesYahoo Finance · IBKR historical · CBOE direct (VIX)
ComputeLocal Mac with caffeinate · planned migration to VPS EU
10

References

  1. Bailey, D. H., Borwein, J. M., López de Prado, M. & Zhu, Q. (2017). "The Probability of Backtest Overfitting." Journal of Computational Finance, 20(4).
  2. Bailey, D. H. & López de Prado, M. (2014). "The Deflated Sharpe Ratio." Journal of Portfolio Management, 40(5).
  3. Ledoit, O. & Wolf, M. (2003). "Improved estimation of the covariance matrix of stock returns." Journal of Empirical Finance, 10(5).
  4. López de Prado, M. (2018). Advances in Financial Machine Learning. Wiley.
  5. Hamilton, J. D. (1989). "A new approach to the economic analysis of nonstationary time series." Econometrica, 57(2).
  6. Avellaneda, M. & Lee, J. H. (2010). "Statistical arbitrage in the US equities market." Quantitative Finance, 10(7).
  7. Markowitz, H. (1952). "Portfolio Selection." Journal of Finance, 7(1).