return the set of cash flows for a bond or a swap - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Finance : Cash Flow Analysis : Finance/CashFlows

Finance[CashFlows] - return the set of cash flows for a bond or a swap

Calling Sequence

CashFlows(instrument, date)

Parameters

instrument

-

swap or bond; financial instrument

date

-

a string containing a date specification in a format recognized by ParseDate or a date data structure; date

Description

• 

The CashFlows command returns the set of cash flows for a swap or a bond to occur after the given date.

Examples

withFinance:

First set the global evaluation date.

SetEvaluationDateJanuary 02, 2006:

EvaluationDate

January 2, 2006

(1)

Consider two payment schedules. The first one consists of payments of 5% of the nominal every month between January 3, 2007 and January 3, 2010. The second one consists of payments of 3% of the nominal every quarter between January 3, 2006 and January 3, 2010.

Schedule1:=ScheduleJanuary 03, 2007,January 03, 2010,Monthly

Schedule1:=moduleend module

(2)

Schedule2:=ScheduleJanuary 03, 2006,January 03, 2010,Quarterly

Schedule2:=moduleend module

(3)

Rate1:=0.05

Rate1:=0.05

(4)

Rate2:=BenchmarkRate0.03

Rate2:=moduleend module

(5)

Consider two simple swaps that exchange the first set of payments for the second set.

Swap1:=InterestRateSwap1000,Rate1,Schedule1,Rate2,Schedule2,0.03

Swap1:=moduleend module

(6)

Swap2:=InterestRateSwap1000,Rate2,Schedule2,Rate1,Schedule1,0.03

Swap2:=moduleend module

(7)

Here is the set of cash flows for the paying leg of each swap.

PayingLeg1:=CashFlowsSwap1,paying

PayingLeg1:=4.246575342 on 'February 3, 2007',3.835616438 on 'March 3, 2007',4.246575342 on 'April 3, 2007',4.109589041 on 'May 3, 2007',4.246575342 on 'June 3, 2007',4.109589041 on 'July 3, 2007',4.246575342 on 'August 3, 2007',4.246575342 on 'September 3, 2007',4.109589041 on 'October 3, 2007',4.246575342 on 'November 3, 2007',4.109589041 on 'December 3, 2007',4.245826783 on 'January 3, 2008',4.234972678 on 'February 3, 2008',3.961748634 on 'March 3, 2008',4.234972678 on 'April 3, 2008',4.098360656 on 'May 3, 2008',4.234972678 on 'June 3, 2008',4.098360656 on 'July 3, 2008',4.234972678 on 'August 3, 2008',4.234972678 on 'September 3, 2008',4.098360656 on 'October 3, 2008',4.234972678 on 'November 3, 2008',4.098360656 on 'December 3, 2008',4.235721237 on 'January 3, 2009',4.246575342 on 'February 3, 2009',3.835616438 on 'March 3, 2009',4.246575342 on 'April 3, 2009',4.109589041 on 'May 3, 2009',4.246575342 on 'June 3, 2009',4.109589041 on 'July 3, 2009',4.246575342 on 'August 3, 2009',4.246575342 on 'September 3, 2009',4.109589041 on 'October 3, 2009',4.246575342 on 'November 3, 2009',4.109589041 on 'December 3, 2009',4.246575342 on 'January 3, 2010'

(8)

PayingLeg2:=CashFlowsSwap2,paying

PayingLeg2:=14.82194787 on 'April 3, 2006',14.98694508 on 'July 3, 2006',15.15194910 on 'October 3, 2006',15.15194910 on 'January 3, 2007',14.82194787 on 'April 3, 2007',14.98694508 on 'July 3, 2007',15.15194910 on 'October 3, 2007',15.15127369 on 'January 3, 2008',14.94592054 on 'April 3, 2008',14.94592054 on 'July 3, 2008',15.11047204 on 'October 3, 2008',15.11114744 on 'January 3, 2009',14.82194787 on 'April 3, 2009',14.98694508 on 'July 3, 2009',15.15194910 on 'October 3, 2009',15.15194910 on 'January 3, 2010'

