You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-8Lines changed: 9 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,8 @@ This Python package implements the Smith-Wilson yield curve fitting algorithm. I
4
4
<br /><br />
5
5
6
6
## How to use the package
7
-
1. To use the Smith-Wilson fitting algorithm, first import the Python package and specify the inputs. In the example below the inputs are zero-coupon rates with annual frequency up until year 25. The UFR is 2.9% and the convergence parameter alpha is 0.128562. The `terms` list defines the list of maturities, in this case `[1.0, 2.0, 3.0, ..., 25.0]`
7
+
1. Install the package with `pip install smithwilson`
8
+
2. To use the Smith-Wilson fitting algorithm, first import the Python package and specify the inputs. In the example below the inputs are zero-coupon rates with annual frequency up until year 25. The UFR is 2.9% and the convergence parameter alpha is 0.128562. The `terms` list defines the list of maturities, in this case `[1.0, 2.0, 3.0, ..., 25.0]`
8
9
```py
9
10
import smithwilson as sw
10
11
@@ -22,7 +23,7 @@ This Python package implements the Smith-Wilson yield curve fitting algorithm. I
22
23
23
24
```
24
25
25
-
1. Specify the targeted output maturities. This is the set of terms you want to get rates fitted by Smith-Wilson.
26
+
3. Specify the targeted output maturities. This is the set of terms you want to get rates fitted by Smith-Wilson.
26
27
Expand the set of rates beyond the Last Liquid Point (e.g. extrapolate to 150 years with annual frequency):
27
28
```py
28
29
# Extrapolate to 150 years
@@ -41,14 +42,17 @@ This Python package implements the Smith-Wilson yield curve fitting algorithm. I
1. To display the results and/or processing them it can be useful to turn them into a table, here using the pandas library:
53
+
The convergence parameter alpha is optional and will be estimated if not provided. The parameter determines the convergence speed of the yield curve towards the Ultimate Forward Rate (UFR). The parameter is estimated by finding the smallest value such that the difference between forward rate at convergence maturity and UFR is smaller than 1bps.
54
+
55
+
5. To display the results and/or processing them it can be useful to turn them into a table, here using the pandas library:
52
56
```py
53
57
# Ensure pandas package is imported
54
58
import pandas as pd
@@ -102,6 +106,3 @@ In the last case, `t` can be any maturity vector, i.e. with additional maturitie
102
106
103
107
[EIOPA (2018). Technical documentation of the methodology to derive EIOPA’srisk-free interest rate term structures](https://eiopa.europa.eu/Publications/Standards/Technical%20Documentation%20(31%20Jan%202018).pdf); p.37-46
0 commit comments