Repository navigation
Conversation
This branch has not been deployed
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.
Summary
Fixes #221.
This PR extends$(f, c)$ per period and Global Caps/Floors $(F, C)$ at maturity, as requested in Issue #221.
EquityCliquetOptionto support Local Caps/FloorsKey Changes
EquityCliquetOption.__init__):local_floor,local_cap,global_floor, andglobal_cap.notionalremains the 7th argument and existing positional/keyword calls retain default unconstrained behavior:_validate):CliquetPayoffTypes.MATURITY.value()):CliquetTypes.RETURNwith local floor/cap via forward-start vanilla option decomposition.FinErrorif global caps/floors are specified withvalue(), directing users tovalue_mc().value_mc()):MATURITYpayoff type, global floor/cap is applied to cumulative payoff before discounting:__repr__):Mathematical Formulation
1. Local Capped & Floored Return Decomposition
For a cliquet option with reset dates$t_0 < t_1 < \dots < t_N$ , let the period return be $R_i = \frac{S(t_i) - S(t_{i-1})}{S(t_{i-1})}$ .
With local floor$f$ and local cap $c$ ($f \le c$ ):
For a Call Cliquet, the discounted expected payoff for period$i$ under risk-neutral measure $\mathbb{Q}$ decomposes into:
where$\tau_i = t_i - t_{i-1}$ and $C_{\text{BS}}(S_0, K, \tau)$ is the Black-Scholes European call formula with strike $K$ and spot $S_0 = 1.0$ .
For a Put Cliquet ($R_i = \frac{S(t_{i-1}) - S(t_i)}{S(t_{i-1})}$ ):
Using Put-Call parity, this decomposes into:
2. Global Bounds (Maturity Payoff)
For a globally floored and locally capped (GFLC) cliquet with cumulative return payoff at maturity$t_N$ :
Priced via Monte Carlo simulation with exact lognormal state transitions.
Testing & Verification
Comprehensive test suite added to
tests/unit/test_FinEquityCliquetOption.py:FinError.