IRFunctionCurve
Construct interest-rate curve object from function handle or function and fit to market data
Description
Build a IRFunctionCurve object using
IRFunctionCurve.
After you create an IRFunctionCurve object, you can fit the bond using
the following functions.
| Object Function | Description |
|---|---|
getForwardRates | Returns forward rates for input dates. |
getZeroRates | Returns zero rates for input dates. |
getDiscountFactors | Returns discount factors for input dates. |
getParYields | Returns par yields for input dates. |
toRateSpec | Converts to be a This
|
Alternatively, you can create an IRFunctionCurve object using the
following methods.
| Method | Description |
|---|---|
fitNelsonSiegel | Fits a Nelson-Siegel function to market data. |
fitSvensson | Fits a Svensson function to market data. |
fitSmoothingSpline | Fits a smoothing spline function to market data. |
fitFunction | Fits a custom function to market data. |
For more detailed information on this workflow, see Interest-Rate Curve Objects and Workflow.
Creation
Syntax
Description
creates an interest-rate curve object directly by specifying a function handle and sets
properties and creates an
IRFunctionCurve_obj = IRFunctionCurve(Type,Settle,FunctionHandle)IRFunctionCurve object.
sets properties using optional name-value
pairs and any of the arguments in the previous syntax. For example,
IRFunctionCurve_obj = IRFunctionCurve(___,Name,Value)IRFunctionCurve_obj = IRFunctionCurve('Forward',today,@(t) polyval([-0.0001
0.003 0.02],t)) creates an IRFunctionCurve object for a
forward curve. You can specify multiple name-value pair arguments.
Input Arguments
Name-Value Arguments
Properties
Object Functions
getForwardRates | Get forward rates for input dates for
IRFunctionCurve |
getZeroRates | Get zero rates for input dates for
IRFunctionCurve |
getDiscountFactors | Get discount factors for input dates for
IRFunctionCurve |
getParYields | Get par yields for input dates for
IRFunctionCurve |
toRateSpec | Convert IRFunctionCurve object to
RateSpec |