return the basis point sensitivity of future cash flows - Maple Help

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

Finance[BasisPointSensitivity] - return the basis point sensitivity of future cash flows

 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

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

 > $\mathrm{with}\left(\mathrm{Finance}\right):$

First set the global evaluation date.

 > $\mathrm{SetEvaluationDate}\left("January 01, 2005"\right):$
 > $\mathrm{EvaluationDate}\left(\right)$
 ${"January 1, 2005"}$ (1)

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

 > $\mathrm{paymentdate}:="Jan-02-2007"$
 ${\mathrm{paymentdate}}{:=}{"Jan-02-2007"}$ (2)
 > $\mathrm{cashflow1}:=\mathrm{SimpleCashFlow}\left(100,\mathrm{paymentdate}\right)$
 ${\mathrm{cashflow1}}{:=}{\mathrm{100. on January 2, 2007}}$ (3)
 > $\mathrm{BasisPointSensitivity}\left(\mathrm{cashflow1},0.03\right)$
 ${0.}$ (4)

Here is another example.

 > $\mathrm{nominalamt}:=100$
 ${\mathrm{nominalamt}}{:=}{100}$ (5)
 > $\mathrm{rate}:=0.05$
 ${\mathrm{rate}}{:=}{0.05}$ (6)
 > $\mathrm{paymentdate}:="Jan-01-2015"$
 ${\mathrm{paymentdate}}{:=}{"Jan-01-2015"}$ (7)
 > $\mathrm{startdate}:="Jan-01-2006"$
 ${\mathrm{startdate}}{:=}{"Jan-01-2006"}$ (8)
 > $\mathrm{enddate}:="Jan-01-2010"$
 ${\mathrm{enddate}}{:=}{"Jan-01-2010"}$ (9)
 > $\mathrm{coupon}:=\mathrm{FixedRateCoupon}\left(\mathrm{nominalamt},\mathrm{rate},\mathrm{startdate},\mathrm{enddate},\mathrm{paymentdate}\right)$
 ${\mathrm{coupon}}{:=}{\mathrm{20. on January 1, 2015}}$ (10)

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

 > $\mathrm{BasisPointSensitivity}\left(\mathrm{coupon},0.03\right)$
 ${296.3272883}$ (11)

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

 > $\mathrm{SetEvaluationDate}\left("January 02, 2007"\right):$
 > $\mathrm{EvaluationDate}\left(\right)$
 ${"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.

 > $\mathrm{schedule1}:=\mathrm{Schedule}\left("January 03, 2008","January 03, 2018",\mathrm{Monthly}\right)$
 ${\mathrm{schedule1}}{:=}{\mathbf{module}}\left({}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end module}}$ (13)
 > $\mathrm{schedule2}:=\mathrm{Schedule}\left("January 03, 2010","January 03, 2015",\mathrm{Quarterly}\right)$
 ${\mathrm{schedule2}}{:=}{\mathbf{module}}\left({}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end module}}$ (14)
 > $\mathrm{rate1}:=0.05$
 ${\mathrm{rate1}}{:=}{0.05}$ (15)
 > $\mathrm{rate2}:=\mathrm{BenchmarkRate}\left(0.03\right)$
 ${\mathrm{rate2}}{:=}{\mathbf{module}}\left({}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end module}}$ (16)

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

 > $\mathrm{swap1}:=\mathrm{InterestRateSwap}\left(1000,\mathrm{rate1},\mathrm{schedule1},\mathrm{rate2},\mathrm{schedule2},0.03\right)$
 ${\mathrm{swap1}}{:=}{\mathbf{module}}\left({}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end module}}$ (17)
 > $\mathrm{swap2}:=\mathrm{InterestRateSwap}\left(1000,\mathrm{rate2},\mathrm{schedule2},\mathrm{rate1},\mathrm{schedule1},0.03\right)$
 ${\mathrm{swap2}}{:=}{\mathbf{module}}\left({}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end module}}$ (18)

