|
From: Brian S. <bri...@gm...> - 2020-11-24 20:23:32
|
Hi,
Typically we build interest rate term structure as below -
from QuantLib import *
import math
todaysDate = Date(1, 9, 2019)
Settings.instance().evaluationDate = todaysDate
dayCount = Actual365Fixed()
calendar = Canada()
interpolation = Linear()
compounding = Compounded
compoundingFrequency = Continuous
spotDates = [todaysDate, todaysDate + Period("6m"), todaysDate +
Period("1y"), todaysDate + Period("2y"), todaysDate + Period("3y")]
spotRates = [0, 0.061682, 0.066682, 0.067199, 0.067502]
spotCurve = ZeroCurve(spotDates, spotRates, dayCount, calendar,
interpolation, compoundingFrequency)
spotCurveHandle = YieldTermStructureHandle(spotCurve)
However in my spotRates object, the interest rates upto 1 year i.e.
[0.061682, 0.066682] are defined as simple interest, however for the
remaining cases it is Annually compounded.
Under this scenario, is the building term structure using the above
approach still correct?
Your insight is highly appreciated.
Many thanks,
|