Login  Register

Re: Cash flow schedule from Vanilla Swap

Posted by KK on Sep 18, 2014; 2:20am
URL: http://quantlib.414.s1.nabble.com/Cash-flow-schedule-from-Vanilla-Swap-tp8425p15873.html


Is there a way to get this vector of cashflows in Python QL?

fixedSchedule = Schedule(settlementDate, maturity,
                             fixedLegTenor, calendar,
                             fixedLegAdjustment, fixedLegAdjustment,
                             DateGeneration.Forward, False)

print [x for x in fixedSchedule]

will return the dates, but without the cashflows.

Thanks

KK
Luigi Ballabio wrote
On Wed, 2010-09-29 at 18:55 +0200, [hidden email] wrote:
> Hello,
> I have created a Vanilla Swap [...]as follow
>
> boost::shared_ptr<VanillaSwap> swap_ptr(new VanillaSwap(swap_type,principal,
> swaption_FixedSch,strike,swap_FixedLegDc,swaption_FloatingSch,
> swaption_FloatingLegIndex,0.0,swaption_FloatLegDc));
>
> How can I show the cash flows for each one of the leg?

swap_ptr->fixedLeg() and swap_ptr->floatingLeg() will give you two
vectors of CashFlow instances.

Luigi


--

The First Rule of Optimization: Don't do it.
The Second Rule of Optimization (For experts only): Don't do it yet.
-- Michael Jackson



------------------------------------------------------------------------------
Virtualization is moving to the mainstream and overtaking non-virtualized
environment for deploying applications. Does it make network security
easier or more difficult to achieve? Read this whitepaper to separate the
two and get a better understanding.
http://p.sf.net/sfu/hp-phase2-d2d
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users