Hello,
I have just installed QUantLib-Python 1.8 and I am trying to price a very simple FRA contract but I am not able to retrieve the NPV.(): actually the only number I get as NPV is zero which it is not possible. I am sure I am missing something.
Could you please advice where I am doing a mistake; here below the code.
Thank you for the help
Best regards,
P
nowdate=QuantLib.Date(23,QuantLib.March,2017)
basis=QuantLib.Actual360()
calendar=QuantLib.TARGET()
yc=impYieldCurve(nowdate,calendar,basis)
r=0.02
yc.flatCurve(r)
flatcurve=yc.yieldcurve
maturitydate=QuantLib.Date(3,QuantLib.July,2017)
expirydate=QuantLib.Date(3,QuantLib.October,2017)
euribor3m=QuantLib.Euribor3M()
euribor3m.addFixing(QuantLib.Date(21,QuantLib.March,2017),0.02)
instr=QuantLib.ForwardRateAgreement(nowdate,maturitydate,QuantLib.Position.Long,0.023,1000000.0,euribor3m,flatcurve)
qlpv=instr.NPV()
print(qlpv)
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org!
http://sdm.link/slashdot_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users