Finance
InterestRateSwap
create new interest-rate swap
Calling Sequence
Parameters
Options
Description
Examples
Compatibility
InterestRateSwap(nominal, fixedrate, fixedschedule, floatrate, floatschedule, spread, opts)
InterestRateSwap(nominal, floatrate, floatschedule, fixedrate, fixedschedule, spread, opts)
nominal
-
non-negative constant; nominal amount
fixedrate
non-negative constant; fixed-leg rate
fixedschedule
payment schedule (see Schedule); fixed-leg schedule
floatrate
benchmark rate (see BenchmarkRate) ; floating-leg rate
floatschedule
payment schedule (see Schedule); floating-leg schedule
spread
non-negative constant; swap spread
opts
(optional) equation(s) of the form option = value where option is daycounter; specify options for the InterestRateSwap command
daycounter = a name representing a supported day counter (e.g. ISDA, Simple) or a day counter data structure created using the DayCounter constructor -- This option can be used to specify a day count convention used by the fixed leg.
The InterestRateSwap command constructs a simple interest rate swap. This is a contract that exchanges payments between two different indexed legs starting at some future time.
The parameter fixedschedule defines a payment schedule for the fixed leg. Assume that fixedschedule consists of times Tα1, Tα2, ..., Tαn. At every date Tαi the fixed leg pays the amount
N⁢dTαi⁢R
where R is the fixed interest rate, N is the nominal value, and dTαi is the year fraction between dates Tαi−1 and Tαi.
The parameter floatschedule defines a payment schedule for the floating leg. Assume that floatschedule consists of dates Tβ1, Tβ2, ..., Tβn. At every date Tβj the floating leg pays the amount
N⁢dTβi⁢L⁡Tβi−1,Tβi
where L⁡Tβi−1,Tβi is the benchmark rate (for example, LIBOR rate), reset at the time Tβi−1.
The option daycounter specifies the day count convention used by the fixed leg. The day count convention used by the floating leg is implicitly defined by the corresponding benchmark rate.
with⁡Finance:
SetEvaluationDate⁡January 02, 2007:
Consider two payment schedules. The first one consists of payments of 5% of the nominal every month between January 3, 2008 and January 3, 2018. The second one consists of payments of 3% of the nominal every quarter between January 3, 2010 and January 3, 2015.
Schedule1≔Schedule⁡January 03, 2008,January 03, 2018,Monthly
Schedule1 ≔ moduleend module
Schedule2≔Schedule⁡January 03, 2010,January 03, 2015,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.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',4.246575342 on 'February 3, 2010',3.835616438 on 'March 3, 2010',4.246575342 on 'April 3, 2010',4.109589041 on 'May 3, 2010',4.246575342 on 'June 3, 2010',4.109589041 on 'July 3, 2010',4.246575342 on 'August 3, 2010',4.246575342 on 'September 3, 2010',4.109589041 on 'October 3, 2010',4.246575342 on 'November 3, 2010',4.109589041 on 'December 3, 2010',4.246575342 on 'January 3, 2011',4.246575342 on 'February 3, 2011',3.835616438 on 'March 3, 2011',4.246575342 on 'April 3, 2011',4.109589041 on 'May 3, 2011',4.246575342 on 'June 3, 2011',4.109589041 on 'July 3, 2011',4.246575342 on 'August 3, 2011',4.246575342 on 'September 3, 2011',4.109589041 on 'October 3, 2011',4.246575342 on 'November 3, 2011',4.109589041 on 'December 3, 2011',4.245826783 on 'January 3, 2012',4.234972678 on 'February 3, 2012',3.961748634 on 'March 3, 2012',4.234972678 on 'April 3, 2012',4.098360656 on 'May 3, 2012',4.234972678 on 'June 3, 2012',4.098360656 on 'July 3, 2012',4.234972678 on 'August 3, 2012',4.234972678 on 'September 3, 2012',4.098360656 on 'October 3, 2012',4.234972678 on 'November 3, 2012',4.098360656 on 'December 3, 2012',4.235721237 on 'January 3, 2013',4.246575342 on 'February 3, 2013',3.835616438 on 'March 3, 2013',4.246575342 on 'April 3, 2013',4.109589041 on 'May 3, 2013',4.246575342 on 'June 3, 2013',4.109589041 on 'July 3, 2013',4.246575342 on 'August 3, 2013',4.246575342 on 'September 3, 2013',4.109589041 on 'October 3, 2013',4.246575342 on 'November 3, 2013',4.109589041 on 'December 3, 2013',4.246575342 on 'January 3, 2014',4.246575342 on 'February 3, 2014',3.835616438 on 'March 3, 2014',4.246575342 on 'April 3, 2014',4.109589041 on 'May 3, 2014',4.246575342 on 'June 3, 2014',4.109589041 on 'July 3, 2014',4.246575342 on 'August 3, 2014',4.246575342 on 'September 3, 2014',4.109589041 on 'October 3, 2014',4.246575342 on 'November 3, 2014',4.109589041 on 'December 3, 2014',4.246575342 on 'January 3, 2015',4.246575342 on 'February 3, 2015',3.835616438 on 'March 3, 2015',4.246575342 on 'April 3, 2015',4.109589041 on 'May 3, 2015',4.246575342 on 'June 3, 2015',4.109589041 on 'July 3, 2015',4.246575342 on 'August 3, 2015',4.246575342 on 'September 3, 2015',4.109589041 on 'October 3, 2015',4.246575342 on 'November 3, 2015',4.109589041 on 'December 3, 2015',4.245826783 on 'January 3, 2016',4.234972678 on 'February 3, 2016',3.961748634 on 'March 3, 2016',4.234972678 on 'April 3, 2016',4.098360656 on 'May 3, 2016',4.234972678 on 'June 3, 2016',4.098360656 on 'July 3, 2016',4.234972678 on 'August 3, 2016',4.234972678 on 'September 3, 2016',4.098360656 on 'October 3, 2016',4.234972678 on 'November 3, 2016',4.098360656 on 'December 3, 2016',4.235721237 on 'January 3, 2017',4.246575342 on 'February 3, 2017',3.835616438 on 'March 3, 2017',4.246575342 on 'April 3, 2017',4.109589041 on 'May 3, 2017',4.246575342 on 'June 3, 2017',4.109589041 on 'July 3, 2017',4.246575342 on 'August 3, 2017',4.246575342 on 'September 3, 2017',4.109589041 on 'October 3, 2017',4.246575342 on 'November 3, 2017',4.109589041 on 'December 3, 2017',4.246575342 on 'January 3, 2018'
PayingLeg2≔CashFlows⁡Swap2,paying
PayingLeg2≔14.82194787 on 'April 3, 2010',14.98694508 on 'July 3, 2010',15.15194910 on 'October 3, 2010',15.15194910 on 'January 3, 2011',14.82194787 on 'April 3, 2011',14.98694508 on 'July 3, 2011',15.15194910 on 'October 3, 2011',15.15127369 on 'January 3, 2012',14.94592054 on 'April 3, 2012',14.94592054 on 'July 3, 2012',15.11047204 on 'October 3, 2012',15.11114744 on 'January 3, 2013',14.82194787 on 'April 3, 2013',14.98694508 on 'July 3, 2013',15.15194910 on 'October 3, 2013',15.15194910 on 'January 3, 2014',14.82194787 on 'April 3, 2014',14.98694508 on 'July 3, 2014',15.15194910 on 'October 3, 2014',15.15194910 on 'January 3, 2015'
Here is the set of cash flows for the receiving leg.
ReceivingLeg1≔CashFlows⁡Swap1,receiving
ReceivingLeg1≔14.82194787 on 'April 3, 2010',14.98694508 on 'July 3, 2010',15.15194910 on 'October 3, 2010',15.15194910 on 'January 3, 2011',14.82194787 on 'April 3, 2011',14.98694508 on 'July 3, 2011',15.15194910 on 'October 3, 2011',15.15127369 on 'January 3, 2012',14.94592054 on 'April 3, 2012',14.94592054 on 'July 3, 2012',15.11047204 on 'October 3, 2012',15.11114744 on 'January 3, 2013',14.82194787 on 'April 3, 2013',14.98694508 on 'July 3, 2013',15.15194910 on 'October 3, 2013',15.15194910 on 'January 3, 2014',14.82194787 on 'April 3, 2014',14.98694508 on 'July 3, 2014',15.15194910 on 'October 3, 2014',15.15194910 on 'January 3, 2015'
ReceivingLeg2≔CashFlows⁡Swap2,receiving
ReceivingLeg2≔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',4.246575342 on 'February 3, 2010',3.835616438 on 'March 3, 2010',4.246575342 on 'April 3, 2010',4.109589041 on 'May 3, 2010',4.246575342 on 'June 3, 2010',4.109589041 on 'July 3, 2010',4.246575342 on 'August 3, 2010',4.246575342 on 'September 3, 2010',4.109589041 on 'October 3, 2010',4.246575342 on 'November 3, 2010',4.109589041 on 'December 3, 2010',4.246575342 on 'January 3, 2011',4.246575342 on 'February 3, 2011',3.835616438 on 'March 3, 2011',4.246575342 on 'April 3, 2011',4.109589041 on 'May 3, 2011',4.246575342 on 'June 3, 2011',4.109589041 on 'July 3, 2011',4.246575342 on 'August 3, 2011',4.246575342 on 'September 3, 2011',4.109589041 on 'October 3, 2011',4.246575342 on 'November 3, 2011',4.109589041 on 'December 3, 2011',4.245826783 on 'January 3, 2012',4.234972678 on 'February 3, 2012',3.961748634 on 'March 3, 2012',4.234972678 on 'April 3, 2012',4.098360656 on 'May 3, 2012',4.234972678 on 'June 3, 2012',4.098360656 on 'July 3, 2012',4.234972678 on 'August 3, 2012',4.234972678 on 'September 3, 2012',4.098360656 on 'October 3, 2012',4.234972678 on 'November 3, 2012',4.098360656 on 'December 3, 2012',4.235721237 on 'January 3, 2013',4.246575342 on 'February 3, 2013',3.835616438 on 'March 3, 2013',4.246575342 on 'April 3, 2013',4.109589041 on 'May 3, 2013',4.246575342 on 'June 3, 2013',4.109589041 on 'July 3, 2013',4.246575342 on 'August 3, 2013',4.246575342 on 'September 3, 2013',4.109589041 on 'October 3, 2013',4.246575342 on 'November 3, 2013',4.109589041 on 'December 3, 2013',4.246575342 on 'January 3, 2014',4.246575342 on 'February 3, 2014',3.835616438 on 'March 3, 2014',4.246575342 on 'April 3, 2014',4.109589041 on 'May 3, 2014',4.246575342 on 'June 3, 2014',4.109589041 on 'July 3, 2014',4.246575342 on 'August 3, 2014',4.246575342 on 'September 3, 2014',4.109589041 on 'October 3, 2014',4.246575342 on 'November 3, 2014',4.109589041 on 'December 3, 2014',4.246575342 on 'January 3, 2015',4.246575342 on 'February 3, 2015',3.835616438 on 'March 3, 2015',4.246575342 on 'April 3, 2015',4.109589041 on 'May 3, 2015',4.246575342 on 'June 3, 2015',4.109589041 on 'July 3, 2015',4.246575342 on 'August 3, 2015',4.246575342 on 'September 3, 2015',4.109589041 on 'October 3, 2015',4.246575342 on 'November 3, 2015',4.109589041 on 'December 3, 2015',4.245826783 on 'January 3, 2016',4.234972678 on 'February 3, 2016',3.961748634 on 'March 3, 2016',4.234972678 on 'April 3, 2016',4.098360656 on 'May 3, 2016',4.234972678 on 'June 3, 2016',4.098360656 on 'July 3, 2016',4.234972678 on 'August 3, 2016',4.234972678 on 'September 3, 2016',4.098360656 on 'October 3, 2016',4.234972678 on 'November 3, 2016',4.098360656 on 'December 3, 2016',4.235721237 on 'January 3, 2017',4.246575342 on 'February 3, 2017',3.835616438 on 'March 3, 2017',4.246575342 on 'April 3, 2017',4.109589041 on 'May 3, 2017',4.246575342 on 'June 3, 2017',4.109589041 on 'July 3, 2017',4.246575342 on 'August 3, 2017',4.246575342 on 'September 3, 2017',4.109589041 on 'October 3, 2017',4.246575342 on 'November 3, 2017',4.109589041 on 'December 3, 2017',4.246575342 on 'January 3, 2018'
NetPresentValue⁡Swap1,0.05
−146.0132438
NetPresentValue⁡Swap2,0.05
146.0132438
The Finance[InterestRateSwap] command was introduced in Maple 15.
For more information on Maple 15 changes, see Updates in Maple 15.
See Also
Finance[BasisPointSensitivity]
Finance[BenchmarkRate]
Finance[CashFlows]
Finance[NetPresentValue]
Finance[Swap]
Download Help Document