Skip to content

Commit 9e0dce9

Browse files
committed
Merge branch 'QPR-12253_parSensiTBS' into 'master'
QPR-12253 changes TBS ONIBS interface Closes QPR-12253 See merge request qs/oreswig!52
2 parents e25c377 + e37822e commit 9e0dce9

3 files changed

Lines changed: 8 additions & 4 deletions

File tree

OREAnalytics-SWIG/Python/test/test_instruments.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ def setUp(self):
340340
self.LIBOR_spread = 0.0
341341
self.swap = OvernightIndexedBasisSwap(self.type, self.nominal, self.schedule,
342342
self.OIS_index, self.schedule, self.LIBOR_index,
343-
self.OIS_spread, self.LIBOR_spread)
343+
True, self.OIS_spread, self.LIBOR_spread)
344344
self.engine = DiscountingSwapEngine(self.OIS_term_structure)
345345
self.swap.setPricingEngine(self.engine)
346346

@@ -362,13 +362,13 @@ def testConsistency(self):
362362
fair_OIS_spread = self.swap.fairOvernightSpread()
363363
swap = OvernightIndexedBasisSwap(self.type, self.nominal, self.schedule,
364364
self.OIS_index, self.schedule, self.LIBOR_index,
365-
fair_OIS_spread, self.LIBOR_spread)
365+
True, fair_OIS_spread, self.LIBOR_spread)
366366
swap.setPricingEngine(self.engine)
367367
self.assertFalse(abs(swap.NPV()) > tolerance)
368368
fair_LIBOR_spread = self.swap.fairIborSpread()
369369
swap = OvernightIndexedBasisSwap(self.type, self.nominal, self.schedule,
370370
self.OIS_index, self.schedule, self.LIBOR_index,
371-
self.OIS_spread, fair_LIBOR_spread)
371+
True, self.OIS_spread, fair_LIBOR_spread)
372372
swap.setPricingEngine(self.engine)
373373
self.assertFalse(abs(swap.NPV()) > tolerance)
374374

QuantExt-SWIG/SWIG/qle_instruments.i

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,10 @@ class OvernightIndexedBasisSwap : public Swap {
137137
const ext::shared_ptr<OvernightIndex>& overnightIndex,
138138
const QuantLib::Schedule& iborSchedule,
139139
const ext::shared_ptr<IborIndex>& iborIndex,
140+
const bool spreadOnShort = true,
140141
QuantLib::Spread oisSpread = 0.0,
141-
QuantLib::Spread iborSpread = 0.0);
142+
QuantLib::Spread iborSpread = 0.0,
143+
const bool telescopicValueDates = false);
142144
QuantLib::Real nominal() const ;
143145
const QuantLib::Schedule& oisSchedule();
144146
const QuantLib::Schedule& iborSchedule();

QuantExt-SWIG/SWIG/qle_tenorbasisswap.i

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ class TenorBasisSwap : public Swap {
7979
const QuantLib::Period& shortPayTenor,
8080
QuantLib::DateGeneration::Rule rule = QuantLib::DateGeneration::Backward,
8181
bool includeSpread = false,
82+
bool spreadOnShort = true,
8283
QuantExt::SubPeriodsCoupon1::Type type = QuantExt::SubPeriodsCoupon1::Compounding);
8384
TenorBasisSwap(QuantLib::Real nominal,
8485
bool payLongIndex,
@@ -89,6 +90,7 @@ class TenorBasisSwap : public Swap {
8990
const ext::shared_ptr<IborIndex>& shortIndex,
9091
QuantLib::Spread shortSpread,
9192
bool includeSpread = false,
93+
bool spreadOnShort = true,
9294
QuantExt::SubPeriodsCoupon1::Type type = QuantExt::SubPeriodsCoupon1::Compounding);
9395
QuantLib::Real nominal() const;
9496
bool payLongIndex();

0 commit comments

Comments
 (0)