(9)

Here is the set of cash flows for the receiving leg.

ReceivingLeg1:=CashFlowsSwap1,receiving

ReceivingLeg1:=14.82194787 on 'April 3, 2006',14.98694508 on 'July 3, 2006',15.15194910 on 'October 3, 2006',15.15194910 on 'January 3, 2007',14.82194787 on 'April 3, 2007',14.98694508 on 'July 3, 2007',15.15194910 on 'October 3, 2007',15.15127369 on 'January 3, 2008',14.94592054 on 'April 3, 2008',14.94592054 on 'July 3, 2008',15.11047204 on 'October 3, 2008',15.11114744 on 'January 3, 2009',14.82194787 on 'April 3, 2009',14.98694508 on 'July 3, 2009',15.15194910 on 'October 3, 2009',15.15194910 on 'January 3, 2010'

(10)

ReceivingLeg2:=CashFlowsSwap2,receiving

ReceivingLeg2:=4.246575342 on 'February 3, 2007',3.835616438 on 'March 3, 2007',4.246575342 on 'April 3, 2007',4.109589041 on 'May 3, 2007',4.246575342 on 'June 3, 2007',4.109589041 on 'July 3, 2007',4.246575342 on 'August 3, 2007',4.246575342 on 'September 3, 2007',4.109589041 on 'October 3, 2007',4.246575342 on 'November 3, 2007',4.109589041 on 'December 3, 2007',4.245826783 on 'January 3, 2008',4.234972678 on 'February 3, 2008',3.961748634 on 'March 3, 2008',4.234972678 on 'April 3, 2008',4.098360656 on 'May 3, 2008',4.234972678 on 'June 3, 2008',4.098360656 on 'July 3, 2008',4.234972678 on 'August 3, 2008',4.234972678 on 'September 3, 2008',4.098360656 on 'October 3, 2008',4.234972678 on 'November 3, 2008',4.098360656 on 'December 3, 2008',4.235721237 on 'January 3, 2009',4.246575342 on 'February 3, 2009',3.835616438 on 'March 3, 2009',4.246575342 on 'April 3, 2009',4.109589041 on 'May 3, 2009',4.246575342 on 'June 3, 2009',4.109589041 on 'July 3, 2009',4.246575342 on 'August 3, 2009',4.246575342 on 'September 3, 2009',4.109589041 on 'October 3, 2009',4.246575342 on 'November 3, 2009',4.109589041 on 'December 3, 2009',4.246575342 on 'January 3, 2010'

(11)

mapt→t':-amount',PayingLeg1

4.246575342,3.835616438,4.246575342,4.109589041,4.246575342,4.109589041,4.246575342,4.246575342,4.109589041,4.246575342,4.109589041,4.245826783,4.234972678,3.961748634,4.234972678,4.098360656,4.234972678,4.098360656,4.234972678,4.234972678,4.098360656,4.234972678,4.098360656,4.235721237,4.246575342,3.835616438,4.246575342,4.109589041,4.246575342,4.109589041,4.246575342,4.246575342,4.109589041,4.246575342,4.109589041,4.246575342

(12)

mapt→t':-amount',PayingLeg2

14.82194787,14.98694508,15.15194910,15.15194910,14.82194787,14.98694508,15.15194910,15.15127369,14.94592054,14.94592054,15.11047204,15.11114744,14.82194787,14.98694508,15.15194910,15.15194910

(13)

See Also

Finance[CompoundFactor], Finance[DiscountFactor], Finance[FixedRateCoupon], Finance[InArrearIndexedCoupon], Finance[ParCoupon], Finance[SimpleCashFlow], Finance[UpFrontIndexedCoupon], Finance[ZeroCurve]


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam