Finance
CashFlows
return the set of cash flows for a bond or a swap
Calling Sequence
Parameters
Description
Examples
Compatibility
CashFlows(instrument, date)
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
The CashFlows command returns the set of cash flows for a swap or a bond to occur after the given date.
with⁡Finance:
First set the global evaluation date.
SetEvaluationDate⁡January 02, 2006:
EvaluationDate⁡
January 2, 2006
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≔Schedule⁡January 03, 2007,January 03, 2010,Monthly
Schedule1 ≔ moduleend module
Schedule2≔Schedule⁡January 03, 2006,January 03, 2010,Quarterly
Schedule2 ≔ moduleend module
Rate1≔0.05
Rate2≔BenchmarkRate⁡0.03
Rate2 ≔ moduleend module
Consider two simple swaps that exchange the first set of payments for the second set.
Swap1≔InterestRateSwap⁡1000,Rate1,Schedule1,Rate2,Schedule2,0.03
Swap1 ≔ moduleend module
Swap2≔InterestRateSwap⁡1000,Rate2,Schedule2,Rate1,Schedule1,0.03
Swap2 ≔ moduleend module
Here is the set of cash flows for the paying leg of each swap.
PayingLeg1≔CashFlows⁡Swap1,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'
PayingLeg2≔CashFlows⁡Swap2,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'
Here is the set of cash flows for the receiving leg.
ReceivingLeg1≔CashFlows⁡Swap1,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'
ReceivingLeg2≔CashFlows⁡Swap2,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'
map⁡t↦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
map⁡t↦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
The Finance[CashFlows] command was introduced in Maple 15.
For more information on Maple 15 changes, see Updates in Maple 15.
See Also
Finance[CompoundFactor]
Finance[DiscountFactor]
Finance[FixedRateCoupon]
Finance[InArrearIndexedCoupon]
Finance[ParCoupon]
Finance[SimpleCashFlow]
Finance[UpFrontIndexedCoupon]
Finance[ZeroCurve]
Download Help Document