quantdata.dysanos.implied.decoder#

Continuous total-variance interpolation for direct PCA IV surfaces.

class quantdata.dysanos.implied.decoder.PCATotalVarianceDecoder(pca, *, normalized_strikes=None)[source]#

Bases: object

Decode and interpolate a PCA state as a fixed-surface price map.

Total variance is linearly interpolated first in normalized moneyness and then in maturity after adding w(0,z)=0. The normalized-moneyness wings are flat. Maturities outside [0, max(training_expiry)] are rejected.

Relative strikes use NormalizedStrikes with the interpolated ATM volatility at the query maturity. The epsilon-volatility scale is the ATM volatility at the shortest decoded expiry, matching how the historical regular grid is constructed.

grid_implied_vols(scores)[source]#
total_variance(scores, maturities, normalized_moneyness)[source]#

Interpolate decoded total variance at arbitrary (T,z) queries.

relative_strikes_from_nms(scores, maturities, normalized_moneyness)[source]#

Convert NMS coordinates to relative strikes using decoded ATM IV.

nms_from_relative_strikes(scores, maturities, relative_strikes)[source]#

Convert relative strikes to NMS using the decoded ATM IV.

implied_volatility(scores, maturities, relative_strikes)[source]#

Evaluate positive implied volatility at arbitrary fixed strikes.

normalized_call_prices(scores, maturities, relative_strikes)[source]#

Price zero-rate normalized calls from the complete PCA surface.

cash_call_prices(scores, spots, maturities, cash_strikes)[source]#

Price fixed cash-strike contracts as S*c(T,k/S).

cash_deltas(scores, spots, maturities, cash_strikes, *, relative_step=1e-05)[source]#

Differentiate the complete fixed-surface cash price map centrally.

class quantdata.dysanos.implied.decoder.WingHitDiagnostics(*, queries, left_hits, right_hits)[source]#

Bases: object

Counts of flat normalized-moneyness extrapolation.

property total_hits: int#
property hit_fraction: float#