Compute the basis point sensitivity.

 > $\mathrm{BasisPointSensitivity}\left(\mathrm{swap1},0.05\right)$
 $\left[{-}{7468.989624}{,}{3783.492266}\right]$ (19)
 > $\mathrm{BasisPointSensitivity}\left(\mathrm{swap2},0.05\right)$
 $\left[{-}{3783.492266}{,}{7468.989624}\right]$ (20)

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

 > $\mathrm{payingleg1}:=\mathrm{CashFlows}\left(\mathrm{swap1},\mathrm{paying}\right):$
 > $\mathrm{payingleg2}:=\mathrm{CashFlows}\left(\mathrm{swap2},\mathrm{paying}\right):$

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

 > $\mathrm{receivingleg1}:=\mathrm{CashFlows}\left(\mathrm{swap1},\mathrm{receiving}\right)$
 ${\mathrm{receivingleg1}}{:=}\left[{\mathrm{14.82194787 on \text{'}April 3, 2010\text{'}}}{,}{\mathrm{14.98694508 on \text{'}July 3, 2010\text{'}}}{,}{\mathrm{15.15194910 on \text{'}October 3, 2010\text{'}}}{,}{\mathrm{15.15194910 on \text{'}January 3, 2011\text{'}}}{,}{\mathrm{14.82194787 on \text{'}April 3, 2011\text{'}}}{,}{\mathrm{14.98694508 on \text{'}July 3, 2011\text{'}}}{,}{\mathrm{15.15194910 on \text{'}October 3, 2011\text{'}}}{,}{\mathrm{15.15127369 on \text{'}January 3, 2012\text{'}}}{,}{\mathrm{14.94592054 on \text{'}April 3, 2012\text{'}}}{,}{\mathrm{14.94592054 on \text{'}July 3, 2012\text{'}}}{,}{\mathrm{15.11047204 on \text{'}October 3, 2012\text{'}}}{,}{\mathrm{15.11114744 on \text{'}January 3, 2013\text{'}}}{,}{\mathrm{14.82194787 on \text{'}April 3, 2013\text{'}}}{,}{\mathrm{14.98694508 on \text{'}July 3, 2013\text{'}}}{,}{\mathrm{15.15194910 on \text{'}October 3, 2013\text{'}}}{,}{\mathrm{15.15194910 on \text{'}January 3, 2014\text{'}}}{,}{\mathrm{14.82194787 on \text{'}April 3, 2014\text{'}}}{,}{\mathrm{14.98694508 on \text{'}July 3, 2014\text{'}}}{,}{\mathrm{15.15194910 on \text{'}October 3, 2014\text{'}}}{,}{\mathrm{15.15194910 on \text{'}January 3, 2015\text{'}}}\right]$ (21)
 > $\mathrm{receivingleg2}:=\mathrm{CashFlows}\left(\mathrm{swap2},\mathrm{receiving}\right)$
 ${\mathrm{receivingleg2}}{:=}\left[{\mathrm{4.234972678 on \text{'}February 3, 2008\text{'}}}{,}{\mathrm{3.961748634 on \text{'}March 3, 2008\text{'}}}{,}{\mathrm{4.234972678 on \text{'}April 3, 2008\text{'}}}{,}{\mathrm{4.098360656 on \text{'}May 3, 2008\text{'}}}{,}{\mathrm{4.234972678 on \text{'}June 3, 2008\text{'}}}{,}{\mathrm{4.098360656 on \text{'}July 3, 2008\text{'}}}{,}{\mathrm{4.234972678 on \text{'}August 3, 2008\text{'}}}{,}{\mathrm{4.234972678 on \text{'}September 3, 2008\text{'}}}{,}{\mathrm{4.098360656 on \text{'}October 3, 2008\text{'}}}{,}{\mathrm{4.234972678 on \text{'}November 3, 2008\text{'}}}{,}{\mathrm{4.098360656 on \text{'}December 3, 2008\text{'}}}{,}{\mathrm{4.235721237 on \text{'}January 3, 2009\text{'}}}{,}{\mathrm{4.246575342 on \text{'}February 3, 2009\text{'}}}{,}{\mathrm{3.835616438 on \text{'}March 3, 2009\text{'}}}{,}{\mathrm{4.246575342 on \text{'}April 3, 2009\text{'}}}{,}{\mathrm{4.109589041 on \text{'}May 3, 2009\text{'}}}{,}{\mathrm{4.246575342 on \text{'}June 3, 2009\text{'}}}{,}{\mathrm{4.109589041 on \text{'}July 3, 2009\text{'}}}{,}{\mathrm{4.246575342 on \text{'}August 3, 2009\text{'}}}{,}{\mathrm{4.246575342 on \text{'}September 3, 2009\text{'}}}{,}{\mathrm{4.109589041 on \text{'}October 3, 2009\text{'}}}{,}{\mathrm{4.246575342 on \text{'}November 3, 2009\text{'}}}{,}{\mathrm{4.109589041 on \text{'}December 3, 2009\text{'}}}{,}{\mathrm{4.246575342 on \text{'}January 3, 2010\text{'}}}{,}{\mathrm{4.246575342 on \text{'}February 3, 2010\text{'}}}{,}{\mathrm{3.835616438 on \text{'}March 3, 2010\text{'}}}{,}{\mathrm{4.246575342 on \text{'}April 3, 2010\text{'}}}{,}{\mathrm{4.109589041 on \text{'}May 3, 2010\text{'}}}{,}{\mathrm{4.246575342 on \text{'}June 3, 2010\text{'}}}{,}{\mathrm{4.109589041 on \text{'}July 3, 2010\text{'}}}{,}{\mathrm{4.246575342 on \text{'}August 3, 2010\text{'}}}{,}{\mathrm{4.246575342 on \text{'}September 3, 2010\text{'}}}{,}{\mathrm{4.109589041 on \text{'}October 3, 2010\text{'}}}{,}{\mathrm{4.246575342 on \text{'}November 3, 2010\text{'}}}{,}{\mathrm{4.109589041 on \text{'}December 3, 2010\text{'}}}{,}{\mathrm{4.246575342 on \text{'}January 3, 2011\text{'}}}{,}{\mathrm{4.246575342 on \text{'}February 3, 2011\text{'}}}{,}{\mathrm{3.835616438 on \text{'}March 3, 2011\text{'}}}{,}{\mathrm{4.246575342 on \text{'}April 3, 2011\text{'}}}{,}{\mathrm{4.109589041 on \text{'}May 3, 2011\text{'}}}{,}{\mathrm{4.246575342 on \text{'}June 3, 2011\text{'}}}{,}{\mathrm{4.109589041 on \text{'}July 3, 2011\text{'}}}{,}{\mathrm{4.246575342 on \text{'}August 3, 2011\text{'}}}{,}{\mathrm{4.246575342 on \text{'}September 3, 2011\text{'}}}{,}{\mathrm{4.109589041 on \text{'}October 3, 2011\text{'}}}{,}{\mathrm{4.246575342 on \text{'}November 3, 2011\text{'}}}{,}{\mathrm{4.109589041 on \text{'}December 3, 2011\text{'}}}{,}{\mathrm{4.245826783 on \text{'}January 3, 2012\text{'}}}{,}{\mathrm{4.234972678 on \text{'}February 3, 2012\text{'}}}{,}{\mathrm{3.961748634 on \text{'}March 3, 2012\text{'}}}{,}{\mathrm{4.234972678 on \text{'}April 3, 2012\text{'}}}{,}{\mathrm{4.098360656 on \text{'}May 3, 2012\text{'}}}{,}{\mathrm{4.234972678 on \text{'}June 3, 2012\text{'}}}{,}{\mathrm{4.098360656 on \text{'}July 3, 2012\text{'}}}{,}{\mathrm{4.234972678 on \text{'}August 3, 2012\text{'}}}{,}{\mathrm{4.234972678 on \text{'}September 3, 2012\text{'}}}{,}{\mathrm{4.098360656 on \text{'}October 3, 2012\text{'}}}{,}{\mathrm{4.234972678 on \text{'}November 3, 2012\text{'}}}{,}{\mathrm{4.098360656 on \text{'}December 3, 2012\text{'}}}{,}{\mathrm{4.235721237 on \text{'}January 3, 2013\text{'}}}{,}{\mathrm{4.246575342 on \text{'}February 3, 2013\text{'}}}{,}{\mathrm{3.835616438 on \text{'}March 3, 2013\text{'}}}{,}{\mathrm{4.246575342 on \text{'}April 3, 2013\text{'}}}{,}{\mathrm{4.109589041 on \text{'}May 3, 2013\text{'}}}{,}{\mathrm{4.246575342 on \text{'}June 3, 2013\text{'}}}{,}{\mathrm{4.109589041 on \text{'}July 3, 2013\text{'}}}{,}{\mathrm{4.246575342 on \text{'}August 3, 2013\text{'}}}{,}{\mathrm{4.246575342 on \text{'}September 3, 2013\text{'}}}{,}{\mathrm{4.109589041 on \text{'}October 3, 2013\text{'}}}{,}{\mathrm{4.246575342 on \text{'}November 3, 2013\text{'}}}{,}{\mathrm{4.109589041 on \text{'}December 3, 2013\text{'}}}{,}{\mathrm{4.246575342 on \text{'}January 3, 2014\text{'}}}{,}{\mathrm{4.246575342 on \text{'}February 3, 2014\text{'}}}{,}{\mathrm{3.835616438 on \text{'}March 3, 2014\text{'}}}{,}{\mathrm{4.246575342 on \text{'}April 3, 2014\text{'}}}{,}{\mathrm{4.109589041 on \text{'}May 3, 2014\text{'}}}{,}{\mathrm{4.246575342 on \text{'}June 3, 2014\text{'}}}{,}{\mathrm{4.109589041 on \text{'}July 3, 2014\text{'}}}{,}{\mathrm{4.246575342 on \text{'}August 3, 2014\text{'}}}{,}{\mathrm{4.246575342 on \text{'}September 3, 2014\text{'}}}{,}{\mathrm{4.109589041 on \text{'}October 3, 2014\text{'}}}{,}{\mathrm{4.246575342 on \text{'}November 3, 2014\text{'}}}{,}{\mathrm{4.109589041 on \text{'}December 3, 2014\text{'}}}{,}{\mathrm{4.246575342 on \text{'}January 3, 2015\text{'}}}{,}{\mathrm{4.246575342 on \text{'}February 3, 2015\text{'}}}{,}{\mathrm{3.835616438 on \text{'}March 3, 2015\text{'}}}{,}{\mathrm{4.246575342 on \text{'}April 3, 2015\text{'}}}{,}{\mathrm{4.109589041 on \text{'}May 3, 2015\text{'}}}{,}{\mathrm{4.246575342 on \text{'}June 3, 2015\text{'}}}{,}{\mathrm{4.109589041 on \text{'}July 3, 2015\text{'}}}{,}{\mathrm{4.246575342 on \text{'}August 3, 2015\text{'}}}{,}{\mathrm{4.246575342 on \text{'}September 3, 2015\text{'}}}{,}{\mathrm{4.109589041 on \text{'}October 3, 2015\text{'}}}{,}{\mathrm{4.246575342 on \text{'}November 3, 2015\text{'}}}{,}{\mathrm{4.109589041 on \text{'}December 3, 2015\text{'}}}{,}{\mathrm{4.245826783 on \text{'}January 3, 2016\text{'}}}{,}{\mathrm{4.234972678 on \text{'}February 3, 2016\text{'}}}{,}{\mathrm{3.961748634 on \text{'}March 3, 2016\text{'}}}{,}{\mathrm{4.234972678 on \text{'}April 3, 2016\text{'}}}{,}{\mathrm{4.098360656 on \text{'}May 3, 2016\text{'}}}{,}{\mathrm{4.234972678 on \text{'}June 3, 2016\text{'}}}{,}{\mathrm{4.098360656 on \text{'}July 3, 2016\text{'}}}{,}{\mathrm{4.234972678 on \text{'}August 3, 2016\text{'}}}{,}{\mathrm{4.234972678 on \text{'}September 3, 2016\text{'}}}{,}{\mathrm{4.098360656 on \text{'}October 3, 2016\text{'}}}{,}{\mathrm{4.234972678 on \text{'}November 3, 2016\text{'}}}{,}{\mathrm{4.098360656 on \text{'}December 3, 2016\text{'}}}{,}{\mathrm{4.235721237 on \text{'}January 3, 2017\text{'}}}{,}{\mathrm{4.246575342 on \text{'}February 3, 2017\text{'}}}{,}{\mathrm{3.835616438 on \text{'}March 3, 2017\text{'}}}{,}{\mathrm{4.246575342 on \text{'}April 3, 2017\text{'}}}{,}{\mathrm{4.109589041 on \text{'}May 3, 2017\text{'}}}{,}{\mathrm{4.246575342 on \text{'}June 3, 2017\text{'}}}{,}{\mathrm{4.109589041 on \text{'}July 3, 2017\text{'}}}{,}{\mathrm{4.246575342 on \text{'}August 3, 2017\text{'}}}{,}{\mathrm{4.246575342 on \text{'}September 3, 2017\text{'}}}{,}{\mathrm{4.109589041 on \text{'}October 3, 2017\text{'}}}{,}{\mathrm{4.246575342 on \text{'}November 3, 2017\text{'}}}{,}{\mathrm{4.109589041 on \text{'}December 3, 2017\text{'}}}{,}{\mathrm{4.246575342 on \text{'}January 3, 2018\text{'}}}\right]$ (22)
 > $\mathrm{BasisPointSensitivity}\left(\mathrm{payingleg1},0.05\right)$
 ${7468.989624}$ (23)
 > $\mathrm{BasisPointSensitivity}\left(\mathrm{payingleg2},0.05\right)$
 ${3783.492266}$ (24)
 > $\mathrm{BasisPointSensitivity}\left(\mathrm{receivingleg1},0.05\right)$
 ${3783.492266}$ (25)
 > $\mathrm{BasisPointSensitivity}\left(\mathrm{receivingleg2},0.05\right)$
 ${7468.989624}$ (26)