Finance
BasisPointSensitivity
return the basis point sensitivity of future cash flows
Calling Sequence
Parameters
Options
Description
Examples
Compatibility
BasisPointSensitivity(cashflows, discount, opts)
BasisPointSensitivity(swap, discount, opts)
cashflows
-
data structure created using the SimpleCashFlow constructor or a list of such data structures; cash flows
swap
cash flow swap or interest rate swap data structure; swap
discount
non-negative constant or a yield term structure; discount rate
opts
equations of the form option = sensitivity where option is one of referencedate or daycounter; specify options for the BasisPointSensitivity 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 provides a day counter that will be used to convert the period between two dates to a fraction of the year.
referencedate = a string containing a date specification in a format recognized by ParseDate or a Date data structure -- This option specifies the reference date, that is, the date when the discount factor is 1. By default this is set to the global evaluation date (see EvaluationDate).
The BasisPointSensitivity(cashflows, discount, opts) calling sequence returns the basis point sensitivity for the future cash flows discounted with respect to the given discount rate.
The BasisPointSensitivity(swap, discount, opts) calling sequence returns a list containing the basis point sensitivities of the paying leg and the receiving leg of the given swap.
Note that the result is returned in basis points, that is in 1/100th of 1%.
with⁡Finance:
First set the global evaluation date.
SetEvaluationDate⁡January 01, 2005:
EvaluationDate⁡
January 1, 2005
Calculate the basis point sensitivity of 100 dollars to be paid on January 2, 2007.
paymentdate≔Jan-02-2007
cashflow1≔SimpleCashFlow⁡100,paymentdate
cashflow1≔100. on January 2, 2007
BasisPointSensitivity⁡cashflow1,0.03
0.
Here is another example.
nominalamt≔100
rate≔0.05
paymentdate≔Jan-01-2015
startdate≔Jan-01-2006
enddate≔Jan-01-2010
coupon≔FixedRateCoupon⁡nominalamt,rate,startdate,enddate,paymentdate
coupon≔20. on January 1, 2015
Compute the sensitivity of this cash flow on January 1, 2005.
BasisPointSensitivity⁡coupon,0.03
296.3272883
The following example computes the basis point sensitivity for an interest rate swap.
SetEvaluationDate⁡January 02, 2007:
January 2, 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
Compute the basis point sensitivity.
BasisPointSensitivity⁡swap1,0.05
−7468.989624,3783.492266
BasisPointSensitivity⁡swap2,0.05
−3783.492266,7468.989624
Here is the set of cash flows for the paying leg of each swap.
payingleg1≔CashFlows⁡swap1,paying:
payingleg2≔CashFlows⁡swap2,paying:
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'
BasisPointSensitivity⁡payingleg1,0.05
7468.989624
BasisPointSensitivity⁡payingleg2,0.05
3783.492266
BasisPointSensitivity⁡receivingleg1,0.05
BasisPointSensitivity⁡receivingleg2,0.05
The Finance[BasisPointSensitivity] command was introduced in Maple 15.
For more information on Maple 15 changes, see Updates in Maple 15.
See Also
Finance[CompoundFactor]
Finance[DayCounter]
Finance[DiscountFactor]
Finance[FixedRateCoupon]
Finance[InArrearIndexedCoupon]
Finance[InterestRateSwap]
Finance[ParCoupon]
Finance[ParseDate]
Finance[SimpleCashFlow]
Finance[Swap]
Finance[UpFrontIndexedCoupon]
Finance[ZeroCurve]
Download Help Document