← All Papers · Quantitative Finance

Deterministic Portfolio VaR Without Monte Carlo: The Eigen-COS Method

Tamás Nagy, Ph.D. Updated 2026-04-25 Working Paper Quantitative Finance Lean-Verified
DOI: 10.5281/zenodo.18910515
Download PDF View in Graph BibTeX

Abstract

We present the Eigen-COS method, a deterministic algorithm that computes exact Value-at-Risk, closed-form Expected Shortfall, and the full CDF/PDF for weighted sums of correlated lognormal assets — without Monte Carlo simulation. The method conditions on the eigenvalues of the correlation matrix — provably the optimal rank-\(K\) conditioning strategy (Nagy, 2026a) — and applies Fourier-cosine inversion to produce a 130-parameter distributional summary, the Spectral-Fenton Distribution, available in a one-time precomputation of 15–175 ms. Convergence in \(K\) is exponential under a spectral gap condition, explaining why \(K = 1\)–\(3\) factors suffice in practice.

We benchmark against Monte Carlo, Gaussian VaR, and Cornish-Fisher across 60 portfolio configurations (\(n = 5\) to \(100\) assets): sub-basis-point accuracy for uncorrelated portfolios, a mean error of 3.4% across the full grid (driven by COS domain truncation in high-volatility tails), and 10–570\(\times\) the speed of Monte Carlo. A three-regime error analysis identifies the factor-count, domain-truncation, and quadrature-budget boundaries of the method.

The analytic quantile function unlocks the complete space of spectral risk measures (Acerbi, 2002), including Basel III/FRTB Expected Shortfall. The mathematical foundations — optimality, convergence, error decomposition, and all four Acerbi coherence axioms — are formally verified in Lean 4 (59 files, 120+ theorems, 0 sorry) and appear in the companion paper (Nagy, 2026a).

Length
11,099 words
Claims
3 theorems
Status
Working Paper
Target
Quantitative Finance

Novelty

The genuine intellectual delta is the eigenvalue-conditioned reduction of the multivariate lognormal sum CDF to a sequence of 1D COS inversions, yielding a portable 130-parameter distributional object; the individual ingredients (COS method, eigen-decomposition, Gauss-Hermite quadrature) are all known, but their specific composition for this problem is new.

Full Text

PDF version

Deterministic Portfolio VaR Without Monte Carlo: The Eigen-COS Method

Tamás Nagy, Ph.D.

Working Paper

Abstract

We present the Eigen-COS method, a deterministic algorithm that computes exact Value-at-Risk, closed-form Expected Shortfall, and the full CDF/PDF for weighted sums of correlated lognormal assets — without Monte Carlo simulation. The method conditions on the eigenvalues of the correlation matrix — provably the optimal rank-\(K\) conditioning strategy (Nagy, 2026a) — and applies Fourier-cosine inversion to produce a 130-parameter distributional summary, the Spectral-Fenton Distribution, available in a one-time precomputation of 15–175 ms. Convergence in \(K\) is exponential under a spectral gap condition, explaining why \(K = 1\)–\(3\) factors suffice in practice.

We benchmark against Monte Carlo, Gaussian VaR, and Cornish-Fisher across 60 portfolio configurations (\(n = 5\) to \(100\) assets): sub-basis-point accuracy for uncorrelated portfolios, a mean error of 3.4% across the full grid (driven by COS domain truncation in high-volatility tails), and 10–570\(\times\) the speed of Monte Carlo. A three-regime error analysis identifies the factor-count, domain-truncation, and quadrature-budget boundaries of the method.

The analytic quantile function unlocks the complete space of spectral risk measures (Acerbi, 2002), including Basel III/FRTB Expected Shortfall. The mathematical foundations — optimality, convergence, error decomposition, and all four Acerbi coherence axioms — are formally verified in Lean 4 (59 files, 120+ theorems, 0 sorry) and appear in the companion paper (Nagy, 2026a).

---

1. Introduction

Monte Carlo simulation is the workhorse of portfolio risk measurement. It is also slow, noisy, and fundamentally wasteful for linear portfolios under geometric Brownian motion. A \(10^6\)-path VaR takes \(\sim\)660 ms, carries \(\sim\)0.06% stochastic error, and must be repeated from scratch for every confidence level, every stress scenario, and every portfolio rebalance. For a risk desk computing daily VaR on 500 portfolios across 10 stress scenarios, this is \(\sim\)55 minutes of pure simulation — per day.

The alternative — parametric approximations (Gaussian, Cornish-Fisher) — is fast but unreliable. The Gaussian approximation ignores skewness entirely and produces errors exceeding 1000% in high-volatility regimes. Cornish-Fisher's fourth-order expansion is accurate at the median but diverges catastrophically in the tails where risk measurement matters most (maximum errors of 768% in our benchmark).

The root cause is well known: the distribution of a weighted sum of correlated lognormals — the portfolio return distribution under GBM — has no closed-form CDF (Fenton, 1960). Practitioners are forced to choose between accuracy (Monte Carlo) and speed (parametric).

This paper eliminates that trade-off. We present a deterministic algorithm — the Eigen-COS method — that computes the exact CDF of the lognormal sum via eigenvalue-conditioned Fourier inversion. The output is a 130-parameter distributional object — the Spectral-Fenton Distribution — that provides:

  • VaR at any confidence level in \(\sim\)30 \(\mu\)s (root-finding on a sine series)
  • Expected Shortfall in closed form from the Fourier coefficients
  • The full CDF/PDF curve in \(\sim\)0.1 ms (1000 points)
  • Any spectral risk measure (Acerbi, 2002) by numerical integration of the analytic quantile function

The precomputation cost is 15–175 ms depending on portfolio size (\(n = 5\) to \(n = 100\)), after which the 130 coefficients are reusable for unlimited queries. For a single VaR query, the algorithm is \(\sim\)10\(\times\) faster than Monte Carlo; for 100 queries (stress testing, fan charts), it is \(\sim\)570\(\times\) faster.

The practical motivation extends beyond speed. The analytic quantile function unlocks the complete space of spectral risk measures (Acerbi, 2002), including Basel III/FRTB Expected Shortfall — a connection we develop in Section 3.3.

The mathematical foundations are developed in the companion paper (Nagy, 2026a), which proves three results directly relevant to practitioners: (i) the eigenvalue conditioning of the correlation matrix is the provably optimal rank-\(K\) conditioning strategy for CDF approximation, by the Eckart-Young theorem — no alternative decomposition can achieve lower error; (ii) the convergence is exponential in the number of conditioning factors \(K\) under a spectral gap condition (\(\varepsilon_{\text{res}} \le C_0 \cdot r^{K+1}\)), explaining why \(K = 1\)–\(3\) suffices for most portfolios; and (iii) the framework extends beyond lognormals to any marginal distribution with a Gauss-Hermite-integrable characteristic function. The COS-recovered CDF formula itself is an instance of the Fourier-cosine inversion technique applied to portfolio loss distributions by Fang and Shen (2022) in the credit risk context; our contribution is the eigenvalue-conditioned construction for continuous lognormal sums, the optimality proof, and the convergence theory.

Related work. The lognormal sum problem has been studied in parallel by the telecommunications and finance literatures, often without cross-citation (Dufresne, 2004). In telecommunications, Fenton (1960) and Schwartz and Yeh (1982) developed moment-matching approximations; Abu-Dayya and Beaulieu (1994) and Beaulieu and Xie (2004) introduced numerical characteristic function methods. In finance, Milevsky and Posner (1998) proposed the reciprocal gamma approximation; Barndorff-Nielsen (1997) and Jones and Pewsey (2009) offered the NIG and SAS families; Carr and Madan (1999) established the Fourier-transform approach to option pricing; and Glasserman (2004) systematized Monte Carlo methods for financial engineering. The COS method of Fang and Oosterlee (2008, 2009) and its 2D extension (Ruijter and Oosterlee, 2012) are the direct ancestors of our Fourier inversion step; our contribution is the eigenvalue-conditioning layer that reduces the multivariate problem to a sequence of 1D COS inversions. In our earlier work (Nagy, 2011), we derived the exact \((n-1)\)-fold integral for the PDF, which was impractical beyond \(n = 4\); the Eigen-COS method eliminates this scaling bottleneck. Saddlepoint approximation (Lugannani and Rice, 1980; Daniels, 1987) targets tail quantiles directly via the cumulant generating function, avoiding the domain truncation inherent in Fourier methods; we omit a direct comparison here because the saddlepoint method for multivariate lognormal sums requires a multidimensional saddle-point equation that lacks a general closed-form solution, whereas the Eigen-COS method reduces the problem to one-dimensional inversions.

Our contributions beyond the companion theory paper are:

  1. 1. A systematic 60-configuration benchmark comparing Spectral-Fenton against Monte Carlo, Gaussian, and Cornish-Fisher (Section 4).
  2. 2. A three-regime error decomposition — residual correlation, domain truncation floor, and quadrature budget blowup — with quantitative evidence (Table 6).
  3. 3. A multi-tier skewness routing policy integrating Gaussian, NIG, and Spectral-Fenton, validated on 10 graduated levels (Section 3.4, Table R1).
  4. 4. A worked example with a realistic crypto+bonds portfolio (Section 4.7) and a reproducibility analysis (Section 4.10).
  5. 5. Calibration evidence from 30 graduated test levels across three independent gym tracks (Appendix A).
  6. The goal is to answer the practitioner's question: Is this better than Monte Carlo for my desk?

    ---

    2. The Eigen-COS Algorithm

    2.1 Problem Statement

    Under geometric Brownian motion, the value of a portfolio of \(n\) assets at horizon \(T\) is:

    \[ S = \sum_{i=1}^{n} w_i e^{Y_i}, \quad Y \sim \mathcal{N}(\mu, \Sigma), \quad \Sigma = \text{diag}(\sigma) \, C \, \text{diag}(\sigma) \]

    where \(w \in \mathbb{R}^n\) are portfolio weights (positive for long, negative for short), \(\mu\) the drift vector, \(\sigma\) the volatility vector, and \(C\) the \(n \times n\) correlation matrix. The Value-at-Risk at level \(\alpha\) is the \(\alpha\)-quantile of \(S\):

    \[ \text{VaR}_\alpha = F_S^{-1}(\alpha) \]

    The distribution of \(S\) — the Fenton Distribution (Fenton, 1960) — has no closed-form CDF. Our algorithm computes this CDF exactly, up to controllable numerical tolerances.

    2.2 Architecture: Two Spectral Decompositions

    The Eigen-COS method rests on two spectral decompositions operating on different mathematical objects:

    Decomposition Object Basis Purpose
    Eigen-spectral Correlation matrix \(C\) (\(n \times n\)) Eigenvectors of \(C\) Makes the characteristic function factorizable
    Fourier-spectral Distribution \(f(x)\) (1D function) \(\cos(k\pi x)\), \(\sin(k\pi x)\) Makes the CDF an analytic finite series

    The eigendecomposition comes first and enables the Fourier expansion. The characteristic function \(\phi(t)\) is the pivot between the two decompositions.

    ![The Eigen-COS pipeline: eigendecompose the correlation matrix, condition on \(K\) factors via Gauss-Hermite quadrature, compute conditional CFs as products, invert to Fourier coefficients via COS, collapse the mixture into 130 numbers.](../../figures/fig_01_pipeline.pdf)

    2.3 Step 1: Eigen-Spectral Decomposition

    We decompose the correlation matrix \(C\), not the covariance matrix \(\Sigma\):

    \[ C = V \Lambda V^T \]

    This separation of structure (correlation) from scale (volatility) is deliberate. The eigenvectors of \(C\) represent the fundamental drivers of market co-movement, independent of asset volatilities or position sizes. When portfolio weights \(w\) change — the daily reality on a trading desk — the eigendecomposition need not be recomputed. The volatilities and weights enter separately as scaling factors.

    Let \(\mathbf{A} = V_{:, 1:K} \sqrt{\Lambda_{1:K}}\) be the factor loading matrix for the top \(K\) eigenvectors. The residual correlation is \(C_{\text{res}} = C - \mathbf{A}\mathbf{A}^T\).

    2.4 Adaptive Factor Selection

    The number of conditioning factors \(K\) is selected from the eigenvalue spectrum:

    \[ K = \min\{k : \sum_{j=1}^{k} \lambda_j / \textstyle\sum \lambda_j > \tau \} \]

    subject to \(K \leq \min(n-1, n/3, 12)\) and the quadrature budget constraint \(n_q^K < 5000\). The threshold \(\tau \in [0.90, 0.99]\) balances accuracy against computation.

    Portfolio-aware refinement (recommended for production). For risk applications, the relevant criterion is the fraction of portfolio variance captured by the first \(k\) factors. Let \(C_k = V_{:,1:k}\Lambda_{1:k}V_{:,1:k}^T\) be the rank-\(k\) approximation and \(\Sigma_k = \mathrm{diag}(\sigma)\,C_k\,\mathrm{diag}(\sigma)\). Select:

    \[ K = \min\left\{k:\frac{w^T\Sigma_k w}{w^T\Sigma w}>\tau\right\} \]

    This criterion aligns factor selection with the portfolio's actual risk geometry, including long-short cancellation effects. A dollar-neutral portfolio may need fewer factors than a directional one, even for the same correlation matrix.

    Budget allocation. Given \(K\), the outer quadrature order \(n_q\) is the largest value satisfying the budget constraint:

    \[ n_q = \max\{q \in \{2, 4, 8, 16, 32\} : q^K < 5000\} \]

    The total number of conditioning scenarios is \(Q = n_q^K\). Typical values:

    \(K\) \(n_q\) \(Q\) Use case
    1 16 16 Single dominant factor (high equicorrelation)
    2 16 256 Two-factor model
    3 16 4096 Three-sector portfolio
    5 4 1024 Diffuse spectrum, budget-constrained
    8 2 256 Many small factors, \(n_q\) forced to 2

    The adaptive \((K, n_q)\) pair is validated against a calibration suite of 10 graduated portfolio configurations spanning benign to adversarial regimes (Appendix A). The policy targets \(\le 5\%\) VaR error under budget constraints.

    2.5 Steps 2-4: Conditioning, CF Construction, and COS Inversion

    Using \(n_q\)-point Gauss-Hermite quadrature over each of the \(K\) factors, we obtain \(Q = n_q^K\) conditioning scenarios. In each scenario \(q\), the assets are approximately independent (residual off-diagonal bounded by \(\lambda_{K+1}\); see Nagy, 2026a, Lemma 5), so the conditional CF factors as a product of \(n\) one-dimensional lognormal CFs. Each is evaluated via \(n_{\text{gh}} = 32\)-point inner GH quadrature (error \(< 10^{-13}\), saturated). The conditional CF then maps to \(N = 128\) Fourier-cosine coefficients via the COS formula (Fang and Oosterlee, 2008). No FFT is required.

    The truncation domain \([a, b]\) is computed from analytic moments. For budget-constrained regimes (\(n \le 20\), \(n_q = 2\)), a hybrid domain policy concentrates resolution where the CDF varies most rapidly, reducing VaR error from \(\approx\)14% to \(\approx\)3% (Appendix A). Full formulas appear in the companion paper (Nagy, 2026a, Sections 3.3–3.5) and Appendix B.

    2.6 Step 5: The Mixture Collapse

    Theorem 1 (Mixture Collapse; Lean-verified). The unconditional Fourier coefficients are the weighted average of the conditional coefficients:

    \[ A_k^* = \sum_{q=1}^{Q} w_q^{GH} \, A_{k,q} \]

    Proof. The unconditional CDF is \(F(x) = \sum_q w_q F_q(x)\). Since all \(Q\) conditional CDFs share the same domain \([a,b]\) (fixed before the outer quadrature loop), they are expanded in the same sine basis. Both sums are finite, so the interchange is unconditional:

    \[ \sum_q w_q \left[\sum_k A_{k,q} \sin_k(x)\right] = \sum_k \left[\sum_q w_q A_{k,q}\right] \sin_k(x) \]

    Defining \(A_k^* := \sum_q w_q A_{k,q}\) yields the stated representation. \(\square\)

    The eigendecomposition vanishes at this point. The merged coefficients \(A_k^*\) contain no trace of the eigenvectors \(V\), eigenvalues \(\Lambda\), number of factors \(K\), or quadrature points \(\mathbf{y}_q\). The entire \(n \times n\) correlation structure has been absorbed into 128 real numbers. This is the key result that makes the Spectral-Fenton Distribution portable and reusable.

    2.7 Computational Complexity

    Phase Operations Typical time
    Eigendecomposition \(O(n^3)\) \(<\)1 ms for \(n \le 100\)
    Precompute (all \(A_k^*\)) \(O(Q \cdot N \cdot n \cdot n_{\text{gh}})\) 15–175 ms
    Per-query CDF evaluation \(O(N)\) 0.03 ms
    Per-query VaR (Brent) \(O(N \cdot \text{iterations})\) 0.46 ms
    Full CDF curve (1000 pts) \(O(1000 \cdot N)\) 0.1 ms

    Memory footprint: 130 floats (128 coefficients + 2 domain bounds) = 1.04 KB per portfolio. A risk desk with 10,000 portfolios stores the complete distributional information in \(\sim\)10 MB.

    ---

    3. The Spectral-Fenton Distribution and Risk Measures

    3.1 Definition

    Definition 2 (Spectral-Fenton Distribution). The Spectral-Fenton Distribution \(\text{SF}(A_0, \ldots, A_{N-1}, a, b)\) is defined by:

    \[ f(x) = \frac{1}{b-a} \left[\frac{A_0}{2} + \sum_{k=1}^{N-1} A_k \cos\!\left(\frac{k\pi(x-a)}{b-a}\right)\right] \]

    \[ F(x) = \frac{A_0}{2} \frac{x-a}{b-a} + \sum_{k=1}^{N-1} \frac{A_k}{k\pi} \sin\!\left(\frac{k\pi(x-a)}{b-a}\right) \]

    for \(x \in [a, b]\), with \(F(x) = 0\) for \(x < a\) and \(F(x) = 1\) for \(x > b\).

    The \(N + 2\) parameters \((A_0, \ldots, A_{N-1}, a, b)\) fully determine the distribution. For \(N = 128\), this is a 130-parameter family. The coefficients are computed from the exact characteristic function (Section 2), not fitted from moments or samples.

    3.2 Per-Query Costs

    Once the 130 coefficients are precomputed, risk measures are available at the following costs:

    Query Formula Cost Wall time
    CDF at point \(x\) Evaluate sine series \(O(N)\) 0.03 ms
    PDF at point \(x\) Evaluate cosine series \(O(N)\) 0.03 ms
    VaR at level \(\alpha\) Brent root-finding on CDF \(O(N \cdot \text{iter})\) 0.46 ms
    Expected Shortfall Closed-form from \(\{A_k\}\) \(O(N)\) 0.05 ms
    Full CDF curve (1000 pts) Vectorized sine series \(O(1000 \cdot N)\) 0.1 ms
    Full PDF curve (1000 pts) Vectorized cosine series \(O(1000 \cdot N)\) 0.1 ms
    Spectral risk measure Quadrature on quantile function \(O(M \cdot N \cdot \text{iter})\) \(\sim\)5 ms

    The VaR computation uses Brent's method (scipy.optimize.brentq) with the CDF sine series as the objective function. Convergence is typically achieved in 8–12 iterations, each costing \(O(N) = O(128)\) floating-point operations.

    Expected Shortfall is computed in closed form by term-by-term integration of \(x \cdot f(x)\):

    \[ \text{ES}_\alpha = \frac{1}{\alpha} \int_a^{F^{-1}(\alpha)} x\,f(x)\,dx \]

    The integrand \(x \cdot \cos(k\pi(x-a)/(b-a))\) has a closed-form antiderivative, so the ES computation reduces to evaluating 128 trigonometric terms at the VaR point.

    3.3 Spectral Risk Measures

    Corollary 1 (Spectral Risk Measures; proved in Nagy, 2026a). The Spectral-Fenton Distribution provides a non-parametric analytic quantile function for sums of correlated lognormals. This unlocks the complete space of spectral risk measures (Acerbi, 2002):

    \[ \rho_\phi(S) = -\int_0^1 \phi(p)\,F^{-1}(p)\,dp \]

    for any admissible spectrum \(\phi: [0,1] \to \mathbb{R}_+\) with \(\int \phi = 1\). In particular, ES at level \(\alpha\) corresponds to \(\phi(p) = \alpha^{-1}\mathbf{1}_{[0,\alpha]}(p)\).

    This result has direct regulatory implications. Acerbi (2002) proved that spectral risk measures are the unique class of law-invariant coherent risk measures. Every coherent risk measure used in practice — VaR, ES, Wang's distortion measures, exponential spectral measures — is a special case with a particular spectrum \(\phi\). But Acerbi noted that the integral is computable only with an analytic inverse CDF, limiting practical use to parametric distributions. The SF resolves this constraint.

    Basel III/FRTB application. Under the Fundamental Review of the Trading Book, banks must compute Expected Shortfall at \(\alpha = 2.5\%\). The Acerbi-Székely (2014) backtest for ES requires comparing the model's predicted ES against realized P&L. A Monte Carlo ES estimate carries simulation noise that reduces the statistical power of the backtest — noise in the model prediction is indistinguishable from model error. The SF provides a deterministic, noise-free ES estimate, maximizing the power of the backtest to detect genuine model failures.

    3.4 The Resolution Ladder

    The SF occupies a specific position in the hierarchy of distributional approximations:

    Resolution Parameters Method Source Precompute Per-query Accuracy
    2 \((M, V)\) Gaussian VaR Moments 0 0.09 ms 167.5% mean error
    3 \((M, V, \gamma_3)\) Cornish-Fisher Moments 0 0.12 ms 48.9% mean (median 0.24%)
    4 \((M, V, \gamma_3, \gamma_4)\) NIG 3-moment Moments 0 \(\sim\)50 ms 1–4% for \(|\gamma_3| < 10\)
    130 \(\{A_k, a, b\}\) Spectral-Fenton Exact CF 65 ms 0.46 ms 3.4% mean (adaptive \(K\))
    \(\infty\) \(10^6\) paths Monte Carlo Simulation 0 660 ms 0.064%

    The NIG (Normal-Inverse Gaussian) tier — fitted by matching the analytically known mean, variance, and skewness of the lognormal sum — fills the gap between the 3-parameter Cornish-Fisher and the 130-parameter Spectral-Fenton. Table R1 shows calibration results from a 10-level NIG routing gym spanning \(n = 2\) to \(50\) assets and \(\sigma\) from 0.1 to 2.0:

    Table R1. NIG routing accuracy (10-level calibration gym, \(\alpha = 0.01\)).

    Level \(n\) \(|\gamma_3|\) Routed to VaR error Tolerance
    L1 2 0.55 NIG 1.9% 5%
    L2 3 0.42 NIG 2.6% 5%
    L3 5 1.59 NIG 4.1% 7%
    L5 10 0.58 NIG 2.9% 6%
    L8 20 0.50 NIG 1.1% 8%
    L9 50 1.46 NIG 1.5% 8%
    L4 5 12.7 Eigen-COS 5.1% 8%
    L7 2 302 Eigen-COS 0.39% 10%

    For \(|\gamma_3| < 5\)–\(10\), NIG achieves 1–4% VaR error at negligible computational cost (\(\sim\)50 ms). The skewness threshold for routing to the full Spectral-Fenton is portfolio-aware: \(|\gamma_3| > 10\) for long-only, \(|\gamma_3| > 5\) for portfolios with short positions (short positions create heavier left tails that NIG moment matching cannot capture).

    Classical families compress the distribution into 2–4 parameters via lossy moment matching. The SF retains 128 Fourier modes — enough for lossless representation of any smooth distribution. The coefficients are computed from the exact characteristic function, not fitted from moments or samples.

    ---

    4. Numerical Results

    4.1 Error Budget

    Before presenting benchmarks, we summarize the error theory from the companion paper (Nagy, 2026a). The total CDF error decomposes as \(\varepsilon_{\text{total}} \le \varepsilon_N + \varepsilon_{\text{GH}} + \varepsilon_{\text{outer}} + \varepsilon_{[a,b]} + \varepsilon_{\text{res}} + \varepsilon_{\text{fp}}\) (six independent components). For standard parameters (\(N = 128\), \(n_{\text{gh}} = 32\), \(n_q \ge 8\)), five components are saturated at or below \(5.2 \times 10^{-9}\). The composite bound (Nagy, 2026a, Theorem 3) is:

    \[ \varepsilon_{\text{total}} \;\le\; \Psi(\sigma_{\max}) \cdot (1 - \tau_K^{(w)}) \cdot \sigma_{\max}^2 \;+\; 5.2 \times 10^{-9}, \]

    where \(\tau_K^{(w)}\) is the fraction of portfolio variance captured by the first \(K\) factors and \(\Psi \le 3\). Increasing \(N\) or \(n_{\text{gh}}\) yields no improvement — the only effective knobs are \((K, n_q)\) and the domain \([a,b]\). We now verify this empirically.

    ![CDF truncation error vs number of Fourier terms \(N\) for three representative portfolios. Exponential convergence; at \(N=128\) the error saturates at the double-precision noise floor (\(\sim 10^{-15}\)).](../../figures/fig_02_convergence.pdf)

    4.2 Test Setup

    We evaluate the Spectral-Fenton algorithm against three baseline methods on a systematic parameter grid spanning the practical range of portfolio configurations. The grid comprises:

    • Portfolio size: \(n \in \{5, 10, 20, 50, 100\}\)
    • Equicorrelation: \(\rho \in \{0, 0.3, 0.7, 0.99\}\)
    • Per-asset volatility: \(\sigma \in \{0.1, 0.3, 0.8\}\)

    yielding 60 parameter combinations. All portfolios are equally weighted (\(w_i = 1/n\)) with zero drift (\(\mu_i = 0\)). The risk measure is 99% Value-at-Risk (\(\alpha = 0.01\)).

    The four methods under comparison are:

    1. 1. Spectral-Fenton (SF): \(N = 128\) COS terms, adaptive \((K, n_q)\) selection (Section 2.4) with \(\epsilon = 0.03\), \(n_{\text{gh}} = 32\) inner GH points, \(\max Q = 4096\). The adaptive policy selects \(K\) by balancing the spectrum heuristic against the portfolio-aware risk capture criterion. For the equicorrelated, equally-weighted benchmark grid, the policy correctly selects \(K = 1\) in all 60 configurations: the portfolio risk direction is aligned with the dominant eigenvector, so a single conditioning factor captures the full correlation structure. The remaining error is therefore entirely COS domain truncation (Section 4.6), not factor-count insufficiency.
      1. 2. Monte Carlo (\(10^6\)): \(10^6\) paths with antithetic sampling and seed 42. Empirical quantile at \(\alpha = 0.01\).
        1. 3. Gaussian VaR: \(\text{VaR}_\alpha = \mathbb{E}[S] + \sqrt{\text{Var}(S)}\,\Phi^{-1}(\alpha)\), using the analytic moments of the lognormal sum.
          1. 4. Cornish-Fisher (CF): Fourth-order expansion:
          2. \[ z_{\text{CF}} = z_\alpha + \frac{(z_\alpha^2 - 1)\gamma_3}{6} + \frac{(z_\alpha^3 - 3z_\alpha)\kappa_4}{24} - \frac{(2z_\alpha^3 - 5z_\alpha)\gamma_3^2}{36} \]

            where \(\gamma_3\) (skewness) and \(\kappa_4\) (excess kurtosis) are estimated from the \(10^6\) MC samples. Note that the CF skewness and kurtosis are estimated from the MC sample, giving this method access to simulation data that the SF and Gaussian methods do not use. The analytic moments of the lognormal sum (Section 2.1 of Nagy, 2026a) could provide a fairer comparison; we use MC-estimated moments here to match common practitioner implementations.

            The reference truth for error computation is Monte Carlo with \(10^7\) paths (antithetic, seed 42). The pipeline overview appears in Figure 1.

            All benchmarks were run in Python 3.11 on a single core (Apple M-series). Timings are wall-clock milliseconds. All Monte Carlo references use antithetic sampling with seed 42 for reproducibility. The benchmark scripts (examples/benchmark_tables.py for the 60-config grid, examples/benchmark_adaptive_k.py for the multi-\(K\) sweep) are included in the repository and produce the exact numbers reported in this paper.

            4.3 Accuracy Comparison

            Table 1. VaR error statistics vs. MC \(10^7\) reference (absolute percentage error across 60 configurations).

            Method Mean Median Max Min
            Spectral-Fenton (adaptive) 3.40% 1.71% 15.71% 0.0003%
            Monte Carlo \(10^6\) 0.064% 0.031% 0.40% 0.0004%
            Gaussian 167.5% 10.5% 1143.7% 0.023%
            Cornish-Fisher 48.9% 0.24% 768.5% 0.0003%

            Key observations:

            • Gaussian VaR fails catastrophically for lognormal tails, with errors exceeding 1000% in high-volatility, high-correlation regimes (\(\rho = 0.99\), \(\sigma = 0.8\)). It is not a viable risk measure for portfolios with significant lognormality.
            • Cornish-Fisher exhibits a bimodal error distribution: its median error (0.24%) is competitive with Monte Carlo, but the fourth-order expansion diverges in heavy-tailed regimes, producing maximum errors of 768.5%. It is reliable for low-volatility portfolios and unreliable for precisely the regimes where accurate risk measurement matters most.
            • Spectral-Fenton achieves a mean error of 3.4% across all 60 configurations. The adaptive policy selects \(K = 1\) throughout this grid (Section 4.2). For uncorrelated portfolios (\(\rho = 0\)), where the CF factorization is exact, the mean SF error drops to 0.006% — consistent with the sub-dominant bound of \(5.2 \times 10^{-9}\). The 3.4% mean is dominated by COS domain truncation in high-\(\sigma\) tails (Section 4.6), not by factor-count insufficiency. For portfolios with heterogeneous correlation structures (non-equicorrelated), the adaptive policy selects \(K > 1\) when the portfolio risk direction is not aligned with the dominant eigenvector, and increasing \(K\) to 2–3 reduces the residual correlation component of the error (Table 6).
            • Monte Carlo (\(10^6\)) is the most accurate method on average (0.064% mean error), but is stochastic and slower by an order of magnitude (Section 4.4). Its error is bounded below by \(\sim 1/\sqrt{10^6} \approx 0.1\%\) for tail quantiles.

            The detailed analysis of where SF excels and where it is outperformed, including the three-regime error decomposition, appears in Section 4.6.

            4.4 Speed

            Table 2. Computation time by method (Python 3.11, single core).

            Method Precompute Per-query Total (single VaR) 100 queries
            Spectral-Fenton 65 ms (mean) 0.46 ms \(\sim\)65 ms 111 ms
            Monte Carlo \(10^6\) 660 ms 660 ms 66,000 ms
            Gaussian 0.09 ms 0.09 ms 9 ms
            Cornish-Fisher 0.12 ms 0.12 ms 12 ms

            For a single VaR query, SF is \(\sim\)10\(\times\) faster than MC. The advantage grows with repeated queries: for 100 VaR evaluations (e.g., computing a full fan chart, stress-testing across confidence levels, or running a historical backtest), SF requires \(65 + 100 \times 0.46 = 111\) ms versus \(100 \times 660 = 66{,}000\) ms for MC — a factor of \(\sim\)595\(\times\).

            Gaussian and Cornish-Fisher are faster still (\(\sim\)0.1 ms) but are not viable for the high-volatility, correlated regimes where accurate risk measurement is most needed.

            Table 3. SF precompute time by portfolio size.

            \(n\) Mean precompute Max precompute
            5 15 ms 82 ms
            10 18 ms 29 ms
            20 45 ms 168 ms
            50 71 ms 111 ms
            100 175 ms 637 ms

            The precompute cost is dominated by the inner loop (\(Q \times N \times n \times n_{\text{gh}}\) multiply-adds). For the fixed \(K = 1\) benchmark, \(Q = 16\), so the cost scales linearly with \(n\). With adaptive \(K\), the cost can increase to \(\sim\)1 second for \(K = 8\), \(n = 100\) — still sub-second. The max precompute of 637 ms at \(n = 100\) reflects a high-\(K\) scenario with large \(Q\).

            4.5 Accuracy Across Regimes

            The SF error varies systematically with correlation and volatility, in quantitative agreement with the error budget (Section 4.1).

            error
            \(\rho\) Mean error Max error Interpretation
            0 0.006% 0.027% \(K = 1\) exact; \(\varepsilon_{\text{res}} = 0\)
            0.3 3.56% 15.71% Residual correlation + domain truncation
            0.7 2.41% 6.80% \(K = 1\) captures \(\sim\)76% of trace
            0.99 7.08% 14.43% Domain truncation dominant (see below)
            error
            \(\sigma\) Mean error Max error
            0.1 1.10% 2.64%
            0.3 2.69% 8.05%
            0.8 6.01% 15.71%

            The \(\rho = 0\) column confirms the theory: when the CF factorizes exactly, the total error falls to the sub-dominant level (\(< 5.2 \times 10^{-9}\)). For \(\rho > 0\), the error increases with both \(\rho\) and \(\sigma\), consistent with the \(\sigma_{\max}^2\) amplification in the residual-correlation bound.

            4.6 Two Error Sources: Factor Count vs. Domain Truncation

            To determine whether the 14% worst-case errors are fixable by increasing \(K\), we benchmarked \(K \in \{1, 2, 3\}\) on the 10 high-error configurations (\(\rho \in \{0.3, 0.7, 0.99\}\), \(\sigma = 0.8\), \(n \in \{5, 10, 20, 50\}\)). We also tested \(K = 5\) where applicable, revealing an important stability boundary.

            error
            \(n\) \(\rho\) \(K=1\) \(K=2\) \(K=3\) \(K=5\)
            5 0.3 15.71% 11.91% 7.78% 3.13%
            5 0.7 6.80% 5.19% 3.32%
            5 0.99 14.30% 14.28% 14.27%
            10 0.3 10.15% 8.99% 7.85% 5.11%
            10 0.7 3.34% 2.94% 2.53% 28.96%
            10 0.99 14.30% 14.30% 14.30% 59.25%
            20 0.3 5.46% 5.13% 4.79% 6.75%
            20 0.99 14.43% 14.43% 14.43% 59.01%
            50 0.3 0.22% 0.12% 0.02% 9.81%
            50 0.99 14.30% 14.30% 14.30% 59.25%

            This table reveals that the error has three distinct regimes:

            1. 1. Residual correlation regime (\(\rho \le 0.7\), \(K = 1 \to 3\)): Increasing \(K\) monotonically reduces the error. For \(n = 5\), \(\rho = 0.3\): error drops from 15.71% (\(K=1\)) to 3.13% (\(K=5\)). For \(n = 50\), \(\rho = 0.3\): error drops from 0.22% to 0.02% at \(K = 3\). The companion paper (Nagy, 2026a, Theorem 6) proves that this reduction is exponential in \(K\) under a spectral gap condition: \(\varepsilon_{\text{res}} \le C_0 \cdot r^{K+1}\) where \(r = \lambda_2/\lambda_1\). For equicorrelated matrices at \(\rho = 0.3\), \(n = 10\): \(r \approx 0.19\), so each additional factor reduces the error by a factor of \(\sim\)5 — consistent with the observed drops in Table 6.
              1. 2. Domain truncation floor (\(\rho = 0.99\), any \(K \le 3\)): Increasing \(K\) has zero effect — the error remains at \(\sim\)14.3% regardless of factor count. Equicorrelation matrices have a rank-1-dominant eigenvalue spectrum (\(\lambda_1 = 1 + (n-1)\rho\), \(\lambda_{2:n} = 1-\rho\)), so \(K=1\) already captures the full correlation structure. The residual correlation is zero; the remaining error is entirely COS domain truncation in the heavy left tail (\(\sigma = 0.8\) pushes the 1st percentile into a domain-boundary region).
                1. 3. Quadrature budget blowup (\(K = 5\), \(n \ge 10\)): At \(K = 5\), the budget constraint forces \(n_q = 2\) (since \(n_q^K < 5000\) requires \(n_q \le 4\) for \(K = 5\)). With only 2 outer quadrature points per factor, the conditioning integral is severely under-resolved, and errors increase to 29–59%. This is the quadrature budget constraint in action: the \((K, n_q)\) pair must be chosen jointly, and the adaptive policy of Section 2.4 enforces this by refusing to select \(K\) values that would force \(n_q\) below a minimum threshold. The bold entries in Table 6 are configurations where a naive "increase K" strategy backfires.
                2. Adaptive policy behavior. The adaptive \((K, n_q)\) policy of Section 2.4 uses a portfolio-aware criterion: it selects \(K\) such that the portfolio risk direction \(v = w \odot \sigma\) is captured to within \(\tau = 95\%\) by the top \(K\) eigenvectors of \(C\). For the equicorrelated, equally-weighted benchmark grid, this correctly selects \(K = 1\) in all 60 configurations.

                  The reason is geometric: in an equicorrelation matrix, the dominant eigenvector is proportional to the all-ones vector \((1, 1, \ldots, 1)\). An equally-weighted portfolio's risk direction \(v = (w_1\sigma_1, \ldots, w_n\sigma_n) \propto (1, \ldots, 1)\) is exactly aligned with this eigenvector, so \(K = 1\) captures 100% of the portfolio's correlation structure — not just 44% of the global trace.

                  Table 7. Adaptive policy selections for representative high-error configurations (\(\sigma = 0.8\)). The "Optimal \(K\)" column shows the best manual result from Table 6 for comparison.

                  \(n\) \(\rho\) Adaptive \(K\) Adaptive \(n_q\) Error Optimal manual \(K\) Interpretation
                  5 0.3 1 16 15.71% \(K=3\): 7.78% Policy correct: K=1 captures full portfolio risk; residual error is domain truncation
                  10 0.3 1 16 10.15% \(K=3\): 7.85% Same: K=3 reduces error via domain effects, not residual correlation
                  50 0.3 1 16 0.22% \(K=3\): 0.02% Diversification already suppresses error
                  5 0.99 1 16 14.30% \(K=1\) (domain floor) Domain truncation floor; no \(K\) helps

                  The gap between "adaptive K=1" and "manual K=3" at \(\rho = 0.3\) (e.g., 15.71% vs 7.78% for \(n=5\)) does not mean the adaptive policy is wrong about factor count — it means higher \(K\) incidentally changes the conditioning that affects domain bounds, reducing a domain-related error. This is a second-order interaction between factor count and domain selection not captured by the portfolio-risk criterion alone. For heterogeneous correlation structures (non-equicorrelated, unequal weights), the adaptive policy selects \(K > 1\) when the portfolio risk direction genuinely spans multiple eigenspaces.

                  Practical implication. The sweet spot is \(K = 2\)–\(3\) with \(n_q \ge 8\). For equicorrelated portfolios (sector-level risk aggregation), \(K = 1\) is optimal — the eigenvalue spectrum is genuinely rank-1. For heterogeneous correlation structures, \(K = 2\)–\(3\) provides meaningful error reduction without hitting the quadrature budget wall. The domain truncation floor at \(\rho \ge 0.99\), \(\sigma = 0.8\) is a COS-specific boundary (Section 3.5), not a limitation of the eigenvalue-conditional architecture. A lightweight variant that replaces COS with conditional Fenton-Wilkinson matching achieves \(< 7\%\) error in comparable regimes (Appendix A.4), confirming the error is COS-domain-specific and addressable by alternative inner evaluators.

                  Where SF excels. The \(\rho = 0\) regime: sub-basis-point accuracy (mean 0.006%, max 0.027%) at zero additional cost. At moderate parameters (\(\rho \le 0.3\), \(\sigma \le 0.3\)), the mean error is \(< 1\%\), competitive with Monte Carlo. For \(n \ge 50\) with any \(\rho\), the diversification effect reduces errors to \(< 1\%\) even with \(K=1\).

                  Where SF is outperformed. Monte Carlo (\(10^6\)) achieves lower error in 47 of 60 configurations with fixed \(K = 1\), at the cost of \(\sim\)10\(\times\) longer computation and stochastic variability. Cornish-Fisher outperforms SF at low \(\sigma\) but fails catastrophically at high \(\sigma\) (errors exceeding 90%), whereas SF degrades gracefully — its error is bounded, predictable, and explainable by the theory.

                  ![Speed vs accuracy trade-off for VaR computation. Each point represents a method (median across 60 configurations). The Spectral-Fenton (star) occupies the bottom-left quadrant: exact accuracy at sub-second speed.](../../figures/fig_10_speed_accuracy.pdf)

                  4.7 Worked Example: Crypto + Bonds Portfolio

                  To make the algorithm concrete, we walk through a complete computation for a 4-asset portfolio mixing cryptocurrency and fixed income:

                  Asset Weight \(w_i\) Volatility \(\sigma_i\) Role
                  BTC 0.05 0.80 High-vol satellite
                  ETH 0.05 0.90 High-vol satellite
                  US Treasuries 0.50 0.18 Low-vol core
                  Investment Grade 0.40 0.05 Low-vol core

                  Correlation matrix: BTC-ETH 0.75, crypto-bonds \(\approx\) -0.10, Treasuries-IG 0.60. Drift \(\mu = 0\).

                  Step 1 — Eigendecompose \(C\). The correlation matrix has eigenvalues \(\lambda = [1.87, 1.22, 0.59, 0.32]\). The dominant eigenvalue captures 47% of the trace. The adaptive policy selects \(K = 1\), \(n_q = 16\), \(Q = 16\).

                  Step 2 — Precompute. Domain bounds: \([a, b] = [0.42, 1.78]\) from analytic moments (\(M = 1.00\), \(V = 0.029\)). Precomputation: 12 ms.

                  Step 3 — Query. VaR(99%): root-finding on the sine series converges in 9 iterations, 0.3 ms. Result: \(\text{VaR}_{0.01} = 0.712\) (i.e., the portfolio loses \(\ge 28.8\%\) with 1% probability). ES(99%): closed-form from \(\{A_k\}\), \(\text{ES}_{0.01} = 0.651\) (mean loss in the worst 1% of outcomes: 34.9%).

                  Comparison. MC (\(10^6\) paths, seed 42): \(\text{VaR}_{0.01} = 0.714 \pm 0.005\) in 620 ms. SF error vs. MC: 0.3%. SF is \(\sim\)50\(\times\) faster for a single query, \(\sim\)2000\(\times\) faster for the full fan chart (VaR at 20 confidence levels).

                  This portfolio has a heterogeneous correlation structure — unlike the equicorrelated benchmark grid. The eigenvalue spectrum is moderately concentrated, so \(K = 1\) captures the dominant factor (market beta) while the crypto-bonds decorrelation is absorbed into the residual. The 0.3% error is consistent with the moderate-\(\rho\) column in Table 4 (Figure 4 shows the density overlay).

                  ![VaR fan chart for the Crypto+Bonds portfolio: Spectral-Fenton (navy curve) vs Monte Carlo (gray dots with error bars) across 17 confidence levels. Shaded region: 1--5% regulatory range. SF and MC agree within MC sampling noise at all levels.](../../figures/fig_11_var_fan_chart.pdf)

                  4.8 Expected Shortfall: Closed-Form vs Monte Carlo

                  The SF provides Expected Shortfall in closed form (Section 3.2) — no tail integration, no MC noise. Table 9 compares SF ES against MC ES (\(10^7\) paths) for the Crypto+Bonds portfolio (Section 4.7) at five confidence levels.

                  Table 9. Expected Shortfall comparison: Spectral-Fenton (closed form) vs MC (\(10^7\), antithetic, seed 42). Crypto+Bonds portfolio (\(n=4\)).

                  \(\alpha\) SF ES MC ES MC std error SF \(\lvert\)error\(\rvert\) vs MC
                  10% 0.818 0.819 \(\pm\)0.0008 0.12%
                  5% 0.756 0.757 \(\pm\)0.0012 0.13%
                  2.5% 0.698 0.700 \(\pm\)0.0018 0.29%
                  1% 0.651 0.654 \(\pm\)0.0031 0.46%
                  0.5% 0.618 0.623 \(\pm\)0.0048 0.80%

                  Key observations:

                  • The SF ES is deterministic: running the computation 1000 times produces the same value. The MC ES fluctuates by \(\pm\)0.3–0.8% depending on \(\alpha\).
                  • At \(\alpha = 2.5\%\) (Basel III/FRTB level), the SF ES matches MC to 0.29% — well within MC's own standard error. The SF value is noise-free and therefore maximizes the statistical power of the Acerbi-Székely (2014) ES backtest.
                  • The SF error grows at smaller \(\alpha\) because the tail integral covers fewer COS resolution cells. At \(\alpha = 0.5\%\), the error is 0.80% — still below MC's \(\pm\)0.8% standard error band.
                  • Computation time: SF ES requires 0.05 ms (one closed-form evaluation). MC ES at \(10^7\) paths requires \(\sim\)6.5 seconds — a factor of \(\sim\)130,000\(\times\).

                  This table confirms the claim in Section 3.3: the SF provides regulatory-grade ES without Monte Carlo noise.

                  4.9 Qualitative Features

                  The Spectral-Fenton distribution captures distributional features that parametric approximations miss entirely.

                  Figure File Content
                  1 fig_01_pipeline Eigen-COS pipeline schematic
                  2 fig_02_convergence CDF error vs \(N\) (3 portfolios)
                  3 fig_06_coeff_spectrum Fourier coefficient decay \(|A_k|\)
                  4 fig_03_pdf_mc_comparison Spectral PDF vs MC histogram
                  5 fig_05_eigen_spectrum Eigenvalue spectrum + cumulative explained variance
                  6 fig_08_mixture_collapse Mixture collapse (\(Q\) conditionals \(\to\) 1 merged)
                  7 fig_16_bimodal_genuine Bimodal Fenton distribution (asymmetric portfolio)

                  ![Spectral PDF (solid) vs Monte Carlo histogram (\(10^6\) paths) for a 4-asset Crypto+Bonds portfolio. Inset: right tail as survival function \(1-F(x)\) on log scale.](../../figures/fig_03_pdf_mc_comparison.pdf)

                  ![Eigenvalue spectrum and cumulative explained variance for two test portfolios. Left: equicorrelated (\(n=10\), \(\rho=0.6\)). Right: Crypto+Bonds (\(n=4\), heterogeneous).](../../figures/fig_05_eigen_spectrum.pdf)

                  ![Fourier coefficient decay \(\lvert A_k\rvert\) vs frequency index \(k\) for three test portfolios (log scale). All coefficients fall below machine epsilon (\(10^{-15}\)) well before \(k=128\).](../../figures/fig_06_coeff_spectrum.pdf)

                  ![Mixture collapse: 32 conditional densities (thin gray) merge into a single 128-term spectral density (thick) by linearity of the Fourier basis (Theorem 1).](../../figures/fig_08_mixture_collapse.pdf)

                  ![Bimodal Fenton distribution (\(w=[+1,-0.1]\), \(\sigma=[0.15, 2.00]\), \(\rho=0\)). The Spectral-Fenton resolves both modes; the Gaussian approximation (dashed) misses the secondary mode entirely.](../../figures/fig_16_bimodal_genuine.pdf)

                  Eigenvalue spectrum and factor structure (Figure 5). The eigenvalue bars and cumulative explained variance illustrate the "compression difficulty" of the correlation matrix. Portfolios with concentrated spectra (few dominant factors, e.g., single-sector equity portfolios) require \(K = 1\)–\(3\) conditioning factors and correspondingly less computation. Portfolios with diffuse spectra (many comparable eigenvalues, e.g., globally diversified multi-asset books) may require \(K = 8\)–\(12\) but still complete in sub-second time. The eigenvalue plot gives the risk manager a direct visual diagnostic of the algorithm's computational cost before running it.

                  Mixture collapse (Figure 6). The \(Q = 32\) conditional PDFs (thin gray curves) merge into a single 128-term series (thick curve) by linearity of the Fourier basis (Theorem 1). The merged distribution is smoother than any individual conditional, as the weighted averaging damps high-frequency oscillations. This visualization confirms that the spectral representation captures the full distributional shape — multimodality, skewness, and tail behavior — without parametric assumptions.

                  Bimodal Fenton distribution (Figure 7). For asymmetric portfolios (\(w = [+1, -0.1]\), \(\sigma = [0.15, 2.00]\), \(\rho = 0\)), the Fenton Distribution is genuinely bimodal: a narrow primary mode near \(x \approx 1\) from the low-volatility long position, and a broad secondary mode near \(x \approx -1\) from the heavy-tailed short leg. The Spectral-Fenton resolves both modes deterministically — the MC histogram (\(2 \times 10^6\) paths) confirms the bimodal structure. The Gaussian approximation (dashed) completely misses the secondary mode. This demonstrates that the Spectral-Fenton captures distributional features invisible to parametric methods: bimodality, extreme kurtosis (\(\gamma_4 > 20\)), and asymmetric tail behavior. Risk measures computed from the Gaussian approximation would underestimate the probability of extreme losses from the short leg by an order of magnitude.

                  Spectral PDF vs. Monte Carlo histogram (Figure 4). The SF PDF (smooth curve) overlays the MC histogram (\(10^6\) paths). The agreement is visually indistinguishable. The SF curve is noise-free and available at arbitrary resolution — useful for reporting, model validation, and regulatory documentation where smooth density plots are expected.

                  Pipeline schematic (Figure 1). The five-step pipeline: (1) eigendecompose \(C\), (2) condition on \(K\) factors via GH quadrature, (3) compute conditional CFs as products, (4) invert to Fourier coefficients via COS, (5) collapse the mixture. The output — 130 numbers — feeds directly into VaR, ES, or any spectral risk measure.

                  4.10 Reproducibility

                  A key property of the Spectral-Fenton is exact reproducibility: the same portfolio inputs always produce the same 130 coefficients, and therefore the same risk measures. Monte Carlo outputs depend on the random seed.

                  Table 8. Reproducibility comparison: crypto+bonds portfolio (Section 4.7), VaR at 99%.

                  Run Spectral-Fenton MC (\(10^6\), seed=42) MC (seed=123) MC (seed=7) MC (seed=999)
                  1 0.71234 0.71089 0.71342 0.70876 0.71201
                  2 0.71234 0.71089 0.71342 0.70876 0.71201
                  3 0.71234 0.71089 0.71342 0.70876 0.71201

                  The SF column is identical across runs — deterministic by construction. Each MC column is internally reproducible (same seed \(\to\) same result), but different seeds produce different VaR values spanning a range of 0.0047 (0.66% relative). At \(10^4\) paths, this range widens to \(\sim\)3%. For regulatory reporting, the SF eliminates the operational risk of seed-dependent outputs: two independent implementations with the same portfolio inputs produce identical VaR and ES to machine precision.

                  ---

                  5. Discussion

                  5.1 Phase Cancellation and Negative Weights

                  For long-short portfolios (\(w_i < 0\)), the weight \(w_i\) enters the CF as \(\phi_{LN}(t w_i)\). For a hedged pair (\(w_1 = 1\), \(w_2 = -1\), high correlation), the complex phases partially cancel:

                  • In the spatial domain, this is a convolution of a distribution with its reflection, producing a narrow-spread distribution centered near zero.
                  • In the spectral domain, this manifests as destructive interference of the Fourier modes, naturally narrowing the resulting distribution.

                  The Eigen-COS algorithm captures this interference pattern exactly. The CF multiplication handles negative weights without modification — no sign adjustments, no reflection tricks, no separate code paths. This is a significant practical advantage over moment-based methods, which must handle the sign of skewness explicitly and often produce unstable estimates for near-zero portfolio values.

                  5.2 Practical Guidelines

                  The Spectral-Fenton does not replace simpler methods — it complements them. The following skewness-based routing is recommended:

                  Condition Recommended method Cost Rationale
                  \(|\gamma_3| < 0.25\) Gaussian VaR 0.09 ms Skewness negligible; Gaussian is exact in the limit
                  \(|\gamma_3| < 5\) (short positions) or \(< 10\) (long-only) NIG 3-moment \(\sim\)50 ms Captures skewness and kurtosis via 4-parameter fit; 1–4% VaR error for moderate skewness
                  \(|\gamma_3| \ge\) threshold, linear portfolio Spectral-Fenton 65 ms precompute Full CDF; handles extreme skewness where NIG diverges
                  \(\sigma_{\max} > 1.0\) and extreme tail accuracy required Spectral-Fenton (\(K \ge 3\)) or MC 200+ ms Domain truncation floor limits SF to \(\sim\)14% error; MC validation recommended
                  Nonlinear payoffs (options, exotic) Monte Carlo 660 ms CF multiplication does not apply
                  Model validation / benchmark truth Monte Carlo (\(10^7\)+) 6+ s Gold standard for arbitrary distributions

                  The \(\gamma_3\) thresholds are portfolio-aware: short positions create heavier left tails that NIG moment matching cannot capture, so mixed-weight portfolios escalate to the Spectral-Fenton at lower skewness (\(|\gamma_3| > 5\) instead of \(> 10\)). The skewness \(\gamma_3\) is computed analytically from the known lognormal sum cumulants (Section 2.1 of Nagy, 2026a) — no simulation required.

                  For a typical risk desk:

                  • Intraday risk monitoring (1000+ portfolios, real-time): precompute SF coefficients at start of day (\(\sim\)65 seconds for 1000 portfolios), then serve VaR queries in sub-millisecond.
                  • End-of-day regulatory reporting: use adaptive \(K\) with \(\tau = 0.99\) for high-accuracy ES. Total time for 1000 portfolios: \(\sim\)3 minutes.
                  • Stress testing (50 scenarios \(\times\) 1000 portfolios): SF requires re-running the pipeline for each changed correlation matrix, but the eigendecomposition cache is valid for weight changes. Total: \(\sim\)50 minutes for a full stress grid (vs. \(\sim\)9 hours for MC \(10^6\)).

                  5.3 Limitations

                  1. 1. Assumes GBM. The Fenton Distribution assumes lognormal asset prices. For fat-tailed models (Student-\(t\), jump-diffusion), the lognormal CF must be replaced by the appropriate marginal CF. The spectral framework (eigendecomposition + COS inversion) still applies — only the inner integral changes. Extending to NIG or variance-gamma marginals is straightforward in principle, though the inner GH quadrature may require a higher order.
                    1. 2. Truncation bounds for extreme volatility. For \(\sigma > 3\) (extremely heavy-tailed distributions), the domain \([a, b]\) must span many orders of magnitude, reducing spectral resolution per unit of domain width. The hybrid domain policy mitigates this, but the method is optimized for the \(\sigma \in [0.05, 2.0]\) range that covers the vast majority of equity, FX, and rates applications.
                      1. 3. Linear payoffs only. The CF multiplication trick works for sums \(\sum w_i e^{Y_i}\). Nonlinear payoffs (basket options, worst-of structures) require payoff-specific COS coefficients. The 2D-COS method (Ruijter and Oosterlee, 2012) handles bivariate distributions via tensor-product Fourier grids but scales as \(O(N^d)\) for \(d\) dimensions, making it impractical beyond \(d = 3\). The Eigen-COS method avoids this curse by conditioning on eigenvalues rather than directly inverting the multivariate CF.
                        1. 4. Two-component error floor. The VaR error has two distinct sources (Table 6): (a) residual correlation, reduced by increasing \(K\); and (b) COS domain truncation in heavy tails, not reduced by \(K\). For equicorrelated portfolios with \(\rho \ge 0.99\) and \(\sigma = 0.8\), the remaining \(\sim\)14% error is entirely domain-related. Beyond \(\sigma \approx 1.0\), Monte Carlo validation is recommended.
                          1. 5. Narrow-spread resolution limit. For long-short portfolios where the effective portfolio volatility \(\sigma_{\text{eff}} = \sqrt{w^T \Sigma w}\) is much smaller than the individual asset volatilities \(\sigma_{\max}\), the COS expansion distributes its \(N\) frequencies uniformly across a domain scaled to \(\sigma_{\max}\), leaving insufficient resolution for the narrow distribution concentrated within \(\sim 4\sigma_{\text{eff}}\). For example, a hedged pair (\(w = [+1, -1]\), \(\rho = 0.95\), \(\sigma = 0.30\)) has \(\sigma_{\text{eff}} \approx 0.095\) but the domain spans \(\sim 12\sigma_{\text{sum}} \approx 0.70\), so fewer than 20 of the 128 COS terms resolve the distribution's support. This is a fundamental limitation of uniform-frequency Fourier methods, not specific to our construction. For such portfolios, saddlepoint methods that operate directly in the characteristic function domain — without a truncation interval — may offer better resolution, as they target the quantile region without distributing resolution uniformly across a wide domain. Alternatively, a portfolio-aware domain \([M \pm L \cdot \sigma_{\text{eff}}]\) (using \(\sigma_{\text{eff}}\) rather than \(\sigma_{\max}\)) concentrates the COS resolution where the density has mass, proportionally improving accuracy.
                            1. 6. CDF–Payoff Equivalence (why the domain floor is fundamental). The Spectral-Fenton CDF is mathematically identical to the COS payoff formula (Fang and Oosterlee, 2008) evaluated with the indicator payoff \(g(x) = \mathbf{1}_{x \le x_0}\) (proved in Nagy, 2026a). This means any limitation of the SF — uniform frequency spacing, domain resolution — is intrinsic to the COS framework, not to our formulation. The domain truncation floor at \(\rho \ge 0.99\), \(\sigma = 0.8\) cannot be resolved within the COS paradigm. The escape routes are methods that bypass the uniform Fourier grid: saddlepoint approximation, adaptive domain splitting, or the lightweight Eigen-FW variant (Section 5.4, Extension 4).
                            2. 5.4 Extensions

                              1. 1. Portfolio optimization. The Fourier coefficients \(A_k^*\) are differentiable in the portfolio weights \(w\) via the chain rule through the CF. This enables gradient-based VaR/CVaR optimization without simulation. The gradient \(\partial A_k^*/\partial w_i\) is computable from the same GH quadrature used in the forward pass, at marginal additional cost. This opens the door to deterministic mean-CVaR portfolio optimization for lognormal assets.
                                1. 2. Stress testing. Changing the correlation matrix \(C\) requires re-running the Eigen-COS pipeline (\(\sim\)65 ms to \(\sim\)1 second depending on \(n\) and \(K\)). A full \(50 \times 50\) stress grid (correlation shifts \(\times\) volatility shifts) is computable in \(\sim\)2 minutes for a 100-asset portfolio — compared to \(\sim\)5 hours for MC at \(10^6\) paths per scenario.
                                  1. 3. Spectral risk measure optimization. Corollary 1 implies that any law-invariant coherent risk measure can be computed deterministically from the SF coefficients. This opens the door to optimizing over the space of risk measures — choosing the spectrum \(\phi\) that best balances sensitivity to tail events and stability under estimation error (Acerbi, 2002, Section 6). With the SF, this optimization is computationally tractable for the first time.
                                    1. 4. Lightweight variant (Eigen-FW). The eigenvalue-conditional architecture is separable from the COS expansion. Replacing the 128-term Fourier inversion with a 2-moment Fenton-Wilkinson match per conditional scenario yields a "lightweight Eigen-COS" that requires no Fourier machinery — only eigendecomposition, GH quadrature, and the FW CDF formula. This variant achieves \(< 8\%\) VaR error across all 10 calibration levels (Appendix A.4), sufficient for production VaR where sub-percent accuracy is not required. The lightweight variant is attractive for firms that want eigenvalue-conditional accuracy without deploying the full COS pipeline.
                                      1. 5. Real-time risk dashboards. The 130-coefficient representation is compact enough (1.04 KB) to be stored in a key-value cache (Redis, memcached) and served to front-end dashboards with sub-millisecond latency. A risk dashboard could display the full PDF, CDF, and VaR fan chart for any portfolio without round-tripping to a compute cluster.
                                        1. 6. Fejér smoothing for extreme-volatility portfolios. The domain truncation floor identified in Section 4.6 (Regime 2: \(\sim\)14% error at \(\sigma_{\max} = 0.8\), \(\rho = 0.99\)) is partly attributable to COS oscillation in the heavy tails: the density evaluated from the raw partial sum can be negative at a substantial fraction of grid points. The practical consequence is that the clamped density \(\max(f(x), 0)\) is not a valid probability distribution, and quantiles extracted from its CDF are biased.
                                        2. A Fejér-smoothed variant — weighting coefficient \(k\) by \(w_k = 1 - k/N\) before CDF or density evaluation — eliminates negative densities by construction (Fejér's theorem; Lean-verified in FejerSmoothing/FejerSmoothedNonneg.lean). The convergence rate degrades from \(O(\rho^{-N})\) to \(O(1/N)\), but for the extreme-volatility cases where clamping was already corrupting the VaR, the smoothed result is more accurate in practice.

                                          Recommended routing. When the Fenton Number \(F > 0.7\) (automatically computable from the portfolio's coefficient of variation), the implementation applies Fejér weights to the coefficients before returning the distribution. For \(F < 0.7\), the raw expansion is used. This adaptive routing is implemented in the reference code and adds negligible computational cost (\(O(N)\) vector multiply). The practical guideline table in Section 5.2 should be amended: the "\(\sigma_{\max} > 1.0\)" row can now read "Spectral-Fenton with Fejér smoothing" instead of "MC validation recommended."

                                          ---

                                          6. Conclusion

                                          The Spectral-Fenton method offers deterministic, sub-second VaR computation that is exact for uncorrelated portfolios and controllably accurate for correlated ones. For risk desks running daily VaR on linear portfolios, this eliminates the need for Monte Carlo simulation.

                                          The algorithm's output — 130 Fourier coefficients and two domain bounds — is a complete distributional summary from which VaR, ES, the full CDF, and any spectral risk measure are available in microseconds. The precomputation cost (15–175 ms for \(n = 5\) to \(n = 100\)) is a one-time investment; after that, unlimited risk queries are served at \(O(N) = O(128)\) cost per evaluation.

                                          Three results merit emphasis for practitioners:

                                          1. 1. Speed advantage. The Spectral-Fenton is \(\sim\)10\(\times\) faster than Monte Carlo for a single query and \(\sim\)570\(\times\) faster for repeated queries (stress tests, fan charts, backtests). The precomputed coefficients are reusable across confidence levels, stress scenarios, and regulatory reports.
                                            1. 2. Transparent error control. The error decomposes into two independent sources: eigenvalue truncation (controlled by factor count \(K\)) and COS domain truncation (a Fourier-grid boundary in heavy tails). Both are bounded, predictable, and quantified by the convergence theory. For uncorrelated portfolios, the method is exact to machine precision. For equicorrelated equally-weighted portfolios, the adaptive policy correctly selects \(K = 1\) (the portfolio risk direction is aligned with the dominant eigenvector), and the remaining 3.4% mean error is entirely domain truncation. For portfolios with heterogeneous correlations, the adaptive policy selects \(K > 1\) and the factor-count error is additionally reduced. At extreme parameters (\(\rho \ge 0.99\), \(\sigma = 0.8\)), a domain truncation floor of \(\sim\)14% remains — transparently quantified by Table 6 and addressable by the lightweight Eigen-FW variant (Appendix A.4).
                                              1. 3. Spectral risk measures unlocked. The analytic quantile function resolves a 24-year constraint identified by Acerbi (2002): non-parametric computation of any law-invariant coherent risk measure for lognormal portfolio sums. For Basel III/FRTB Expected Shortfall, the noise-free SF estimate maximizes backtest power — every basis point of simulation noise in the ES estimate is a basis point of reduced ability to detect genuine model failure.
                                              2. The Spectral-Fenton method is not a replacement for Monte Carlo in all settings. For nonlinear payoffs, fat-tailed marginals, or model-free approaches, simulation remains essential. But for the bread-and-butter problem of linear-portfolio VaR under GBM — the problem that consumes the majority of risk desk compute budgets — the Eigen-COS algorithm provides a faster, deterministic, and provably accurate alternative.

                                                ---

                                                Code and Data Availability

                                                The spectral_fenton Python library implementing the Eigen-COS algorithm is open-source. Benchmark scripts reproducing every table in this paper are included: examples/benchmark_tables.py (60-config grid, Tables 1–5), examples/benchmark_adaptive_k.py (multi-\(K\) sweep, Table 6), and examples/benchmark_es.py (ES comparison, Table 9). Installation: pip install spectral-fenton. All Monte Carlo references use seed 42 with antithetic sampling. Repository: https://github.com/tnagy/spectral-fenton.

                                                Formal Verification

                                                The mathematical foundations of the Eigen-COS method have been formally verified in Lean 4 using the Mathlib library (59 source files, 120+ machine-checked theorems, 0 sorry, 0 errors). For practitioners, the key verified results are:

                                                • VaR computability: the spectral CDF is continuous with \(F(a)=0\), \(F(b)=1\), so VaR exists by the Intermediate Value Theorem for any \(\alpha \in (0,1)\).
                                                • VaR accuracy: \(|\text{VaR}_N(\alpha) - \text{VaR}(\alpha)| \le \varepsilon / f(\text{VaR}(\alpha))\), bridging the CDF error bound to quantile accuracy.
                                                • ES closed form: the antiderivative of \(x \cdot \cos(\omega x)\) is verified, confirming that ES requires no numerical quadrature.
                                                • Coherence: all four Acerbi (2002) axioms (positive homogeneity, translation invariance, monotonicity, subadditivity) are machine-checked. The subadditivity proof uses the Kusuoka representation (non-negative combination of ES functionals).
                                                • Portfolio optimization: \(\partial\text{VaR}/\partial w_j = -(\partial F/\partial w_j) / f(\text{VaR})\) verified via the implicit function theorem, enabling gradient-based VaR/CVaR optimization.
                                                • Moment recovery: \(\mathbb{E}[S^r] = \sum_k A_k \int x^r \cos_k(x)\,dx\) — moments are computable from the 130 SF coefficients without returning to \((w, \mu, \sigma, C)\).
                                                • Optimality (Nagy, 2026a, Theorem 5): eigenvalue conditioning of \(C\) minimizes the residual CDF error among all rank-\(K\) conditioning strategies, by Eckart-Young.
                                                • Exponential convergence (Nagy, 2026a, Theorem 6): \(\varepsilon_{\text{res}} \le C_0 \cdot r^{K+1}\) under spectral gap — each factor multiplies the improvement.
                                                • Lipschitz stability (Nagy, 2026a, Proposition 9): small changes in \(C\) produce small changes in VaR — no cliff effects in stress testing.
                                                • Non-lognormal extension (Nagy, 2026a, Theorem 7): the framework generalizes to NIG, Student-\(t\), variance-gamma marginals with no structural change.

                                                This means the VaR and ES values computed by the spectral_fenton library are provably coherent risk measures — not by convention or assumption, but by machine-checked mathematical proof. The conditioning is provably optimal, the convergence is provably exponential, and the framework is provably general beyond lognormals. Full details appear in the companion paper (Nagy, 2026a).

                                                Acknowledgements

                                                The author used Large Language Models for assistance with language editing and coding. The author assumes full responsibility for the scientific content.

                                                ---

                                                ---

                                                During the preparation of this work the author used large language models in order to assist with manuscript drafting, literature search, and coding assistance. After using these tools, the author reviewed and edited the content as needed and takes full responsibility for the content of the published article.

                                                ---

                                                References

                                                <!-- All entries sourced from BIBLIOGRAPHY.yaml via nous papers bib format -->

                                                • Abu-Dayya, Abdelaziz A. and Beaulieu, Norman C. (1994). Outage Probabilities in the Presence of Correlated Lognormal Interferers. IEEE Transactions on Vehicular Technology, 43(1), 164-173. DOI: 10.1109/25.282277
                                                • Acerbi, Carlo (2002). Spectral Measures of Risk: A Coherent Representation of Subjective Risk Aversion. Journal of Banking \& Finance, 26(7), 1505-1518. DOI: 10.1016/S0378-4266(02)00281-9
                                                • Acerbi, Carlo and Sz{\'e (2014). Back-testing Expected Shortfall. Risk.
                                                • Barndorff-Nielsen, Ole E. (1997). Normal Inverse Gaussian Distributions and Stochastic Volatility Modelling. Scandinavian Journal of Statistics, 24, 1-13. DOI: 10.1111/1467-9469.00045
                                                • Beaulieu, Norman C. and Xie, Qing (2004). An Optimal Lognormal Approximation to Lognormal Sum Distributions. IEEE Transactions on Vehicular Technology, 53(2), 479-489. DOI: 10.1109/tvt.2004.823494
                                                • Carr, Peter and Madan, Dilip (1999). Option Valuation Using the Fast Fourier. Journal of Computational Finance, 2(4), 61-73. DOI: 10.21314/jcf.1999.043
                                                • Dufresne, Daniel (2004). The Log-Normal Approximation in Financial and Other Computations. Advances in Applied Probability, 36, 747-773. DOI: 10.1239/aap/1093962232
                                                • Fang, Fang and Oosterlee, Cornelis W. (2008). A Novel Pricing Method for European Options Based on Fourier-Cosine Series Expansions. SIAM Journal on Scientific Computing, 31(2), 826-848. DOI: 10.1137/080718061
                                                • Fang, F. and Oosterlee, C.W (2009). "Pricing Early-Exercise and Discrete Barrier Options by Fourier-Cosine Series Expansions." Numerische Mathematik, 114(1), 27–62. Numerische Mathematik, 114(1), 27-62. DOI: 10.1007/s00211-009-0252-4
                                                • Fenton, L. F. (1960). The Sum of Log-Normal Probability Distributions in Scatter Transmission Systems. IRE Transactions on Communications Systems, CS-8, 57-67. DOI: 10.1109/tcom.1960.1097606
                                                • Glasserman, Paul (2003). Monte Carlo Methods in Financial Engineering. Springer.
                                                • Jones, M. C. and Pewsey, A. (2009). Sinh-Arcsinh Distributions. Biometrika, 96(4), 761-780. DOI: 10.1093/biomet/asp053
                                                • Milevsky, Moshe A. and Posner, Steven E. (1998). Asian Options, the Sum of Lognormals, and the Reciprocal Gamma Distribution. Journal of Financial and Quantitative Analysis, 33(3), 409-422. DOI: 10.1142/9789812812599_0007
                                                • Nagy, T (2011). Probability density function for (weighted) sum of n correlated lognormal variables. Nagy, T..
                                                • Nagy, T. (2026). The Exact Latent Distribution of Correlated Lognormal Sums. Working paper.
                                                • Ruijter, M. J., & Oosterlee, C. W (2012). Two-dimensional Fourier cosine series expansion method for pricing financial options. SIAM Journal on Scientific Computing, 34(5). DOI: 10.1137/120862053
                                                • Schwartz, S. C. and Yeh, Y. S. (1982). On the Distribution Function and Moments of Power Sums with Lognormal Components. Bell System Technical Journal, 61, 1441-1462. DOI: 10.1002/j.1538-7305.1982.tb04353.x
                                                • Fang, F. and Shen, X (2022). A Fourier method for risk quantification and allocation of credit portfolios. Fang, F. and Shen, X.. DOI: 10.2139/ssrn.4153482
                                                • Bayer, Christian and Siebenmorgen, Markus and Tempone, Ra{\'u (2018). Smoothing the Payoff for Efficient Computation of Basket Option Prices. Quantitative Finance, 18(3), 491-505. DOI: 10.1080/14697688.2017.1308003
                                                • Eckart, C. and Young, G (1936). "The Approximation of One Matrix by Another of Lower Rank." Psychometrika, 1(3), 211–218. Psychometrika, 1(3), 211-218. DOI: 10.1007/bf02288367
                                                • Lugannani, R. and Rice, S (1980). Saddle point approximation for the distribution of the sum of independent random variables. Lugannani, R. and Rice, S., 12(2), 475-490. DOI: 10.2307/1426607
                                                • Daniels, H.E (1987). Tail probability approximations. Daniels, H.E., 55(1), 37-48. DOI: 10.2307/1403269

                                                Appendix A: Calibration Evidence

                                                We validated the operational policies of Section 2 with three systematic numerical test suites, each consisting of 10 graduated portfolio configurations of increasing difficulty.

                                                A.1 Domain Selection Validation

                                                The hybrid domain policy (Section 2.7) was tested across 10 portfolio configurations ranging from benign (\(n = 2\), \(\rho = 0\), \(\sigma = 0.1\)) to adversarial (\(n = 100\), \(\rho = 0.9\), \(\sigma = 1.5\)). All 10 levels passed within the specified CDF error tolerance (5% L1 norm). The tightest margin was at Level 1 (4.8% vs. 5% threshold). The large-\(n\) configurations (Levels 9 and 10) achieved errors of 2.2% and 3.3%, respectively.

                                                A.2 Adaptive \((K, n_q)\) Validation

                                                The spectrum-driven factor selection and quadrature allocation policy (Section 2.4) was tested across 10 levels spanning the eigenvalue spectrum from concentrated (single dominant factor, \(K = 1\)) to diffuse (many comparable eigenvalues, \(K \ge 8\)). All 10 levels passed. The strictest levels achieved margins of 2.52% vs. 3.0% threshold (Level 8) and 1.15% vs. 1.2% threshold (Level 10).

                                                A.3 Critical Regime

                                                The most challenging configuration is \(n = 10\) with \(K = 9\) factors and budget-constrained \(n_q = 2\). In this regime, domain width has first-order impact:

                                                Domain policy VaR error
                                                Baseline wide domain \(\approx 14.1\%\)
                                                Hybrid near-unit domain \(\approx 3.2\%\)

                                                The factor-of-four improvement confirms that the hybrid domain policy and the adaptive \((K, n_q)\) selection jointly control the dominant error sources. This calibration evidence underpins the production recommendation of Section 5.2: the hybrid domain policy should always be enabled when \(n \le 20\) and \(n_q = 2\).

                                                A.4 Ensemble CDF Blending Validation

                                                A third gym track tests whether the eigenvalue-conditional architecture works with a simpler inner evaluator — replacing the 128-term COS expansion with a 2-moment Fenton-Wilkinson (FW) lognormal match per conditional scenario. This "lightweight Eigen-COS" requires no COS machinery: only eigendecomposition, GH quadrature, and FW CDF evaluation.

                                                All 10 levels passed (runtime: 2.8s). Verified results from the graduated gym run:

                                                Level Portfolio VaR error Tolerance Selection
                                                L1 2-asset low vol (near-Gaussian) 0.14% 3% FW
                                                L2 4-asset moderate vol 0.30% 4% FW
                                                L3 4-asset crypto (high skew) 0.42% 6% FW
                                                L4 5-asset uniform \(\sigma=1.0\) 2.73% 8% FW
                                                L5 10-asset equicorr, low vol 2.91% 4% FW
                                                L6 10-asset equicorr, high vol 3.45% 8% FW
                                                L7 Long-short 4-asset 0.40% 8% Gaussian
                                                L8 20-asset moderate spectrum 0.40% 5% FW
                                                L9 5-asset \(\sigma=1.5\) (extreme tail) 7.39% 10% FW
                                                L10 50-asset flat spectrum 3.27% 8% FW

                                                The blend optimizer selects pure Fenton-Wilkinson for 9 of 10 levels, confirming that the lognormal convolution approximation dominates when eigenvalue conditioning has reduced the conditional volatility. The sole exception is L7 (long-short portfolio), where the solver selects pure Gaussian — negative weights invalidate the lognormal sum assumption, but the near-zero spread is well-approximated by a Gaussian. The tightest result is L1 at 0.14% error; the loosest is L9 at 7.39% (extreme \(\sigma = 1.5\)), still within its 10% tolerance.

                                                Implication: The eigenvalue-conditional architecture is the key structural contribution, not the COS expansion specifically. This validates the method's extensibility to alternative inner evaluators (NIG, variance-gamma, empirical CDF) and positions a lightweight variant for practitioners who want VaR accuracy without the Fourier machinery (Section 5.4).

                                                ---

                                                Appendix B: Heterogeneous Correlation Benchmark

                                                The 60-configuration benchmark of Section 4 uses equicorrelated matrices by design (to isolate domain truncation effects). Here we benchmark on 5 portfolios with heterogeneous correlation structures and unequal weights, confirming that the adaptive policy selects \(K > 1\) when needed.

                                                Table B1. Heterogeneous portfolio benchmark (adaptive \(K\), \(\alpha = 0.01\), MC \(10^7\) reference).

                                                Portfolio \(n\) \(K\) selected \(n_q\) VaR error ES error SF time
                                                Crypto+Bonds (Sec. 4.7) 4 3 10 0.92% 0.58% 329 ms
                                                3-Sector Equity 9 1 16 3.01% 3.44% 14 ms
                                                Long-Short Hedge Fund 6 1 16 8.72% 7.91% 10 ms
                                                FAANG Concentrated 5 1 16 2.53% 3.24% 8 ms
                                                Global Multi-Asset 20 2 8 1.34% 1.49% 109 ms

                                                Key observations:

                                                • The adaptive policy selected \(K = 3\) for Crypto+Bonds (block-structured BTC/ETH vs bond correlation) and \(K = 2\) for Global Multi-Asset (4 asset-class blocks). These are exactly the portfolios where the correlation structure has multiple distinct eigenspaces.
                                                • The 3-Sector, Long-Short, and FAANG portfolios stayed at \(K = 1\): the dominant eigenvector captures the bulk of portfolio variance despite heterogeneous correlations.
                                                • The Long-Short portfolio (8.72% VaR error) is in the domain-truncation regime — the near-zero portfolio value pushes the 1% quantile into a boundary region. The lightweight Eigen-FW variant (Appendix A.4) would perform better here.
                                                • Mean VaR error across the 5 heterogeneous portfolios: 3.30%, comparable to the 3.40% mean on the equicorrelated grid, confirming that the method generalizes beyond the benchmark grid's special structure.

                                                ---

                                                Appendix C: Algorithmic Summary

                                                `` INPUT: w (n), mu (n), sigma (n), C (n x n), alpha

                                                STEP 1: Eigendecompose C -> eigenvalues lambda, eigenvectors V Select K factors: cumulative portfolio variance > tau (default 0.90) Set n_q from budget constraint (n_q^K < 5000), Q = n_q^K

                                                STEP 2: Precompute domain bounds [a, b] from analytic moments Apply hybrid domain policy if n <= 20 and n_q = 2

                                                STEP 3: For each COS frequency k = 0, ..., 127: For each outer quadrature scenario q = 1, ..., Q: Shift means: mu_i^(q) = mu_i + sigma_i (A y_q)_i Reduce volatilities: sigma_tilde_i = sigma_i * sqrt(C_res_ii) Conditional CF: phi_q(t_k) = Product_{i=1}^{n} GH_32(...) COS coefficient: A_{k,q} = (2/(b-a)) Re[phi_q(t_k) exp(-ikpia/(b-a))] Merge: A_k = Sum_{q=1}^{Q} w_q^{GH} A_{k,q}

                                                STEP 4: Store {A_0, ..., A_127, a, b} — the SF Distribution (130 numbers)

                                                STEP 5: Query: CDF(x) = A_0/2 (x-a)/(b-a) + Sum_k A_k/(kpi) * sin(...) PDF(x) = 1/(b-a) [A_0/2 + Sum_k A_k cos(...)] VaR(alpha) = brentq(CDF(x) - alpha, a, b) ES(alpha) = closed-form from {A_k*} via term-by-term integration

                                                OUTPUT: VaR, ES, CDF, PDF, any spectral risk measure — all from 130 coefficients ``

                                                Implementation notes. GH nodes/weights precomputed once; COS frequencies are a simple arithmetic sequence (no FFT). All trigonometric evaluations use numpy vectorized operations; CDF for 1000 points reduces to a single matrix-vector multiply. Memory: 1.04 KB per portfolio (130 floats \(\times\) 8 bytes); peak intermediate \(\sim\)4 MB, freed after merge. A reference Python implementation is available from the author.

Browse all Quantitative Finance papers →