Creates a rate curve instance

1 2 3 |

`rates` |
A rate vector |

`rate_type` |
The rate type. Must be on of c("fut", "zero_nom", "zero_eff", "swap") |

`pers` |
The periods the rates correspond to |

`fun_d` |
A discount factor function. fun_d(x) returns the discount factor for time x, vectorized on x |

`fun_r` |
A rate function. fun_r(x) returns the EPR for time x, vectorized on x |

`knots` |
The nodes used to bootstrap the rates. This is a mandatory argument if a rate function or discount function is provided |

`functor` |
A function with parameters x and y, that returns a function used to interpolate |

Currently a rate curve can only be built from one of the following sources

A discount factor function

A rate function and a rate type from the following types: "fut", "zero_nom", "zero_eff" or "swap"

A rate vector, a pers vector and a rate type as before

1 2 3 | ```
rate_curve(rates = c(0.1, 0.2, 0.3), rate_type = "zero_eff")
rate_curve(fun_r = function(x) rep_len(0.1, length(x)), rate_type = "swap", knots = 1:12)
rate_curve(fun_d = function(x) 1 / (1 + x), knots = 1:12)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.