Finance - Maple Programming Help

Online Help

All Products    Maple    MapleSim


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

Finance

  

BasisPointSensitivity

  

return the basis point sensitivity of future cash flows

 

Calling Sequence

Parameters

Options

Description

Examples

Compatibility

Calling Sequence

BasisPointSensitivity(cashflows, discount, opts)

BasisPointSensitivity(swap, discount, opts)

Parameters

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

Options

• 

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).

Description

• 

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%.

Examples

withFinance:

First set the global evaluation date.

SetEvaluationDateJanuary 01, 2005:

EvaluationDate

January 1, 2005

(1)

Calculate the basis point sensitivity of 100 dollars to be paid on January 2, 2007.

paymentdateJan-02-2007

paymentdate:=Jan-02-2007

(2)

cashflow1SimpleCashFlow100,paymentdate

cashflow1:=100. on January 2, 2007

(3)

BasisPointSensitivitycashflow1,0.03

0.

(4)

Here is another example.

nominalamt100

nominalamt:=100

(5)

rate0.05

rate:=0.05

(6)

paymentdateJan-01-2015

paymentdate:=Jan-01-2015

(7)

startdateJan-01-2006

startdate:=Jan-01-2006

(8)

enddateJan-01-2010

enddate:=Jan-01-2010

(9)

couponFixedRateCouponnominalamt,rate,startdate,enddate,paymentdate

coupon:=20. on January 1, 2015

(10)

Compute the sensitivity of this cash flow on January 1, 2005.

BasisPointSensitivitycoupon,0.03

296.3272883

(11)

The following example computes the basis point sensitivity for an interest rate swap.

SetEvaluationDateJanuary 02, 2007:

EvaluationDate

January 2, 2007

(12)

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.

schedule1ScheduleJanuary 03, 2008,January 03, 2018,Monthly

schedule1:=moduleend module

(13)

schedule2ScheduleJanuary 03, 2010,January 03, 2015,Quarterly

schedule2:=moduleend module

(14)

rate10.05

rate1:=0.05

(15)

rate2BenchmarkRate0.03

rate2:=moduleend module

(16)

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

swap1InterestRateSwap1000,rate1,schedule1,rate2,schedule2,0.03

swap1:=moduleend module

(17)

swap2InterestRateSwap1000,rate2,schedule2,rate1,schedule1,0.03

swap2:=moduleend module

(18)

Compute the basis point sensitivity.

BasisPointSensitivityswap1,0.05

7468.989624,3783.492266

(19)

BasisPointSensitivityswap2,0.05

3783.492266,7468.989624

(20)

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

payingleg1CashFlowsswap1,paying:

payingleg2CashFlowsswap2,paying:

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

receivingleg1CashFlowsswap1,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'

(21)

receivingleg2CashFlowsswap2,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'

(22)

BasisPointSensitivitypayingleg1,0.05

7468.989624

(23)

BasisPointSensitivitypayingleg2,0.05

3783.492266

(24)

BasisPointSensitivityreceivingleg1,0.05

3783.492266

(25)

BasisPointSensitivityreceivingleg2,0.05

7468.989624

(26)

Compatibility

• 

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

Was this information helpful?



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