What are Overnight Index Swaps?

An Overnight Index Swaps instrument is a contract to exchange a stream of cashflows that are computed at a fixed rate of interest with a stream of cashflows derived from fixings of an overnight index of short term risk-free lending rates. Overnight indices have largerly replaced IBOR as the main benchmarks for interest rates for a number of reasons:

  • They are based on observed transaction prices (as oposed to indicative "offer" rates in IBORs)

  • They represent transaction by a large cross sectionon of money market participants, not just inter-bank transactions

  • They are less sensitive to credit quality the banking sector

  • Their use has been mandated in a number of settings by the relevant regulators

Commonly refernced indices are:

Overnight Index Swaps (OIS) contrast with traditional vanilla swaps which referenced IBORs such as LIBOR. Although OIS have traded for a long while they came to prominence during the credit crises starting in 2007, as the basis between OIS and traditional swaps widened and market participants become distrustfull of reported IBOR fixings (famously described as "the rate at which banks don't lend").

Process for valuation of OIS

We will value the OIS using following methodology:

  • Construct a yield curve from market quoted OIS prices at standard durations

  • Use this curve to both forecast the future fixings of the index and discount cashflows of a custom OIS for which there is no standard quoted price

Boot strap a yield curve

The first step is to bootstrap a yeild curve. In this case we will bootstrap it from market quotes for other, standard, OISs. For example:

Tenor Fair Rate
6M 0.01
1Y 0.015
2Y 0.02
5Y 0.03

We can construct the curve with the function calcYieldCurve

curl -X 'POST' \
  'http://localhost:8000/calcYieldCurve?refDate=2022-04-01&dc=Actual360' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '[
  {
    "settleDays": 0,
    "tenor": "6M",
    "rate": 0.01,
    "index": "Sofr"
  },
{
    "settleDays": 0,
    "tenor": "1Y",
    "rate": 0.015,
    "index": "Sofr"
  },
{
    "settleDays": 0,
    "tenor": "2Y",
    "rate": 0.02,
    "index": "Sofr"
  },
{
    "settleDays": 0,
    "tenor": "5Y",
    "rate": 0.03,
    "index": "Sofr"
  }
]'

The result is a curve made of flat forward segements:

{
  "refDate": "2022-04-01",
  "dates": [
    "2022-04-01",
    "2023-01-17",
    "2023-07-17",
    "2024-07-15",
    "2027-07-15"
  ],
  "rates": [
    0.009974255304623102,
    0.009974255304623102,
    0.019934378047188187,
    0.024854564041777636,
    0.03659127062334725
  ]
}

Value the OIS

Now we now value the swap with the Valueois function:

curl -X 'POST' \
  'http://localhost:8000/valueOIS?today=2022-04-01' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "swap": {
    "startDate": "2022-06-01",
    "notional": 10e6,
    "fixedRate": 0.01,
    "index": "Sofr",
    "schedule": {
      "dates": [
        "2023-06-01",
        "2024-06-01"
      ]
    },
    "fixedDC": "Actual360"
  },
  "curve": {
  "refDate": "2022-04-01",
  "dates": [
    "2022-04-01",
    "2023-01-17",
    "2023-07-17",
    "2024-07-15",
    "2027-07-15"
  ],
  "rates": [
    0.009974255304623102,
    0.009974255304623102,
    0.019934378047188187,
    0.024854564041777636,
    0.03659127062334725
  ]
  }
}'

which returns the NPV of 141974.8

QuantFns