Can someone please help with the pricing of the following forward rate agreement using QuantLib Python?
A 3x6 forward rate agreement, with a notional of $100,000, the FRA rate being 6%, The FRA settlement date is after 3 months (90 days) and the settlement is based on a 90-day USDLIBOR.
My valuation date is 30 June 2020.
This is my attempt:
import QuantLib as ql
startDate = ql.Date(30, 6, 2020)
ql.Settings.instance().evaluationDate = startDate
spotDates = [ql.Date(30, 6, 2020), ql.Date(31, 12, 2020), ql.Date(30, 6, 2021)]
spotRates = [0.05, 0.05, 0.05]
dayConvention = ql.Thirty360()
calendar = ql.UnitedStates()
maturityDate = calendar.advance(startDate, ql.Period('3M'))
compounding = ql.Simple
compoundingFrequency = ql.Annual
spotCurve = ql.ZeroCurve(spotDates, spotRates, dayConvention, calendar, ql.Linear(), compounding, compoundingFrequency)
spotCurve.enableExtrapolation()
spotCurveHandle = ql.YieldTermStructureHandle(spotCurve)
index = ql.USDLibor(ql.Period('3M'), spotCurveHandle)
index.addFixing(ql.Date(26, 6, 2020), 0.05)
notional = 100000
rate = 0.06
fra = ql.ForwardRateAgreement(startDate, maturityDate, ql.Position.Long, rate, notional, index, spotCurveHandle)
print('NPV:', fra.NPV())
And this is the answer that I get:
NPV: 0.0
The answer that I'm getting is not correct.