Re: qlLegDuration shows wrong number while qlLegBPS & NPV is correct

Posted by Ferdinando M. Ametrano-2 on
URL: http://quantlib.414.s1.nabble.com/qlLegDuration-shows-wrong-number-while-qlLegBPS-NPV-is-correct-tp14566p14568.html

why 2.6 doesn't make sense to you?


On Tue, Oct 8, 2013 at 8:49 PM, imachabeli <[hidden email]> wrote:
In the same spreadsheet for the same vanilla ATM 5Y usd swap I'm computing
duration and BPS,NPV
While bps shows 485(correct value for ATM 5Y)
=qlLegBPS(FixedLeg,TermStructure,IncludeSettlementDateFlows,SettlementDate)

NPV is close to 0 , also ok

duration produced by formula is 2.6 does not make sense to me

=qlLegDuration(FixedLeg,FixedLegRate,FixedLegDayCounter,"Simple","Semiannual","Modified",IncludeSettlementDateFlows,SettlementDate,SettlementDate)


Does this formula really calculates duration?



--
View this message in context: http://quantlib.10058.n7.nabble.com/qlLegDuration-shows-wrong-number-while-qlLegBPS-NPV-is-correct-tp14566.html
Sent from the quantlib-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users