## esg.Svensson


A Nelson-Siegel-Svensson curve of continuously compounded spot rates.


Usage


``` python
esg.Svensson()
```


## Parameters


`beta: list of float`  
`beta0` to `beta3`.

`tau: list of float`  
`tau1` and `tau2`, positive.


## Examples

``` python
>>> from prospicio.esg import Svensson
>>> c = Svensson([0.04, -0.02, 0.01, 0.0], [2.0, 8.0])
>>> round(c.spot(30.0), 4)
```

0.0393


## Attributes

| Name | Description |
|----|----|
| [beta](#beta) | The parameters `beta0` to `beta3`. |
| [tau](#tau) | The parameters `tau1` and `tau2`. |

------------------------------------------------------------------------


#### beta


The parameters `beta0` to `beta3`.


`beta: list[float]`


------------------------------------------------------------------------


#### tau


The parameters `tau1` and `tau2`.


`tau: list[float]`


## Methods

| Name | Description |
|----|----|
| [discount()](#discount) | The discount factor at `m` years. |
| [fit()](#fit) | Fit the curve to spot yields by maturity (least squares). |
| [forward()](#forward) | The instantaneous forward rate at `m` years. |
| [spot()](#spot) | The spot rate at maturity `m` years. |

------------------------------------------------------------------------


#### discount()


The discount factor at `m` years.


Usage


``` python
discount(m)
```


------------------------------------------------------------------------


#### fit()


Fit the curve to spot yields by maturity (least squares).


Usage


``` python
fit(maturities, yields)
```


------------------------------------------------------------------------


#### forward()


The instantaneous forward rate at `m` years.


Usage


``` python
forward(m)
```


------------------------------------------------------------------------


#### spot()


The spot rate at maturity `m` years.


Usage


``` python
spot(m)
```
