Rolling Sharpe Ratio
Quick Reference
| Property | Value |
|---|---|
| Dimension | quality |
| Category | statistics |
| Version | v1.0 |
| Output Column | sharpe_ratio |
Rolling Sharpe ratio: rolling_mean(return) / rolling_std(return) - risk-adjusted return over window
Formula
rolling_mean(ret, window) / rolling_std(ret, window)
CDM Inputs
| Column | CDM Table | Description |
|---|---|---|
ret | cdm_* | CDM source table |
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
window | integer | 300000 | Window for mean and std estimation |
Output
Column: sharpe_ratio
Rolling annualized Sharpe ratio
Market Intuition & Trading Rationale
Rolling Sharpe ratio measures risk-adjusted return: rolling_mean(ret) / rolling_std(ret). It answers: how much return am I getting per unit of risk over the recent window? A Sharpe of 1.0 means the strategy earns one unit of return per unit of volatility — decent. A Sharpe of 2.0+ is excellent. A negative Sharpe means the strategy is losing money on a risk-adjusted basis.
The rolling window makes this adaptive — it captures the strategy's current performance, not its lifetime average. A strategy with a long-term Sharpe of 1.5 may have experienced periods with rolling Sharpe of -2.0 (drawdowns) and +4.0 (strong runs). Monitoring the rolling Sharpe detects when a strategy's performance regime has changed — a rolling Sharpe crossing below zero is an early warning that the strategy's edge may have disappeared.
Usage Cases
- Strategy monitoring: Track rolling_sharpe_ratio as a live quality metric. When it drops below a threshold (e.g., 0.5) for an extended period, the strategy may be broken — pause live trading and investigate.
- Dynamic capital allocation: Allocate more capital to strategies with higher rolling Sharpe. This is a simple, robust risk-parity approach that automatically reduces exposure to underperforming strategies.
- quality dimension: Used in
intraday_momentumas the quality assessment — the momentum signal's Sharpe over the recent window tells you whether momentum is currently a profitable factor in this instrument.
YAML Definition
name: rolling_sharpe_ratio
description: 'Rolling Sharpe ratio: rolling_mean(return) / rolling_std(return) - risk-adjusted
return over window'
category: statistics
dimension: quality
version: v0.9.0 (Beta)
required_inputs:
- ret
output_column: sharpe_ratio
output_description: Rolling annualized Sharpe ratio
tags:
- quality
- sharpe
- risk
parameters:
window:
type: integer
description: Window for mean and std estimation
required: false
default: 300000
formula: rolling_mean(ret, window) / rolling_std(ret, window)