VaR Pass Node
Value at Risk — Series Input
Overview
The VaR Pass Node computes the rolling historical Value at Risk (VaR) — the loss threshold that is exceeded with a given confidence level within a rolling window.
At 95% confidence level, VaR tells you: "In the worst 5% of rolling periods, losses will exceed this value." It is expressed as a positive number representing the loss magnitude. VaR is the most widely used regulatory and institutional risk measure.
Formula
Parameters
| Parameter | Default | Description |
|---|---|---|
| period | 20 | Rolling window in bars |
| confidenceLevel | 0.95 | Confidence level (e.g. 0.95 = 95% VaR) |
Inputs & Outputs
| Slot | Direction | Type | Description |
|---|---|---|---|
| input | Input | { values, timestamps } | Returns series |
| values | Output | (number | null)[] | Historical VaR per bar (positive = loss magnitude); nulls during warm-up |
| timestamps | Output | number[] | Unix timestamps aligned to input |
Use Cases
Position Sizing
Scale position size so that 95% VaR never exceeds a fixed dollar or percent of portfolio threshold — a VaR-constrained sizing approach.
Risk Monitoring
Alert when rolling VaR exceeds a historical regime level — rising VaR indicates entering a higher-risk market environment.
Regulatory Compliance
VaR is the standard risk measure for regulatory reporting (Basel III, MiFID II). Use rolling VaR to ensure ongoing compliance with risk limits.
Tips & Best Practices
VaR Underestimates Tail Risk
VaR tells you the loss threshold, not how bad losses beyond the threshold can be. Combine with CVaR Pass to capture expected tail loss beyond VaR.
Historical vs Parametric
This node uses historical simulation (non-parametric) — no distribution assumption is made. For parametric VaR, use standard-deviation-based formulas with the Z-Score node.
Backtesting VaR
Count how often actual losses exceed rolling VaR — the violation rate should be (1−confidenceLevel). More than 5% violations at 95% VaR suggests model underestimation.