rates | dates | yieldcurvetypes | |
---|---|---|---|
0 | 0.048907 | 2021-02-03 | PiecewiseFlatForward |
1 | 0.048907 | 2023-03-22 | PiecewiseFlatForward |
2 | 0.049469 | 2023-08-22 | PiecewiseFlatForward |
3 | 0.051948 | 2024-02-22 | PiecewiseFlatForward |
4 | 0.049211 | 2026-02-23 | PiecewiseFlatForward |
5 | 0.047156 | 2028-02-22 | PiecewiseFlatForward |
Overnight Index Swap (OIS) valuation
Overview
This pages illustrates valuation of the Overnight Index Swaps (OIS) using the calculations are by the QuantLib open source library but with our data-oriented wrappings.
OIS on “risk-free rate” (which may be calculated from secured or unsecured very short term lending) now form the primary swaps market, supplanting the older market in swaps on the unsecured multi-month inter-bank term deposit rates. OIS swap quotes are a good base for estimating long term borrowing costs where there is now credit risk.
The Yield Curve Data
We use a selection of data from the yield curve build in Yield Curves example. In the data-oriented approach the yield curve is represented by the nodes of its interpolated definition:
The Overnight Index Swap contract definition
The contract is defined by the following data:
startDate | notional | fixedRate | index | schedule | fixedDC | |
---|---|---|---|---|---|---|
0 | 2021-02-03 | 100000000.0 | 0.045 | Sofr | [2021-02-03, 2022-02-03] | Actual360 |
Valuation
The yield curve and the contract definition can be used in the valueOIS
call to calculate the present-day value (note the new column “NPV”):
startDate | notional | fixedRate | index | schedule | fixedDC | NPV | |
---|---|---|---|---|---|---|---|
0 | 2021-02-03 | 100000000.0 | 0.045 | Sofr | [2021-02-03, 2022-02-03] | Actual360 | 495899.695491 |
By segmenting and distributing the ois definition and yield curve definition tables using Apache Spark or related system it is possible to compute quickly the results of millions of risk-scenarios for swap valuations and store those results in easy to use and interpret database-like stores which can be analysed standard business tools include BI tools and excel. The example below shows valuation of 60 OIS of 1-year duration with starting dates on consequtive business dayss in 2021: the results are ready in the table and can be loaded into Microsoft Excel directly from Azure. (The yield curve is the same as above and rooted to the same date so the OIS are rolling forward on the curve)
startDate | notional | fixedRate | index | schedule | fixedDC | NPV | |
---|---|---|---|---|---|---|---|
0 | 2021-02-03 | 100000000.0 | 0.045 | Sofr | [2021-02-03, 2022-02-03] | Actual360 | 495899.695491 |
1 | 2021-02-04 | 100000000.0 | 0.045 | Sofr | [2021-02-03, 2022-02-04] | Actual360 | 497522.974204 |
2 | 2021-02-05 | 100000000.0 | 0.045 | Sofr | [2021-02-03, 2022-02-07] | Actual360 | 502401.179683 |
3 | 2021-02-08 | 100000000.0 | 0.045 | Sofr | [2021-02-03, 2022-02-08] | Actual360 | 504030.036594 |
4 | 2021-02-09 | 100000000.0 | 0.045 | Sofr | [2021-02-03, 2022-02-09] | Actual360 | 505660.287033 |
... | ... | ... | ... | ... | ... | ... | ... |
58 | 2021-04-27 | 100000000.0 | 0.045 | Sofr | [2021-02-03, 2022-04-27] | Actual360 | 635342.145565 |
59 | 2021-04-28 | 100000000.0 | 0.045 | Sofr | [2021-02-03, 2022-04-28] | Actual360 | 637079.838797 |
60 | 2021-04-29 | 100000000.0 | 0.045 | Sofr | [2021-02-03, 2022-04-29] | Actual360 | 638818.893533 |
61 | 2021-04-30 | 100000000.0 | 0.045 | Sofr | [2021-02-03, 2022-05-02] | Actual360 | 644044.222755 |
62 | 2021-05-03 | 100000000.0 | 0.045 | Sofr | [2021-02-03, 2022-05-03] | Actual360 | 645788.719493 |
63 rows × 7 columns
Copyright: QuantFns 2023. For general information only. Not to be relied for any purpose. Not advice about investment. No warranty of any kind. No liability for any use of this information accepted. Contact: info@quantfns.com