Curve-class | R Documentation |

Creates a Curve Object containing pairs of Tenors with relevant rates and the interpolation function. Also, methods for populating the object via a .csv file and the generation of the interpolation function via cubic splines are included.

`Tenors` |
The Tenors of the curve |

`Rates` |
The rates on the corresponding tenors |

`interp_function` |
(Optional) The interpolation function of the curve. Can be populated via the 'CalcInterpPoints' method |

An object of type Curve

Tasos Grivas <tasos@openriskcalculator.com>

```
## generating a curve either directly or through a csv -
## the spot_rates.csv file can be found on the extdata folder in the installation library path
funding_curve = Curve(Tenors=c(1,2,3,4,5,6,10),Rates=c(4,17,43,47,76,90,110))
spot_rates = Curve()
spot_rates$PopulateViaCSV('spot_rates.csv')
time_points = seq(0,5,0.01)
spot_curve = spot_rates$CalcInterpPoints(time_points)
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.