Description Usage Arguments Details Value Examples
The command estimates the parameters of the De Rezende-Ferreira 5 Factor model using variable \ τ_{1} and \ τ_{2}
1 | DRF.5F.tVar(rate, maturity)
|
rate |
Vector or matrix of class "zoo", which contains interest rates |
maturity |
Vector of class "numeric", wich contains the maturities |
The De Rezende-Ferreira model used to fit the forward rates is:
f_{t}≤ft(m\right) = β_{0t} + β_{1t} e^{-\frac{m}{τ_{1t}}} + β_{2t} e^{-\frac{m}{τ_{2t}}} + β_{3t} ≤ft ( {\frac{m}{τ_{1t}}} e^{-\frac{m}{τ_{1t}}} \right ) + β_{4t} ≤ft ( {\frac{m}{τ_{2t}}} e^{-\frac{m}{τ_{2t}}} \right )
The spot rates, derived from the forward rates f_{t}≤ft(m\right), are given by:
y_{t}≤ft ( m \right ) = β_{0t} + β_{1t} ≤ft (\frac{1 - e^{-\frac{m}{τ_{1t}}}}{\frac{m}{τ_{1t}}}\right) + β_{2t} ≤ft (\frac{1 - e^{-\frac{m}{τ_{2t}}}}{\frac{m}{τ_{2t}}}\right) + β_{3t} ≤ft (\frac{1 - e^{-\frac{m}{τ_{1t}}}}{\frac{m}{τ_{1t}}} - e^{-\frac{m}{τ_{1t}}}\right ) + β_{4t} ≤ft (\frac{1 - e^{-\frac{m}{τ_{2t}}}}{\frac{m}{τ_{2t}}} - e^{-\frac{m}{τ_{2t}}}\right )
The set of optimal parameters will be chosen according to the lowest RMSE value:
≤ft (\widehat{τ}_{1t},\widehat{τ}_{2t} \right) = argmin≤ft \{\frac{1}{N}∑_{t=1}^{N} √{\frac{1}{T}∑_{t=1}^{T}≤ft [ y_{t}≤ft (t_{n} \right ) - \widehat{y}_{t}≤ft (t_{n},τ_{1t}, τ_{2t},\widehat{β_{t}}\right )\right ]^{2} } \right \}
An object of class "zoo", that contains \ ≤ft (β_{0t},\ β_{1t},\ β_{2t},\ β_{3t},\ β_{4t},\ τ_{1t},\ τ_{2t},\ SSR_{t},\ R^{2}_{t} \right)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | #
# De Rezende-Ferreira 5F model on the Brazilian Data-Set
#
data(ZC_Brazil)
real.rate = ZC_Brazil
ZC_Brazil[["Date"]] = NULL
rate = zoo(ZC_Brazil)
index(rate) = as.POSIXct(paste(real.rate[["Date"]]))
maturity <- c(0.5, 0.75, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
RF.5F.Parameters <- DRF.5F.tVar(rate, maturity)
par(mfrow=c(3,2))
plot(RF.5F.Parameters[,"beta0"],xlab="Date",ylab="BETA0",ylim=c(9.5,12.0),col="blue",lwd=1)
grid(nx=12, ny=12)
plot(RF.5F.Parameters[,"beta1"],xlab="Date",ylab="BETA1",ylim=c(-18.0,2.3),col= "blue",lwd=1)
grid(nx=12, ny=12)
plot(RF.5F.Parameters[,"beta2"],xlab="Date",ylab="BETA2",ylim=c(-6.0,13.0),col= "blue",lwd=1)
grid(nx=12, ny=12)
plot(RF.5F.Parameters[,"beta3"],xlab="Date",ylab="BETA3",ylim=c(-10.0,0.0),col= "blue",lwd=1)
grid(nx=12, ny=12)
plot(RF.5F.Parameters[,"beta4"],xlab="Date",ylab="BETA4",ylim=c(-5.0,5.0),col="blue",lwd=1)
grid(nx=12, ny=12)
par(mfrow=c(1,1))
par(mfrow=c(2,1))
plot(RF.5F.Parameters[,"tau1"],xlab="Date",ylab="TAU1",ylim=c(0.2,1.3),col="blue",lwd=1)
grid(nx=12, ny=12)
plot(RF.5F.Parameters[,"tau2"],xlab="Date",ylab="TAU2",ylim=c(2.5,5.5),col="blue",lwd=1)
grid(nx=12, ny=12)
par(mfrow=c(1,1))
#
# De Rezende-Ferreira 5F on the Russian Data-Set
#
data(ZC_Russia)
real.rate = ZC_Russia
ZC_Russia[["Date"]] = NULL
rate = zoo(ZC_Russia)
index(rate) = as.POSIXct(paste(real.rate[["Date"]]))
maturity <- c(0.25, 0.5, 0.75, 1,2,3,5,7,10,15,20,30)
RF.5F.Parameters <- DRF.5F.tVar(rate, maturity)
par(mfrow=c(3,2))
plot(RF.5F.Parameters[,"beta0"],xlab="",ylab="BETA0",ylim=c(10.5,12.5),col="blue",lwd=1)
grid(nx=12, ny=12)
plot(RF.5F.Parameters[,"beta1"],xlab="Date",ylab="BETA1",ylim=c(-1.5,0.5),col="blue",lwd=1)
grid(nx=12, ny=12)
plot(RF.5F.Parameters[,"beta2"],xlab="Date",ylab="BETA2",ylim=c(-7.0,-3.5),col="blue",lwd=1)
grid(nx=12, ny=12)
plot(RF.5F.Parameters[,"beta3"],xlab="Date",ylab="BETA3",ylim=c(-1.5,3.5),col="blue",lwd=1)
grid(nx=12, ny=12)
plot(RF.5F.Parameters[,"beta4"],xlab="Date",ylab="BETA4",ylim=c(-5.5,-0.1),col="blue",lwd=1)
grid(nx=12, ny=12)
par(mfrow=c(1,1))
par(mfrow=c(2,1))
plot(RF.5F.Parameters[,"tau1"],xlab="Date",ylab="TAU1",ylim=c(0.1,1.9),col="blue",lwd=1)
grid(nx=12, ny=12)
plot(RF.5F.Parameters[,"tau2"],xlab="Date",ylab="TAU2",ylim=c(7.5,16.8),col="blue",lwd=1)
grid(nx=12, ny=12)
par(mfrow=c(1,1))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.