Rolling Sharpe Pass Node
Rolling Sharpe Ratio — Series Input
Overview
The Rolling Sharpe Pass Node computes the rolling Sharpe ratio — the excess return per unit of total volatility — over a sliding window. It is the most widely used risk-adjusted return metric in quantitative finance.
A positive rolling Sharpe means the strategy generates more return than the risk-free rate per unit of risk taken. Negative Sharpe indicates underperformance relative to the risk-free rate after accounting for volatility.
Formula
Parameters
| Parameter | Default | Description |
|---|---|---|
| period | 20 | Rolling window in bars |
| riskFreeRate | 0 | Per-bar risk-free rate subtracted from returns before ratio |
Inputs & Outputs
| Slot | Direction | Type | Description |
|---|---|---|---|
| input | Input | { values, timestamps } | Returns series (per-bar) |
| values | Output | (number | null)[] | Rolling Sharpe ratio per bar; nulls during warm-up |
| timestamps | Output | number[] | Unix timestamps aligned to input |
Use Cases
Performance Monitoring
Track rolling Sharpe in real time to detect when a strategy degrades from its historical performance profile.
Strategy On/Off Switch
Disable position entry when rolling Sharpe drops below zero — a simple and effective regime filter for any returns-based strategy.
Strategy Comparison
Compare multiple strategies' rolling Sharpe on the same chart to dynamically allocate capital to the highest-quality performer.
Tips & Best Practices
Annualise for Comparison
To annualise: multiply by √252 (daily), √52 (weekly), or √12 (monthly). This converts the per-period Sharpe to a standard annualised form.
Assumes Normal Returns
Sharpe ignores skewness and kurtosis. For non-normal returns, also evaluate Omega Ratio or CVaR-adjusted metrics.
Use 60+ Bar Windows
Short windows (period < 20) produce very noisy Sharpe estimates. Use period = 60 or 252 bars for meaningful rolling Sharpe.