1. Calculators
  2. Advanced Risk & Institutional

Marginal, Component VaR and Expected Shortfall Attribution Calculator

See which positions drive a portfolio's Value at Risk. Enter positions, volatilities and correlations to get marginal, component and incremental VaR, the expected shortfall split by position, and how a trade would change the total.

Updated Oct 16, 2026Free · no sign-upFormulas tested

Your inputs

List each position with its dollar value and annual volatility, then the correlations. The defaults are example assumptions for a fictional fund, not forecasts.

Positions
PositionValueAnnual volatility %
$
$
$
$
$
Market value of each position in dollars; a negative value is a short. Volatility is the annualized standard deviation of its returns.
Correlations
One row per position, in the same order as the list. Numbers separated by commas, spaces or tabs; 1s on the diagonal.
trading days
1 for daily VaR, 10 for the classic regulatory horizon.
Row number in the list above (1 = first position).
$
Dollars bought (positive) or sold (negative). Leave empty to skip the what-if.

Results

1-day VaR at 99%$144,7701.45% of the $10,000,000 portfolio; parametric (normal), zero mean
Expected shortfall at 99%
$165,858
Average loss beyond VaR; attributed the same way
Undiversified VaR
$196,372
Sum of each position’s standalone VaR
Diversification benefit
$51,601
26.3% of the undiversified figure
Largest contributor
US large-cap equities: 61.2%
Component VaR $88,603, with 40.0% of gross exposure
VaR after selling $500,000 of US large-cap equities
$133,750
Marginal VaR estimate $133,695; change -$11,020
Best hedge: VaR-minimizing trade in US large-cap equities
-$5,832,813
Leaves the position at -$1,832,813 and VaR at $47,477

US large-cap equities accounts for 61% of the $144,770 VaR. The component VaRs add up exactly to the total, so they show where the risk sits after diversification. The US Treasuries position has a negative component VaR: it acts as a hedge, so adding a little more would lower VaR.

Standalone, component and incremental VaR (1-day, 99%)

Standalone VaRComponent VaRIncremental VaR (remove it)
-$20K$0$20K$40K$60K$80K$100KUS large-cap equitiesInternational equitiesUS TreasuriesHigh-yield bondsGold

Grey: the position’s VaR on its own. Blue: its share of portfolio VaR (the blue bars add up to the total). Amber: how much VaR falls if the whole position is closed. Negative bars are hedges.

VaR and expected shortfall by position

Marginal VaR is the change in portfolio VaR per extra dollar in the position. Component VaR is position × marginal VaR; components add up to the portfolio VaR. Incremental VaR is the exact change if the position were removed.

PositionValueVolatilityStandalone VaRMarginal VaR per $1Component VaRShare of VaRIncremental VaRComponent ES
US large-cap equities$4,000,00016.0%$93,790$0.0222$88,60361.2%$80,733$101,509
International equities$2,000,00018.0%$52,757$0.0237$47,47632.8%$44,793$54,391
US Treasuries$2,500,0007.0%$25,646-$0.0010-$2,525-1.7%-$4,719-$2,892
High-yield bonds$1,000,0009.0%$13,189$0.0088$8,8386.1%$8,486$10,126
Gold$500,00015.0%$10,991$0.0048$2,3781.6%$1,974$2,725
Portfolio$10,000,000$196,372$144,770100.0%$131,267$165,858

Volatilities are annual; VaR uses 1-day volatility (annual × √(1 ÷ 252)). The incremental VaRs do not add up to the total: removing a whole position is not a small change.

Results are estimates from the numbers you enter. They are not financial, tax or legal advice.

How to use the VaR attribution calculator

  1. List the positions. Enter each one with its market value in dollars and its annual volatility. A short position takes a negative value. The five defaults describe a fictional $10 million multi-asset fund and are example assumptions, not forecasts. The stock volatility calculator estimates volatility from prices.
  2. Enter the correlations. Full matrix takes one row per position, in the same order as the list, with 1s on the diagonal; the correlation matrix calculator builds one from return histories. One average correlation applies one value to every pair, which is useful for a quick check or a stress case.
  3. Choose the confidence level and horizon. 99% over 1 trading day is a common internal setting; 97.5% matches the level used for expected shortfall in bank capital rules.
  4. Test a trade (optional). Pick a position by its row number and enter a trade size in dollars (negative to sell). The calculator estimates the new VaR from marginal VaR, recalculates it exactly, and shows the best hedge: the trade in that position that would minimize VaR.

The results show portfolio VaR and expected shortfall, the diversification benefit, the largest contributor and the what-if trade. The table lists every position’s standalone, marginal, component and incremental VaR, and its component expected shortfall.

How VaR is attributed

Portfolio VaR here is parametric: it assumes normally distributed returns with a zero mean over the horizon. With dollar positions x and the covariance matrix Σ of returns over the horizon:

σP = √(xT Σ x)   VaR = zc × σP   ES = σP × φ(zc) ÷ (1 − c)xi is the dollar value of position i, Σij = σiσjρij × h ÷ 252 for a horizon of h trading days, zc the standard normal quantile at confidence c (2.326 at 99%) and φ the standard normal density.

Differentiating with respect to each position gives the attribution:

Marginal VaRi = ∂VaR ÷ ∂xi = zc × (Σx)i ÷ σP
Component VaRi = xi × Marginal VaRi   Σi Component VaRi = VaR
Component ESi = xi × φ(zc) ÷ (1 − c) × (Σx)i ÷ σP(Σx)i is the dollar covariance of position i with the whole portfolio. Marginal VaR is in dollars of VaR per dollar of position.
Incremental VaRi = VaR(all positions) − VaR(all positions except i)
Best hedge in position k: Δ* = −(Σx)k ÷ ΣkkIncremental VaR is a full recalculation, not a derivative. The best hedge is the trade in one position that minimizes portfolio variance, and therefore VaR, holding the others fixed.

A worked example

The fictional fund holds $4 million of US large-cap equities, $2 million of international equities, $2.5 million of US Treasuries, $1 million of high-yield bonds and $0.5 million of gold. With the example volatilities and correlations, the 1-day 99% VaR is $144,770 and the expected shortfall at the same level is $165,858.

Added up position by position, the standalone VaRs come to $196,372. Imperfect correlation removes $51,601 of that.

US equities are the main risk. Their marginal VaR is $0.0222 per dollar, so their component VaR is $88,603, or 61.2% of the total, with 40% of the capital. International equities add another 32.8%.

Treasuries are a hedge. Their correlation with both equity positions is negative, so their component VaR is -$2,525 and their marginal VaR is -$0.0010 per dollar. Removing them would raise VaR: their incremental VaR is -$4,719.

A trade before it is made. Selling $500,000 of US equities is estimated, from marginal VaR, to bring VaR to $133,695. The exact recalculation gives $133,750, a change of -$11,020.

Why the components add up: Euler allocation

Portfolio VaR has a property that makes clean attribution possible. Double every position and VaR doubles; scale every position by any factor and VaR scales by the same factor. Mathematically, VaR is homogeneous of degree one in the position sizes. Euler’s theorem then says that such a function equals the sum of each input times its partial derivative:

VaR = Σi xi × ∂VaR ÷ ∂xiThe same identity holds for portfolio volatility and expected shortfall, which are also homogeneous of degree one.

This is why component VaR, and not standalone or incremental VaR, is the standard way to split a risk budget. Standalone VaRs ignore diversification and add up to too much. Incremental VaRs answer an all-or-nothing question and do not add up to anything in particular. Component VaRs add up to the total, and each one is the position’s size times the rate at which it adds risk at the margin.

The allocation also has a useful economic reading. Each component equals the position’s dollar value times its beta to the portfolio, times the portfolio’s VaR as a share of its value. Positions that move with the rest of the portfolio get large components; positions that move against it get negative ones.

Marginal, component and incremental VaR side by side

The three measures answer different questions, and mixing them up is a common source of confusion in risk reports.

Measure Question it answers In the example (US equities)
Standalone VaR How risky is this position on its own? $93,790
Marginal VaR How much does VaR change per extra dollar? $0.0222
Component VaR How much of today’s VaR belongs to this position? $88,603
Incremental VaR How much would VaR fall if the position were closed? $80,733

Marginal VaR is a first-order estimate, accurate for small trades and less so for large ones. For the $500,000 sale of US equities, the estimate is off by $55. Buying $4 million more, which doubles the position, the estimate is $233,373 against an exact $235,391. The bigger the trade relative to the portfolio, the more the exact recalculation matters.

