Skip to content
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

Expose OvernightIndexedCouponPricer #2024

Conversation

ralfkonrad
Copy link
Contributor

No description provided.

@coveralls
Copy link

coveralls commented Jul 16, 2024

Coverage Status

coverage: 72.639% (-0.003%) from 72.642%
when pulling 1c9494a on ralfkonrad:feature/expose_OvernightIndexedCouponPricer
into 2243398 on lballabio:master.

@lballabio
Copy link
Owner

Is this because you have another pricer to use instead of this one?

@ralfkonrad
Copy link
Contributor Author

Not exactly. I'm currently working on harmonizing things between ORE and QuantLib. #2022 and #2020 are also part of this effort.

One (mid- to long-term) goal would be to replace the ORE implementation in here again by the QuantLib one and (if wanted) "donated" the CappedFlooredOvernightIndexedCoupon also to QuantLib.

Also, it is a bit inconsistent, that the OvernightIndexedCouponPricer is hidden "behind the scenes" but the (experimental) ArithmeticAveragedOvernightIndexedCouponPricer is exposed.

We might also move the pricer into its own header and source file.

Long story short: Exposing the pricer would make things easier.

@lballabio
Copy link
Owner

Ok, I'm sold. As we make it visible, I would rename it to something more specific though.

Also, may I ask if you can have a look at the ql/experimental/averageois/ and see what's still useful in there? From a quick look it seems that ArithmeticAverageOIS can probably be superseded by OvernightIndexedSwap now, and the same goes for the helper. If that's indeed the case, we might move the arithmetic pricer out of experimental and deprecate the rest.

@ralfkonrad
Copy link
Contributor Author

Sounds good! I'll have a look.

@ralfkonrad ralfkonrad marked this pull request as draft July 29, 2024 14:21
@ralfkonrad
Copy link
Contributor Author

Also, may I ask if you can have a look at the ql/experimental/averageois/ and see what's still useful in there? From a quick look it seems that ArithmeticAverageOIS can probably be superseded by OvernightIndexedSwap now, and the same goes for the helper. If that's indeed the case, we might move the arithmetic pricer out of experimental and deprecate the rest.

I think what is missing in OvernightIndexedSwap compared to ArithmeticAverageOIS is the

        MakeArithmeticAverageOIS& withArithmeticAverage(
                                       Real meanReversionSpeed = 0.03,
                                       Real volatility = 0.00, // NO convexity adjustment by default
                                       bool byApprox = false); // TRUE to use Katsumi Takada approximation

feature. Currently, we can't pass these parameters neither to the OIS or the OICoupon. So it can't be set in the ArithmeticAveragedOvernightIndexedCouponPricer and the defaults are used. However, I would like to keep this outside of this PR.

Two remaining questions:

  1. Should we keep CompoundingOvernightIndexedCouponPricer inside ql/cashflows/overnightindexedcoupon.hpp or outside in its own header/source files?
  2. Should we keep ArithmeticAveragedOvernightIndexedCouponPricer experimental or e.g. combine it with CompoundingOvernightIndexedCouponPricer into ql/cashflows/overnightindexedcouponpricer.hpp?

@lballabio
Copy link
Owner

I guess losing withArithmeticAverage is ok, those parameters belong to the pricer anyway, not to the swap. But yes, let's keep this out of this PR.

I would go for option 2.

@ralfkonrad ralfkonrad force-pushed the feature/expose_OvernightIndexedCouponPricer branch from 60422b7 to 3ac8752 Compare July 30, 2024 16:40
@ralfkonrad
Copy link
Contributor Author

Any idea why this check fails, I guess it is a false positive?!

ArithmeticAveragedOvernightIndexedCouponPricer::coupon_ is obviously used in the source file.

@lballabio
Copy link
Owner

False positive, not the first I see with that check on Codacy. I've shut it down.

@ralfkonrad ralfkonrad marked this pull request as ready for review July 30, 2024 20:16
@lballabio lballabio added this to the Release 1.36 milestone Aug 5, 2024
@lballabio lballabio merged commit 4e5dd72 into lballabio:master Aug 5, 2024
42 checks passed
@ralfkonrad ralfkonrad deleted the feature/expose_OvernightIndexedCouponPricer branch August 6, 2024 08:15
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.

3 participants