npcurve | R Documentation |
Fits a non-parametric reserve demand curve between excess reserves and normalised rates
npcurve(x, y, type = c("rforest", "spline"), dummy = NULL, q = NULL, ...)
x |
A matrix of explanatory variables. Excess reserve must be the first input.Additional regressor follow (optional). |
y |
A vector of normalised interest rates. |
type |
The type of the reserve demand curve. This can be any of |
dummy |
Optional input to signify a regime change (vertical shifts in the curve). Must be a vector of equal length to the rows of |
q |
Target interval. This is a scalar below 1, for example 0.9 is the 90% interval. If |
... |
Additional arguments (unused). |
Returns a model of class npcurvir
. This includes
type
the type of the curve.
fit
the non-parametric model for the mean.
fitQ
The non-parametric model for the quantiles.
data
a list including the y
, x
, and dummy
used for the fitting of the curve.
q
the interval used in the fitting of the curve.
Nikolaos Kourentzes, nikolaos@kourentzes.com
Chen, Z., Kourentzes, N., & Veyrune, R. (2023). Modeling the Reserve Demand to Facilitate Central Bank Operations. IMF Working Papers, 2023(179).
predict.npcurvir
, and plot.npcurvir
.
# Use ECB example data
rate <- ecb$rate
x <- ecb$x[,1,drop=FALSE]
npcurve(x,rate)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.