Neural Quantile Models for Value at Risk
Training a neural network to predict a specific loss quantile directly, rather than predicting a mean or a variance and backing out Value at Risk from it — and what a quantile loss function actually rewards it for getting right.
Prerequisites: Value at Risk (VaR), Quantile (Pinball) Loss for Neural Forecasting
The standard route to a one-day 99% Value at Risk number is indirect: forecast the mean and variance of tomorrow's return, assume a distribution shape (often normal), and read the 1st percentile off that assumed curve. Every step introduces an assumption that can be wrong — the true distribution might be skewed, fat-tailed, or just not match whatever shape you assumed. A neural quantile model skips all of that: it's trained to predict the 1% quantile directly, with no assumption about the shape of the rest of the distribution at all.
An analogy: asking the right question
If you want to know how low a river might drop in a bad year, you could model the entire distribution of river levels and calculate the 1st percentile from that model — or you could just ask "in the worst 1% of years, how low did the river actually get?" and train a model to answer that question directly, using only the years that were actually that bad to grade it. The second approach never needs an assumption about the shape of ordinary years at all; it only needs to get the tail question right.
The trick: an asymmetric loss function
An ordinary regression trained with squared error learns to predict the mean. To make a network predict a specific quantile (say for 99% VaR) instead, you train it with the pinball loss:
In plain English: if the actual outcome turns out worse than the prediction (a bigger loss than forecast), the penalty is small, weighted by ; if the outcome is better than the prediction, the penalty is larger, weighted by . For , that means the network is punished far more heavily for predicting a VaR that's too conservative (too large a loss forecast, rarely breached) than for one that's too aggressive — pushing its predictions to sit exactly at the point where only 1% of outcomes fall below it, which is the definition of the 1% quantile.
Worked example: reading a pinball-loss training run
A network is trained on five years of daily returns for a single stock to predict the 1% quantile () of next-day return, using the past 20 days of returns and realized volatility as inputs. On a held-out year of 250 days, its predicted quantile is breached on 3 days — a rate of 1.2%, close to the 1% target. A naive normal-distribution VaR model on the same data is breached on 8 of 250 days (3.2%), because the stock's true return distribution has fatter tails than a normal curve assumes — the quantile network, making no distributional assumption, tracks the true tail far more faithfully.
What this means in practice
Neural quantile models are most useful where the return distribution genuinely deviates from whatever a parametric VaR model assumes — fat tails, skew, or regime-dependent shape — and where enough history exists to train reliably, since the model still needs to learn its quantile from data. They also compose naturally with an explicit backtest: because the model targets an exact quantile, you can directly check whether the empirical breach rate matches the target rate, the same way any VaR model should be checked.
A neural quantile model is trained with an asymmetric pinball loss to predict a specific loss quantile directly, without assuming any shape for the rest of the return distribution — sidestepping the "assume normal, then read off the percentile" chain that a mean-variance VaR model depends on.
A neural quantile model still needs a VaR backtest — training it to target the 1% quantile does not guarantee the empirical breach rate on new data will actually be 1%. Treat the model's output as a hypothesis to be checked against realized breaches, not a certified probability.
Related concepts
Practice in interviews
Further reading
- Koenker & Bassett, 'Regression Quantiles', Econometrica (1978)
- Taylor, 'A Quantile Regression Neural Network Approach to Estimating the Conditional Density of Multiperiod Returns'