Skip to content

Commit

Permalink
Merge pull request #32 from igitur/CPIBondHelper
Browse files Browse the repository at this point in the history
CPIBondHelper
  • Loading branch information
igitur committed Jun 24, 2014
2 parents cd7660e + 62a6688 commit a78c9ac
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion QLNet/Termstructures/Yield/Bondhelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,5 +102,25 @@ public FixedRateBondHelper(Handle<Quote> price, int settlementDays, double faceA
{
fixedRateBond_ = bond_ as FixedRateBond;
}
}
}

public class CPIBondHelper : BondHelper
{
protected CPIBond cpiBond_;
public CPIBond cpiBond() { return cpiBond_; }

public CPIBondHelper(Handle<Quote> price, int settlementDays, double faceAmount, bool growthOnly, double baseCPI,
Period observationLag, ZeroInflationIndex cpiIndex, InterpolationType observationInterpolation,
Schedule schedule, List<double> fixedRate, DayCounter dayCounter, BusinessDayConvention paymentConvention,
double redemption, Date issueDate, Calendar paymentCalendar = null,
Period exCouponPeriod = null, Calendar exCouponCalendar = null,
BusinessDayConvention exCouponConvention = BusinessDayConvention.Unadjusted, bool exCouponEndOfMonth = false,
bool useCleanPrice = true)
: base(price, new CPIBond(settlementDays, faceAmount, growthOnly, baseCPI, observationLag, cpiIndex, observationInterpolation, schedule,
fixedRate, dayCounter, paymentConvention, issueDate, paymentCalendar, exCouponPeriod, exCouponCalendar,
exCouponConvention, exCouponEndOfMonth), useCleanPrice)
{
cpiBond_ = bond_ as CPIBond;
}
}
}

0 comments on commit a78c9ac

Please sign in to comment.