Skip to content

Honor the payer/receiver direction in variance swap valuation - #469

Merged
domokane merged 1 commit into
FinancePy-Org:masterfrom
Kiril1Shevtsov:fix/variance-swap-direction
Nov 23, 2026
Merged

domokane merged 1 commit into
FinancePy-Org:masterfrom
Kiril1Shevtsov:fix/variance-swap-direction

Conversation

@Kiril1Shevtsov

Copy link
Copy Markdown
Contributor

Summary

Both EquityVarianceSwap.value and FinFXVarianceSwap.value accepted pay_strike_flag but valued both sides as if they paid the fixed strike. Preserve the default and explicit pay-strike values, and negate the net payoff when receiving the strike. Date weighting, discounting and fair-strike calculations are unchanged.

Validation

  • The regression covers both products at inception, mid-life above and below strike, at maturity and at par, against a separate 60-digit Decimal payoff calculation.
  • On dc67292, eight receive-strike cases failed before the fix; all 37 focused cases and all 1,914 unit tests passed with the patch.
  • The patch applies cleanly on 8e98ebb; the swap and test source used by the earlier run is unchanged. The full suite was not rerun on the newer base.

@Kiril1Shevtsov
Kiril1Shevtsov marked this pull request as ready for review November 23, 2026 17:13
@domokane
domokane merged commit 20e42c3 into FinancePy-Org:master Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants