Fixed Income Risk

Overview


Convexity


The convexity is defined similarly to the duration, but the time value is squared.
{% convexity = \sum t^2 w_t %}
The convexity in conjunction with the duration provides a better approximation to the curve risk.

{% \Delta P / P \approx -D \times \Delta y + 1/2 \times CON (\Delta y)^2 %}
The formula here can be seen as a variation of the Taylor formula for approximating a function with a polynomial.

Taylor Formula


let du = await ('/lib/finance/fixed-income/duration/v1.0.0/duration-convexity.js');

let cashFlows = [
  {t:0.5, value:10},
  {t:1.0, value:10},
  {t:1.5, value:10},
  {t:2.0, value:10},
  {t:2.0, value:100},
];

let rate = function(t){
  return 0.05						
}

let convexity = du.convexity(cashFlows, rate);

Contents