QuantLib icon indicating copy to clipboard operation
QuantLib copied to clipboard

Adding the overnightSchedule to ql.OvernightIndexedSwap constructor in Python

Open QuantAnalyst89 opened this issue 1 year ago • 2 comments

Need help with adding the overnightSchedule to ql.OvernightIndexedSwap constructor in Python as done in C++: https://rkapl123.github.io/QLAnnotatedSource/d5/d34/class_quant_lib_1_1_overnight_indexed_swap.html

QuantAnalyst89 avatar Apr 08 '25 14:04 QuantAnalyst89

QuantLib-SWIG already export the interface for the OvernightIndexedSwap that takes the overnightSchedule, look at the following line.

paolodelia99 avatar Apr 18 '25 14:04 paolodelia99

That's a different constructor but yes, it provides the same functionality (in fact, it's a bit more general).

In the Python layer I'd try not to add too many overloaded constructors if it can be helped; the ideal thing would be to have just one constructor exported that covers all the cases, so we can enable keyword arguments (SWIG can't provide them when a method is overloaded.)

lballabio avatar Apr 24 '25 09:04 lballabio

This issue was automatically marked as stale because it has been open 60 days with no activity. Remove stale label or comment, or this will be closed in two weeks.

github-actions[bot] avatar Jun 24 '25 02:06 github-actions[bot]

This issue was automatically closed because it has been stalled for two weeks with no further activity.

github-actions[bot] avatar Jul 08 '25 02:07 github-actions[bot]