qis.GaussianMonteCarlo¶
- class qis.GaussianMonteCarlo(spec)[source]¶
Bases:
objectReusable antithetic normal draws for portfolio and benchmark marginal VaR.
Projecting an asset Gaussian onto two linear portfolios has the same distribution as simulating all asset shocks and applying their weights. The first shock represents the benchmark; the second the portfolio residual. Identical portfolios have exactly unit VaR ratio. Draws can be reused across reporting dates for reproducible common-random-number comparisons.
- Variables:
spec – Confidence, horizon, scenario count and random seed.
- Parameters:
spec (GaussianVarSpec)
- __init__(spec)[source]¶
- Parameters:
spec (GaussianVarSpec)
Methods
__init__(spec)var(portfolio_variance, benchmark_variance, ...)Compute loss-positive portfolio and benchmark VaR.
- var(portfolio_variance, benchmark_variance, cross_covariance)[source]¶
Compute loss-positive portfolio and benchmark VaR.
- Parameters:
- Returns:
Portfolio and benchmark loss quantiles over the configured horizon.
- Raises:
ValueError – If joint moments are nonfinite or not positive semidefinite.
- Return type: