Repository navigation
feat(sabrcube): expose ATM-calibrated vol cube and fix Normal strike-spread mapping - #1477
Merged
Merged
Conversation
Store `volCubeAtmCalibrated_` (hpp:409, accessor hpp:1055-1058) as a `vol_cube_atm_calibrated` field on the SABR cube instead of a local in `perform_calculations`, building it from the market vol cube and widening it over the ATM grid when `is_atm_calibrated`. Add the `vol_cube_atm_calibrated_values` accessor so callers can read the ATM-calibrated cube's vols per strike spread at a given option time and swap length. On a cube that is not `is_atm_calibrated` it equals the market cube; otherwise it carries the interpolated spreads over the ATM grid. Core-only: the sibling sparse, dense and guess accessors are not bound in C, Go or Python. Add a test covering both a sparse-only and an ATM-calibrated cube, asserting the values match the market cube at every sparse node and that only the calibrated cube differs at the widened 5Y x 5Y node. ref #1417
Port the v1.44 Normal corner-strike branch of `spreadVolInterpolation` (sabrswaptionvolatilitycube.hpp:976-980): a Normal cube now maps the strike to each sparse corner as `F_ij + K - F`, while the lognormal arm keeps the shifted moneyness map unchanged. Before the branch the dense Normal cube reused the ratio-moneyness map, leaving actual - expected at -1.997e-4; the strike-spread map closes it to -1.7e-18. Port the oracle `testSabrNormalTwoPassUsesStrikeSpreadMoneyness` (swaptionvolatilitycube.cpp:194-313), asserting the dense 5Y x 5Y +2% node equals its ATM vol plus the bilinear blend of the four corner spreads read at `F_ij + 2%` to 1e-12, and differs from the ratio-moneyness blend by the 1.997e-4 gap (> 1e-8). `testSabrNormalVolatility` worst ATM error moves to 6.3301e-4 (QL-Python 1.44: 6.3302e-4 on the same A360 curve). No binding values change: no binding test builds a Normal cube. singlePass is #1451. close #1417
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The SABR swaption volatility cube needed a way to read ATM-calibrated vols and corrected handling of Normal-cube strike spreads, which previously reused the lognormal ratio-moneyness map and produced incorrect dense-node vols.
vol_cube_atm_calibrated_valuesaccessor so callers can read the ATM-calibrated cube's per-strike-spread vols at a given option time and swap length; on a non-calibrated cube it matches the market cube.F_ij + K - F, leaving the lognormal shifted-moneyness map unchanged, closing the dense-node error from -1.997e-4 to effectively zero.These changes are core-only; no language bindings or binding test values are affected.
Closes #1417