-
Notifications
You must be signed in to change notification settings - Fork 553
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IRS Delta #76
Comments
Hi Raj, You can use |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In
https://github.com/google/tf-quant-finance/tree/master/tf_quant_finance/experimental/pricing_platform/framework/rate_instruments/interest_rate_swap/interest_rate_swap_impl.py
under def ir_delta it says
raise NotImplementedError("Coming soon.")
In ir_delta_parallel_leg, I see that:
if shock_size is None:
bump = tf.constant(0, dtype=self._dtype,
name="bump")
return tff_math.fwd_gradient(price_fn, bump)
So when no shocks are supplied - its just fwd_gradient. Isn't that the AAD equiv of the bump and reval change in PV?
But when a shock size is supplied, you bump the base curve (as a parallel bump) and then:
price_no_bump = leg.price(processed_market_data)
price_with_bump = price_fn(shock_size)
delta = (price_with_bump - price_no_bump) / shock_size
return delta
So in effect, ir_delta_parallel has the potential to supply both delta's? (AAD equiv and parallel shocked
The text was updated successfully, but these errors were encountered: