Reader question: If a loss happens only once in a hundred thousand ordinary simulations, must we really run millions of paths just to learn anything about it?
Importance sampling changes the probability distribution used for simulation so that rare but important outcomes occur more often, then corrects the resulting bias with likelihood-ratio weights. The method is one of the most powerful variance-reduction ideas in Monte Carlo because it directs computational effort toward the part of the state space that contributes most to the quantity being estimated.
This article owns the rare-event reweighted simulation problem: target distribution + payoff or loss event + proposal distribution → weighted samples, unbiased or self-normalized estimators, variance diagnostics and evidence about whether the chosen proposal actually improves estimation.
It does not own the underlying market model, the definition of VaR or Expected Shortfall, extreme-value tail fitting or quasi-Monte Carlo sequences. Those are separate jobs. The purpose here is to explain how a simulation algorithm can deliberately sample from the “wrong” distribution and still estimate the “right” answer.
This is public mathematical and computational education. It is not personalized financial advice or a recommendation about investment risk.
1. The ordinary Monte Carlo problem
Suppose X has target density p(x) and we want:
μ = Ep[f(X)] = ∫ f(x)p(x)dx.
Plain Monte Carlo draws X1,…,XN from p and estimates:
μ̂ = (1/N)Σ f(Xi).
For an ordinary expectation this can work well. But if f(X) is non-zero only in a very rare region, most simulations contribute exactly zero.
For a rare-event probability:
f(X) = 1{L(X) > c},
the estimator is simply the fraction of simulated losses above threshold c. If the true probability is 10−5, then 100,000 simulations produce only about one expected exceedance. The estimate is extremely noisy.
2. The importance-sampling identity
Choose a proposal density q(x) that is easier or more useful to sample from, with q(x) positive wherever f(x)p(x) can matter.
Multiply and divide by q:
μ = ∫ f(x) [p(x)/q(x)] q(x) dx.
Therefore:
μ = Eq[f(X)w(X)],
where:
w(X) = p(X)/q(X)
is the likelihood ratio or importance weight.
The importance-sampling estimator becomes:
μ̂IS = (1/N)Σ f(Xi)w(Xi), Xi ~ q.
If the support condition and integrability requirements hold, the change of sampling distribution does not change the target expectation. The weights reverse the deliberate sampling distortion.
3. The rare-event intuition
Suppose losses above c are rare under p. We choose q to push more simulated mass toward states where L(X) > c.
Those rare states then appear frequently under q. But because q has made them artificially common, each observation receives a correction weight p/q.
The computational question is:
Can we make important states common enough to observe, without creating weights so unstable that a few paths dominate everything?
That is the central trade-off.
4. The unattainable zero-variance proposal
For a nonnegative integrand f, the theoretical ideal proposal is proportional to:
q*(x) ∝ f(x)p(x).
If we could sample from q*, every weighted contribution f(X)p(X)/q*(X) would be constant, giving zero estimator variance.
But the normalizing constant of q* is exactly the unknown quantity μ that we are trying to estimate.
The zero-variance proposal is therefore mainly a design guide: put proposal mass where |f|p is large.
5. Exponential tilting
A common technique for light-tailed distributions is exponential tilting. Starting from p(x), define a family:
qθ(x) = exp(θT(x) − ψ(θ)) p(x),
where T(x) is a statistic and ψ(θ) is the log normalizing constant.
The likelihood ratio is:
wθ(x) = exp(−θT(x) + ψ(θ)).
For a Gaussian factor, exponential tilting often corresponds to shifting its mean toward a stress region. In credit-portfolio simulation, this can make systemic factors associated with large portfolio losses appear far more frequently than under ordinary Monte Carlo.
6. A one-dimensional Gaussian example
Suppose Z ~ N(0,1) and we want the rare probability:
P(Z > a).
Plain Monte Carlo samples around zero, so very large a values are rarely crossed.
Instead sample under:
Z ~ N(m,1)
with m chosen near or beyond a.
The likelihood ratio between N(0,1) and N(m,1) is:
w(z) = exp(−mz + m²/2).
The estimator is:
P̂(Z>a) = (1/N)Σ 1{Zi>a} exp(−mZi + m²/2).
Choosing m well can reduce variance dramatically. Choosing m badly can make the estimator worse than ordinary Monte Carlo.
7. Importance sampling for portfolio credit loss
In a factor credit model, large losses can arise from unusually adverse common factors plus idiosyncratic defaults.
A practical rare-loss algorithm may therefore tilt both layers:
- shift common factors toward adverse values;
- increase conditional default probabilities under the proposal;
- simulate defaults under the tilted model;
- multiply by the likelihood ratio for both changes of measure.
Research by Glasserman and collaborators shows how mean shifts and mixtures of tilted distributions can make rare credit-portfolio losses much more observable computationally.
8. Why mixtures can matter
In a multi-factor portfolio, a large loss may occur through several distinct scenarios: a recession-like factor shock, a sector-specific shock, or different combinations of factor outcomes.
A single shifted Gaussian proposal can focus on one failure mode and miss another.
A mixture proposal:
q(x) = Σ αk qk(x)
can place mass near several important loss regions. The weight must use the full mixture density in the denominator.
This is more robust when the rare event is multimodal, but it introduces extra tuning and numerical work.
9. Weight variance is the first diagnostic
An importance-sampling estimator succeeds only if its weighted contributions are well behaved.
For normalized weights:
ŵi = wi/Σwj,
a widely used effective-sample-size diagnostic is:
ESS ≈ 1 / Σ ŵi2.
If all weights are equal, ESS = N. If one path carries almost all the weight, ESS is near 1.
ESS is a diagnostic, not a universal pass/fail law. A proposal can have respectable global ESS but still estimate a particular rare-event functional poorly.
10. Log weights prevent arithmetic underflow
Likelihood ratios in high dimensions can be extremely small or large. Direct multiplication may underflow to zero or overflow to infinity.
Store:
ℓi = log p(Xi) − log q(Xi)
and normalize using a log-sum-exp calculation.
This does not cure a bad proposal. It only prevents floating-point arithmetic from disguising the problem.
11. Standard versus self-normalized importance sampling
If p and q are known normalized densities, the standard estimator uses raw weights and can be unbiased.
If p is known only up to a constant, self-normalized importance sampling uses:
μ̂SN = Σ ŵi f(Xi).
The self-normalized estimator is generally biased for finite N but consistent under appropriate conditions.
Finance applications should state explicitly which estimator is being used, because variance formulas and diagnostics differ.
12. Importance sampling for VaR
VaR is a quantile rather than a simple expectation. One way to use importance sampling is to construct a weighted empirical loss distribution:
F̂IS(x) = Σ ŵi 1{Li ≤ x}.
The estimated VaR is the weighted quantile where F̂ crosses the target probability.
Because quantiles are nonlinear functionals, efficiency analysis is subtler than for an ordinary expectation. Research on importance-sampling estimators of VaR and Expected Shortfall treats this explicitly.
13. Importance sampling for Expected Shortfall
After estimating a high quantile c, a tail expectation can be written schematically as:
E[L | L > c].
Importance sampling can focus simulation on the tail and estimate both the exceedance probability and the weighted exceedance severity.
But if the proposal is tuned only to crossing c and not to the range of losses beyond c, tail-mean estimates can remain unstable.
14. Proposal optimisation
A parameterised proposal qθ can be chosen by minimising an estimate of estimator variance, maximising a large-deviation approximation, or minimising cross-entropy relative to the unavailable zero-variance distribution.
In Gaussian problems, the optimisation often searches for the “most important” rare-event point or path: the adverse state that balances likelihood under the original model against contribution to the payoff or loss event.
This optimisation is itself a model component. Its convergence and sensitivity must be validated.
15. Cross-entropy adaptation
The cross-entropy method iteratively updates proposal parameters toward samples associated with the target rare event.
A simplified workflow is:
- start with an initial proposal;
- simulate candidate states;
- identify elite or high-contribution observations;
- fit the next proposal to those observations using weighted likelihood;
- repeat until the proposal stabilises;
- run an independent final estimation sample.
The final estimation sample should be separated from proposal tuning when possible so that performance is not judged entirely on the data used to optimise the proposal.
16. Inputs and outputs
Inputs can include:
- target density or simulator;
- loss/payoff function;
- rare-event threshold or target functional;
- proposal family;
- proposal parameters or optimisation rule;
- mixture weights if using multiple proposals;
- sample size;
- random seed;
- weight-normalisation method;
- confidence-interval method.
Outputs can include:
- importance weights and log weights;
- weighted loss distribution;
- rare-event probability estimate;
- VaR or Expected Shortfall estimate;
- Monte Carlo standard error;
- effective sample size;
- maximum normalized weight;
- weight coefficient of variation;
- proposal diagnostics;
- comparison with plain Monte Carlo.
17. Evidence polarity
Evidence for confidence includes a large variance reduction relative to plain Monte Carlo, stable estimates across independent seeds, no extreme domination by one or two weights, acceptable ESS, reproducible proposal parameters, correct results on benchmark problems with known answers, and confidence intervals that achieve approximately correct empirical coverage in repeated experiments.
Evidence against confidence includes massive weight concentration, unstable estimates across seeds, proposal optimisation that repeatedly converges to different modes, estimates outside known bounds, confidence intervals that ignore proposal uncertainty, or apparent efficiency gains that disappear when tested on independent simulations.
18. Counterexample: proposal too close to the target
If q is almost the same as p, the weights are stable but the rare event remains rare. The algorithm has changed very little and gains little efficiency.
Falsifier: compare the number of effective rare-event observations under q with plain Monte Carlo. If the event remains nearly absent, the proposal is not targeting the problem.
19. Counterexample: proposal shifted too far
A very aggressive proposal may place nearly every draw deep in the rare region. That sounds useful, but the likelihood ratios can then vary over many orders of magnitude.
A few observations near the edge of the proposal can dominate the estimate.
Falsifier: inspect ESS, maximum normalized weight and repeated-seed variability. If one path routinely controls the answer, the proposal is too unstable.
20. Counterexample: support mismatch
If p assigns positive probability to a region where f is non-zero but q assigns zero probability, importance sampling cannot recover that contribution.
Falsifier: formally verify the support condition before simulation. A finite numerical result does not rescue a proposal that excludes relevant target states.
21. Counterexample: one proposal misses multiple failure modes
Suppose extreme portfolio loss can occur through either an equity crash or a credit-spread shock. A proposal tilted only toward the first mode may badly underestimate the second.
Falsifier: cluster rare-event contributions by scenario type. If important weighted mass lies in regions poorly represented by the proposal, use mixtures or a broader adaptive method.
22. Counterexample: weight clipping hides a broken proposal
Clipping or truncating giant weights can reduce variance, but it introduces bias.
If a system silently caps weights, a seemingly stable estimate may simply be a biased estimate whose most informative observations have been suppressed.
Falsifier: report both unclipped and clipped results, the number of clipped weights, and the bias–variance sensitivity to the cap.
23. Counterexample: VaR proposal is poor for ES
A proposal optimised to generate losses near a VaR boundary may not sample the far tail efficiently enough to estimate Expected Shortfall.
Falsifier: compare contribution weights across loss severity. If the ES estimate is driven by a tiny number of very large-loss observations, retune the proposal for the tail mean rather than only the quantile crossing.
24. Diagnostic ladder
- Benchmark identity: verify the likelihood ratio analytically on a simple case.
- Support check: ensure q covers all relevant target states.
- Log-weight check: prevent underflow and overflow.
- Weight histogram: inspect concentration and tails.
- ESS: measure effective information in normalized weights.
- Maximum weight: detect single-path domination.
- Seed replication: repeat independently.
- Plain Monte Carlo benchmark: compare error at equal computational cost.
- Known-answer benchmark: test on an analytic probability or option price.
- Proposal perturbation: vary tilt parameters and confirm a stable performance region.
- Out-of-sample tuning test: separate proposal optimisation from final estimation.
- Scenario coverage: verify that all major rare-event modes are represented.
25. Alternatives
Plain Monte Carlo is simplest and robust when the event is not too rare.
Stratified sampling allocates simulations deliberately across regions of the state space without necessarily changing measure.
Control variates reduce variance using correlated quantities with known expectations.
Quasi-Monte Carlo replaces random points with low-discrepancy sequences and is powerful for smooth, moderate-dimensional integrals.
Extreme Value Theory models tail shape directly rather than making rare simulations more common.
Reverse stress testing searches for failure scenarios without necessarily assigning precise probabilities.
26. Connections to the surrounding Bukit Timah Tutor knowledge estate
The baseline simulation machinery is developed in Monte Carlo pricing algorithms. Importance sampling is a targeted change of measure layered on top of that machinery.
Low-discrepancy variance reduction is treated separately in Sobol quasi-Monte Carlo algorithms.
Statistical tail extrapolation is covered by Extreme-Value Tail algorithms, while failure-search logic appears in bank reverse-stress-testing algorithms.
The full lane is indexed at Finance & Banking Algorithms | Applied Mathematics in Real Financial Systems.
27. What would falsify confidence?
Confidence should be withdrawn if the likelihood ratio is implemented incorrectly, support is incomplete, estimator variance exceeds plain Monte Carlo, weights collapse onto a tiny number of samples, results vary wildly by seed, proposal tuning overfits the same simulation used for evaluation, major rare-event modes remain unsampled, or confidence intervals fail repeated-coverage tests.
28. Verification and update triggers
Preserve the target model version, proposal family, proposal parameters, optimisation objective, random seeds, raw and log weights, ESS, maximum weight, estimate, standard error and benchmark comparison for every run.
Trigger review when the target model changes, portfolio composition shifts materially, a new tail scenario appears, weight concentration worsens, proposal optimisation becomes unstable, estimated rare-event probability moves outside prior uncertainty bands, or another variance-reduction method becomes more efficient at equal computational cost.
29. Primary and high-quality references
- Paul Glasserman, Philip Heidelberger and Perwez Shahabuddin, Asymptotically Optimal Importance Sampling and Stratification for Pricing Path-Dependent Options, Mathematical Finance, 1999.
- Paul Glasserman, Wanmo Kang and Perwez Shahabuddin, Fast Simulation of Multifactor Portfolio Credit Risk, Operations Research, 2008.
- Paul Glasserman, Philip Heidelberger and Perwez Shahabuddin, Stratification Issues in Estimating Value-at-Risk, Winter Simulation Conference, 1999.
- Pierre Nyquist, Moderate Deviation Principles for Importance Sampling Estimators of Risk Measures, Journal of Applied Probability, 2017.
- Luca Martino, Víctor Elvira and Francisco Louzada, Effective Sample Size for Importance Sampling Based on Discrepancy Measures, for ESS diagnostics and their interpretation.
Educational boundary: Importance sampling can make rare states common in a simulation, but it cannot make them better known than the model allows. Efficient computation is not evidence that the underlying probability model is correct.
