This repository extends the statistical framework established in "Sharpe Ratio Inference under GARCH Returns" (SSRN, 2026) by integrating a novel decision-theoretic layer: the Jessicka Formulation for sensitivity decay, edge rotation, and biological barriers in trading strategies.
While the original SSRN paper provides a rigorous method for calculating the asymptotic variance of the Sharpe ratio under heavy-tailed GARCH processes, it treats the strategy as static. This project addresses the critical gap: how to act when the theoretical variance is infinite or unstable? By modeling the trader's "edge" as a decaying biological response to repeated market exposure, we derive optimal rotation thresholds that maximize information gain and preserve capital in non-stationary regimes.
- Unified Framework: Blends stochastic volatility modeling (GARCH) with neural adaptation dynamics (Power-Law Decay).
-
Decision Rule: Derives a mathematically grounded rotation trigger
$\theta$ based on optimal information gain theory ($0.3 \leq \theta \leq 0.6$ ). - Reproducibility: Provides a complete Jupyter notebook reproducing SSRN baseline results while demonstrating the out-of-sample superiority of the rotation-aware strategy.
The foundational work, "A Closed-Form Solution for Sharpe Ratio Inference under GARCH Returns" by López de Prado, Porcu, Zoonekynd, and Engle (2026), establishes that for returns
where
Critical Insight: When
However, this inference assumes a static strategy. It tells us how uncertain our estimate is, but not when to stop using the strategy as market dynamics evolve.
The Sensitivity Decay Whitepaper posits that trading edge is not a fixed parameter but a dynamic state variable subject to habituation. Just as biological systems desensitize to repeated stimuli, a strategy's alpha decays with repeated exposure to the same market regime.
Instead of assuming constant expected return
Where:
-
$\bar{\mu}$ is the ceiling edge (maximum initial alpha). -
$\eta$ is the decay exponent, linked directly to the tail index from the SSRN model: $$ \eta = 1 - \frac{2}{\kappa} $$ Rationale: Heavier tails (lower$\kappa$ ) imply faster structural instability and quicker edge decay.
Drawing from optimal information gain theory (eLife, 2025), staying in a decaying strategy too long wastes energy (drawdown), while rotating too early incurs transaction costs and loses information. The optimal rotation threshold
To account for market-wide arousal (volatility clustering), we adjust the entry threshold
This ensures we trade smaller sizes as the edge decays and require stronger signals during high-volatility regimes.
This project implements a two-stage simulation pipeline:
We simulate
- Estimate parameters
$(\omega, \alpha, \beta, \kappa)$ usingfunctions.py. - Compute the sample variance of the Sharpe ratio across paths.
- Verify convergence to the theoretical
$V_{GARCH}$ from Formula 15. - Result: Confirms that standard inference fails without tail correction.
Using the same simulated paths:
-
Calibration: Estimate
$\bar{\mu}$ and$\kappa$ from the first 100 trades (training window). -
Decay Calculation: Compute
$\eta = 1 - 2/\kappa$ and track$\sigma(n)$ in real-time. -
Execution:
- If
$\sigma(n) < \theta$ : Rotate (stop strategy, reset P&L). - If
$|r_t| < \tau_t$ : Skip (overload filter). - Else: Trade with size
$w_t \propto \sigma(n)$ .
- If
- Evaluation: Compare the final Sharpe ratio and Maximum Drawdown of the Rotating Strategy vs. Buy-and-Hold.
.
├── functions.py # Core GARCH utilities (SSRN)
├── Jessicka_Enhanced_Sharpe_Ratio.ipynb # Main analysis notebook
├── Descriptive_Statistics.ipynb # Original SSRN descriptive analysis
├── Simulation_with_skewness.ipynb # Original SSRN simulation baseline
├── README.md # This file
├── requirements.txt # Dependencies
└── output/ # Generated plots and summary stats
├── figure_1_ssrn_baseline.png
├── panel_b_sharpe_distribution.png
├── panel_c_decay_curve.png
├── panel_d_theta_sensitivity.png
└── summary.txt
Python 3.9+, with the following packages:
pip install numpy pandas matplotlib scipy arch statsmodels ray tqdm notebook papermill- Ensure
functions.pyis in the same directory. - Launch Jupyter:
jupyter notebook Jessicka_Enhanced_Sharpe_Ratio.ipynb # has some minor issues streamlit run jessica_app.py # this one is better!
- Run all cells. The notebook will:
- Reproduce Figure 1 from the SSRN paper.
- Simulate the rotation strategy.
- Generate comparative panels (A-D).
- Save high-resolution PNGs to the
output/folder.
mkdir -p outputs
papermill Jessicka_Enhanced_Sharpe_Ratio.ipynb outputs/Jessicka_Enhanced_Sharpe_Ratio.ipynbIn regimes where
- Variance Reduction: The rotating strategy exhibits significantly lower variance in realized Sharpe ratios compared to buy-and-hold.
-
Drawdown Control: By exiting when
$\sigma(n) < 0.5$ , the strategy avoids the "long tail" of decay where noise dominates signal. - Robustness: The power-law decay model fits empirical trade sequences better than exponential decay, aligning with neural adaptation literature.
We provide a comprehensive infographic (before_after_infographic.png) that visualizes the reduction in estimator variance and the shift in performance distribution.
Figure: Comparison of Sharpe Ratio distributions and stability metrics between the static SSRN baseline and the adaptive Jessicka rotation strategy.
This project adheres to the Double-Blind protocol outlined in the Whitepaper:
-
Pre-registered Parameters:
$\eta$ derivation,$\theta$ grid$[0.3, 0.5, 0.6]$ ,$\alpha_{load} = 0.5$ . - Data Splitting: Training (first 100 obs), Calibration (next 200), Holdout (remainder).
-
No Look-Ahead: Decay states
$\sigma(n)$ are computed strictly using past information.
-
Estimation Error: The tail index
$\kappa$ is noisy in finite samples; robust estimators (Hill estimator) are used but introduce variance. -
Regime Detection: Current implementation uses a simple exposure count
$n$ . Future versions will integrate Statistical Jump Models (JM) to detect regime changes$C_t$ explicitly, resetting$n$ only when the regime persists. -
Real Data Validation: While simulations match theoretical properties, validation on live hedge fund indices (e.g., HFR) is required to confirm the
$\eta = 1 - 2/\kappa$ relationship.
- López de Prado, M., Porcu, E., Zoonekynd, V., & Engle, R. F. (2026). A Closed-Form Solution for Sharpe Ratio Inference under GARCH Returns. SSRN. Link
- Samokhvalov, E. (2025). From Arousal Decay to Edge Decay — A Unified Formulation for Markets. GitHub. Link
- Nature Communications (2023). Power-law adaptation in primary visual cortex.
- eLife (2025). Optimal information gain at intermediate habituation.
License: MIT
Author: Eduard Samokhvalov
Date: 2025-02-19