The best-hedge figure shows where the marginal logic leads. For US equities it is a sale of $5,832,813, which would cut VaR to $47,477. That would turn the position into a net short. It is the variance-minimizing trade, not a recommendation: it ignores expected returns, costs and the mandate.

How correlations and confidence change the picture

Attribution depends heavily on the correlations. With one average correlation of 0.3 for every pair, instead of the example matrix, Treasuries stop being a hedge: their component VaR becomes $13,821. Portfolio VaR hardly moves ($142,622), because the two equity positions now diversify each other more, but the risk is distributed differently. A hedge that only works through a negative correlation disappears when that correlation turns positive, as stock and bond correlations have done in some inflationary periods. Running the attribution again with stressed correlations shows how much of the diversification benefit rests on one relationship.

The confidence level, by contrast, does not change the shares. Under the normal model, VaR at any level, and expected shortfall, is a fixed multiple of portfolio volatility, so every position’s percentage contribution stays the same. At 97.5% the VaR is $121,970 and the expected shortfall $145,483, but US equities still carry 61.2%. Expected shortfall is 1.15× the VaR at 99%, and each component ES is the component VaR scaled by the same ratio.

That equality is a feature of the normal model, not of the world. In a historical or Monte Carlo VaR, component ES is a position’s average P&L across the worst scenarios, and component VaR is, roughly, its P&L in the scenarios at the VaR boundary. A position with option-like or crash-prone returns, such as a short volatility trade, can contribute little to VaR and a great deal to expected shortfall. That is one reason expected shortfall attribution is often preferred for tail risk budgets.

What this calculator does not include

  • Fat tails and skew. The normal model understates extreme losses for most real portfolios; the VaR calculator compares it with historical simulation on your own returns.
  • Non-linear positions. Options and other convex payoffs need full revaluation; a volatility and a correlation do not describe them.
  • Expected returns. VaR uses a zero mean, which is standard for short horizons. Over months, expected returns start to matter.
  • Estimation error. Volatilities and correlations are estimates and change over time. Small changes in a correlation can move component VaRs a lot, especially for hedges.
  • Liquidity and costs. The what-if and best-hedge trades assume you can trade at current prices without moving them. For large positions, a stress test and the cost of exiting matter as much as VaR.

Frequently asked questions

What is the difference between marginal VaR and component VaR?
Marginal VaR is a rate: how much portfolio VaR changes per extra dollar in a position. Component VaR is a share: the position's size times its marginal VaR. Component VaRs add up exactly to the portfolio VaR, so they answer where the risk sits; marginal VaRs answer what the next trade will do. In the example, US equities have a marginal VaR of $0.0222 per dollar and a component VaR of $88,603.
What is incremental VaR?
Incremental VaR is the exact change in portfolio VaR from removing a whole position (or adding a new one), found by recalculating VaR with and without it. For small positions it is close to component VaR; for large ones it differs, because closing a big position changes the diversification of everything else. The incremental VaRs of all positions do not add up to the total.
Why can a component VaR be negative?
A negative component VaR means the position moves against the rest of the portfolio, so it reduces total risk: it is a hedge. In the example, US Treasuries are negatively correlated with equities and have a component VaR of -$2,525. Adding a little more of a position with negative marginal VaR lowers VaR, up to the point where it becomes a risk in its own right.
How is expected shortfall allocated to positions?
The same way: component ES is each position times the derivative of portfolio ES with respect to it, and the components add up to total ES because ES, like VaR, scales in proportion to position sizes. Under a normal model, ES shares equal VaR shares. In historical or Monte Carlo models, component ES is the position's average P&L in the scenarios beyond VaR, and the shares can differ a lot from the VaR shares.
Does the sum of position VaRs equal portfolio VaR?
Only if every correlation is 1. Otherwise the sum of standalone VaRs, the undiversified VaR, is larger: $196,372 against a portfolio VaR of $144,770 in the example. The difference, $51,601, is the diversification benefit. Component VaRs are the version that does add up.

Related calculators

All calculators →

This calculator is for education and planning. It uses the formulas described above and the inputs you provide; real results depend on fees, taxes, timing and other details that a general tool cannot know. PromtFinance does not give personal financial advice. Check important decisions with your provider or a qualified professional.