3 Approximation of the Model and Parameters Estimation

advertisement
3 Approximation of the Model and Parameters Estimation
In Correction as of 8-12-2008, page 1, the model is presented as
𝑑𝑙𝑛(π‘Ÿπ‘‘ ) = [1 − (1 − 𝐹)𝑑𝑑 ][𝑙𝑛(𝑇𝑑 ) − 𝑙𝑛(π‘Ÿπ‘‘−𝑑𝑑 )] + (1 − 𝐹)𝑑𝑑 𝐷𝑑 𝑑𝑑 + (1 − 𝐹)𝑑𝑑 𝜎√𝑑𝑑𝑁𝑑
(3.1).
Convergence of (𝟏 − 𝐅)𝐝𝐭 𝐃𝐭 𝐝𝐭
In Correction as of 8-12-2008, page 10, a calculable formula is presented, given 𝐹, 𝜎, 𝑑, πœŽπ‘‡ , 𝛼, 𝛽.
We can try to verify that 𝐷𝑑 is relatively small compared to the {𝑙𝑛(π‘Ÿπ‘‘ )} from numerical tests.
Some results are attached below.
Table 3.1 Convergence of (1 − 𝐹)𝑑𝑑 𝐷𝑑 𝑑𝑑
Mean
Reversion
Alpha
Beta
Target
Volatility
Mean of Dt
Sdev of Dt
Mean of (1F)Dtdt
0.2
8
4
0.5
0.028996634
0.000301201
0.001933109
0.2
8
1
0.5
0.032955065
0.000115053
0.002197004
0.2
2
4
0.5
0.032714718
0.000133706
0.002180981
0.2
2
1
0.5
0.027579286
3.02452E-05
0.001838619
0.8
8
4
0.5
0.296378125
0.016555595
0.004939635
0.8
8
1
0.5
0.375057671
0.007657011
0.006250961
0.8
2
4
0.5
0.365161335
0.008317215
0.006086022
0.8
2
1
0.5
0.355641648
0.002590482
0.005927361
(The VBA code for calculating 𝐷𝑑 is in “3.1-convergence of Dt”)
From the table above, we can see that the mean of (1 − 𝐹)𝐷𝑑 𝑑𝑑 is relatively small compared to
the log of the interest rate. Therefore, we can approximate the original model by
𝑑𝑙𝑛(π‘Ÿπ‘‘ ) ≈ [1 − (1 − 𝐹)𝑑𝑑 ][𝑙𝑛(𝑇𝑑 ) − 𝑙𝑛(π‘Ÿπ‘‘−𝑑𝑑 )] + (1 − 𝐹)𝑑𝑑 𝜎√𝑑𝑑𝑁𝑑
or
(3.2)
𝑙𝑛(π‘Ÿπ‘‘ ) ≈ [1 − (1 − 𝐹)𝑑𝑑 ]𝑙𝑛(𝑇𝑑 ) + (1 − 𝐹)𝑑𝑑 𝑙𝑛(π‘Ÿπ‘‘−𝑑𝑑 ) + (1 − 𝐹)𝑑𝑑 𝜎√𝑑𝑑𝑁𝑑
(3.3).
In other words, in (3.3), the 𝑙𝑛(π‘Ÿπ‘‘ ) is a weighted average of 𝑙𝑛(𝑇𝑑 ) and 𝑙𝑛(π‘Ÿπ‘‘−𝑑𝑑 ). Notice that a
larger 𝐹 assigns more weight to 𝑙𝑛(𝑇𝑑 ), that is, a larger 𝐹 will bring the interest rate to the regime target
more quickly.
In (3.3), we need to input two vectors and a mean reversion factor to yield a smooth path . The
first vector, 𝑉1 , indicates when the regime switch take place, the second vector, 𝑉2 , indicates what the
new regime target is when the previous regime is replaced. The mean reversion is denoted as F in
(3.1)~(3.3).
As we discuss above, (3.3) is an effective approximation of the original model. Given two vectors,
mean reversion factor, and an initial interest rate, (3.3) will yield a smooth interest path. If we regard this
smooth path as estimation of the historical path, we can calculate the MSE for a specified set {𝑉1 , 𝑉2 , 𝐹}.
The next target is to find the appropriate set {𝑉1 , 𝑉2 , 𝐹} the yields the minimum MSE and regard
them as the real historical situation. In practice, it is impossible to try each and every set among the
parameter space. A tradeoff between accuracy and efficiency needs to be made.
One Possible Way of Parameters Estimation
(1) Find a π•πŸ :
We start by assuming that if there is a regime switching, it must be on the date when a new monthly
interest rate is available. By this assumption, we reduce the continuous distribution of 𝑉1 into discrete
distribution. Next, we assume that the range between two regimes must be greater than 12 months. Let
𝑙𝑛(𝑅𝑖 ) represent the natural logarithm of the ith month interest rate. And let βˆ†π‘™π‘›(𝑅𝑖 ) = 𝑙𝑛(𝑅𝑖 ) −
𝑙𝑛(𝑅𝑖−1 ). Since we already have an estimator of the coefficient of noise term, denoted as π‘Š. Next define
a vector 𝑃(𝑖) by
𝑃(𝑖) = 1,
𝑃(𝑖) = 0.5,
𝑃(𝑖) = −0.5,
𝑃(𝑖) = −1,
{
𝑖𝑓 W < βˆ†π‘™π‘›(𝑅𝑖 )
𝑖𝑓 0 ≤ βˆ†π‘™π‘›(𝑅𝑖 ) ≤ π‘Š
𝑖𝑓 − π‘Š ≤ βˆ†π‘™π‘›(𝑅𝑖 ) ≤ 0
𝑖𝑓 βˆ†π‘™π‘›(𝑅𝑖 ) < −π‘Š
Now, define another vector 𝐢𝑉(𝑗) by
𝑖+12
𝐢𝑉(𝑖) = 1,
𝑖𝑓 ∑
𝑃(𝑗) ≤ πΆπ‘Ÿπ‘–π‘‘π‘’π‘Ÿπ‘–π‘Ž
𝑗=𝑖
𝑖+12
𝐢𝑉(𝑖) = 0,
{
𝑖𝑓 ∑
𝑃(𝑗) < πΆπ‘Ÿπ‘–π‘‘π‘’π‘Ÿπ‘–π‘Ž
𝑗=𝑖
If 𝐢𝑉(𝑖) = 1, then we say that in ith month, there could be a regime switching. If 𝐢𝑉(𝑖) = 0, then
we say there is no regime switching in ith month.
Next, let us define sets π‘†π‘˜ to store these 𝐢𝑉(𝑖)′𝑠. Define π‘†π‘˜ by the following process:
π‘†π‘˜ = {π‘–π‘˜,1 , π‘–π‘˜,2 , π‘–π‘˜,3 , β‹― , π‘–π‘˜,π‘π‘˜ }, such that
(i) π‘–π‘˜,1 < π‘–π‘˜,2 < β‹― < π‘–π‘˜,π‘π‘˜
(ii) 𝐢𝑉(π‘–π‘˜,1 ) = 𝐢𝑉(π‘–π‘˜,2 ) = β‹― 𝐢𝑉(π‘–π‘˜,π‘π‘˜ ) = 1
(iii) 𝐢𝑉(𝑗) = 0, for ∀𝑗, 𝑠. 𝑑 π‘–π‘˜,1 < 𝑗 < π‘–π‘˜,π‘π‘˜ π‘Žπ‘›π‘‘ 𝑗 ≠ π‘–π‘˜,1 , 𝑗 ≠ π‘–π‘˜,2 , β‹― 𝑗 ≠ π‘–π‘˜,π‘π‘˜
(iv) 𝐢𝑉(𝑖) = 0, for ∀𝑖, 𝑠. 𝑑 π‘–π‘˜,π‘π‘˜ < 𝑖 < π‘–π‘˜,π‘π‘˜ + 12
Now, if there are 𝐾 sets of π‘†π‘˜ , we assume that there will be 𝐾 regime switching points through
historical path. And 𝑆1 is the set of candidates of the 1st regime switching point; 𝑆2 is the set of candidates
of the 2nd regime switching point; etc. Obviously, there will be (𝑁1 𝑁2 β‹― 𝑁𝐾 ) combinations of 𝑉1. These
are the combinations we would like to consider.
(2) Find a π•πŸ :
Assume we select a 𝑉1 from previous step. How do we find a good enough 𝑉2 ? If a 𝑉1 is given, then we
know where exactly the regime switching points are located. In each regime, we try different target of
interest rate (discretely) until we find one that yields minimum MSE (or its squared root, i.e., SSE) in this
certain regime. Then we take this target as our estimation. Also, we keep the smooth path that generated
by this target. The edge point of this smooth path will be the beginning point of the smooth path over
next regime so that we have a continuous smooth path.
Remark:
First, given 𝑉1, in order to find a 𝑉2 that yields global minimum MSE, we have to assume F (mean
reversion). The prior value of F is believed to be between 0.2 and 0.5. Second, the calculation of step (1)
and step (2) is very likely a time-consuming process since we intend to find a 𝑉2 that yields global
minimum MSE. It would be tempting if we can try all possible {𝑉1 , 𝑉2 , 𝐹} that belongs to the parameter
space Θ. However, that is unachievable. The purpose of the method provided above is find a subset of Θ,
denoted as Θ0 , and try all possible {𝑉1 , 𝑉2 , 𝐹} that belongs to this subset from a cautious and reasonable
manner. We cannot ensure that the solution from subset Θ0 would be the global solution, but it should
be reasonably good since one needs to try hundreds of millions of scenarios to find this solution from Θ0 .
(3) One Way to Improve Efficiency:
It is possible that in step (1), (𝑁1 𝑁2 β‹― 𝑁𝐾 ) would be a very large number and the calculation would be
too massive to handle. To avoid massive calculation, we can do a tradeoff between accuracy and
efficiency. An example is presented as below to illustrate this idea:
Suppose that in step (1), there are (20 × 20 × 20 × 20 × 20) combinations of 𝑉1, and that in step (2),
we want to discretely try 10 different targets in each regime. Theoretically, we have to examine 20 ×
20 × 20 × 20 × 20 × 10 × 10 × 10 × 10 × 10 = 160,000,000 different paths and select one that
yields minimum MSE. However, an alternative way is presented as below: π‘†π‘˜ = {π‘–π‘˜,1 , π‘–π‘˜,2 , π‘–π‘˜,3 , β‹― , π‘–π‘˜,π‘π‘˜ }
(i) Find a curve that yields minimum MSE in the 1st regime (i.e., from 1st month to some point in 𝑆1 ),
regardless of regimes thereafter. We have to examine 20×10=200 paths here. Once a path that yield
minimum MSE is found, take where that path ends as the desired switching point and that target as the
desired target.
(ii) Start with the desired switching point and desired target we get in the previous regime and follow the
same procedure in step (i) to find next regime switching point and target.
(iii) Repeat step(ii) until we find all the desired regime switching points and regimes.
Remark of the alternative way:
The total paths we need to examine is 20×10×5=1000, in other words, the calculation is greatly reduced.
However, the 𝑉1 and 𝑉2 we find using this alternative method is not a global optimal solution, even
though they also yield a small MSE.
(4) A Recursive Process to Derive F, π•πŸ and π•πŸ
We should keep in mind that only if we assume a prior value of F can we use the previous methods to
derive 𝑉1 , 𝑉2 and then estimate other parameters. After that, we can present a recursive process to
update the prior estimate of F until it converges.
The process can be interpreted by the following steps:
(i) Assume a prior value of F, say 𝐹 (1), then perform the methods we mention above to derive 𝑉1 and 𝑉2 ,
(1)
then denote them as 𝑉1
(1)
, 𝑉2 , respectively.
(ii) Since we know that (π‘Ÿπ‘‘ ) ≈ [1 − (1 − 𝐹)𝑑𝑑 ]𝑙𝑛(𝑇𝑑 ) + (1 − 𝐹)𝑑𝑑 𝑙𝑛(π‘Ÿπ‘‘−𝑑𝑑 ) + (1 − 𝐹)𝑑𝑑 𝜎√𝑑𝑑𝑁𝑑 , define
̂𝑑 ) = [1 − (1 − 𝐹)𝑑𝑑 ]𝑙𝑛(𝑇𝑑 ) + (1 − 𝐹)𝑑𝑑 𝑙𝑛(π‘Ÿπ‘‘−𝑑𝑑 ) and the sum of squared error 𝑆𝑆𝐸 =
𝑙𝑛(π‘Ÿ
2
̂𝑑 ) − 𝑙𝑛(π‘Ÿπ‘‘ )) . Next, based on 𝑉 (1) , 𝑉 (1), try different values of F until we find a F that yields
∑ (𝑙𝑛(π‘Ÿ
1
2
minimum SSE . Denote this F as 𝐹 (2) and take it as the new F (a posterior estimation).
(iii) By combining step (i) and step (ii), we create a recursive process. This process can be simply
(1)
(1)
(2)
(2)
(3)
(3)
expressed as: 𝐹 (1) → 𝑉1 , 𝑉2 → 𝐹 (2) → 𝑉1 , 𝑉2 → 𝐹 (3) → 𝑉1 , 𝑉2
proved theoretically, but in practice the sequence converges rapidly.
→ β‹― . The convergence is not
Remark of the Estimation of F in the Recursive Process:
In (3,3), we have 𝑑𝑙𝑛(π‘Ÿπ‘‘ ) ≈ [1 − (1 − 𝐹)𝑑𝑑 ][𝑙𝑛(𝑇𝑑 ) − 𝑙𝑛(π‘Ÿπ‘‘−𝑑𝑑 )] + (1 − 𝐹)𝑑𝑑 𝜎√𝑑𝑑𝑁𝑑 , and to estimate F
from a minimum MES, or SSE manner , we are minimizing
2
∑[(1 − 𝐹)𝑑𝑑 𝜎√𝑑𝑑𝑁𝑑 ] ,
𝑑
or proximately minimizing
∑[𝑑𝑙𝑛(π‘Ÿπ‘‘ ) − βˆ†π‘‘ ]2 , where, βˆ†π‘‘ = [1 − (1 − 𝐹)𝑑𝑑 ][𝑙𝑛(𝑇𝑑 ) − 𝑙𝑛(π‘Ÿπ‘‘−𝑑𝑑 )]
𝑑
We know that 𝑑|βˆ†π‘‘ |/𝑑𝐹 > 0, in other words, |βˆ†π‘‘ | and F are positively correlated.
Now, assume that we have a very huge change of interest rate at 𝑑𝐾 , then we are indeed
minimizing
2
[𝑑𝑙𝑛(π‘Ÿπ‘‘πΎ ) − βˆ†π‘‘πΎ ] + ∑ [𝑑𝑙𝑛(π‘Ÿπ‘‘ ) − βˆ†π‘‘ ]2 .
𝑑≠𝑑𝐾
Since we are minimizing the sum of squared errors, the effect of this very huge change of interest
rate 𝑑𝑙𝑛(π‘Ÿπ‘‘πΎ ) is, in fact, even amplified. In order to minimize the whole term, we have to accept a larger
F, which gives us a larger |βˆ†π‘‘ | across the whole period.
Therefore, in regimes with huge volatility, trying to find estimation of F from the minimum sum of
squared error approach is not recommended because the existence of these huge changes of interest
rate greatly reduces the accuracy of this method. Alternatively, one can do the estimation from a
minimum sum of absolute squared error approach.
(5) Use MLE to estimate 𝛂, 𝛃, 𝛍𝐓 , 𝛔𝐓
If we know when and to what the regime targets change, we can use the MLE to estimate these
parameters.
For πœ‡π‘‡ , πœŽπ‘‡ , we know that MLE estimators for them are sample mean and the biased sample
deviation, respectively.
For , 𝛽 , it is a little complicated. We can work out the likelihood function involved 𝛼, 𝛽.
(1) Since we observe 𝑑1 , the probability density of this event is 𝑓𝑑̅ (𝑑1 ).
(2) 𝑓𝑑1 ,𝑑2 (𝑑1 , 𝑑2 ) = 𝑓𝑑2|𝑑1 (𝑑2 |𝑑1 )𝑓𝑑̅ (𝑑1 ), where 𝑓𝑑2 |𝑑1 (𝑑2 |𝑑1 ) = 𝑓𝑑 (𝑑2 − 𝑑1 ). We can further infer that
𝑓𝑑1 ,𝑑2 ,…,𝑑𝑖 (𝑑1 , 𝑑2 , … , 𝑑𝑖 ) = 𝑓𝑑𝑖|𝑑1 ,𝑑2 ,…,𝑑𝑖−1 (𝑑𝑖 |𝑑1 , 𝑑2 , … , 𝑑𝑖−1 )𝑓𝑑1 ,𝑑2 ,…,𝑑𝑖−1 (𝑑1 , 𝑑2 , … , 𝑑𝑖−1 ). So we can conclude
𝐽−2
that 𝑓𝑑1 ,𝑑2 ,…,𝑑𝐽−1 (𝑑1 , 𝑑2 , … , 𝑑𝐽−1 ) = 𝑓𝑑̅ (𝑑1 ) ∏1
𝑓𝑑 (π‘‘π‘˜+1 − π‘‘π‘˜ ).
(3) Since (𝑑𝐽 − 𝑑𝐽−1 ) is a censored observation, the term we would like to maximize is then
𝐽−2
𝑓𝑑̅ (𝑑1 ) ∏1
∞
𝑓𝑑 (𝑣)𝑑𝑣
𝐽 −𝑑𝐽−1
𝑓𝑑 (π‘‘π‘˜+1 − π‘‘π‘˜ ) ∫𝑑
𝐽−2
= 𝑓𝑑̅ (𝑑1 ) ∏1
𝑓𝑑 (π‘‘π‘˜+1 − π‘‘π‘˜ ) 𝑆𝑑 (𝑑𝐽 − 𝑑𝐽−1 )
The VBA code implemented this estimation if in “3.2-path mimic” and “3.3-MLE for parameters”
(6) Implying the Parameter Estimation Technique
Applying this technique, we have a convergence set of {𝑉1 , 𝑉2 , 𝐹}, which is visually showed in figure 3.1.
Figure 3.1 {𝑉1 , 𝑉2 , 𝐹}
-2
1
29
57
85
113
141
169
197
225
253
281
309
337
365
393
421
449
477
505
533
561
589
617
645
673
701
-1.5
-2.5
Ln(rt)
-3
Smooth
-3.5
Regime
-4
-4.5
The estimated parameters are:
Table 3.2 Estimation of Parameters
Parameters
Estimation
𝛼
7.100068
𝛽
1.139999
Mean Target
0.060762
Target Volatility, i. e. , σ 𝑇
0.669872
Initial Target
0.021237
0.3674902
F
Noise Analysis And Kalman Filter
(π‘˜)
(π‘˜)
Once we find the convergent 𝐹 (π‘˜) , 𝑉1 and 𝑉2 , the residual term (noise) at time t is then
̂𝑑 ) − 𝑙𝑛(π‘Ÿπ‘‘ )), the noise figure in historical date is presented below.
(𝑙𝑛(π‘Ÿ
Figure 3.2
noise
0.2
0.1
0
-0.1
0
100
200
300
400
500
600
700
800
noise
-0.2
-0.3
-0.4
In the figure above, we can see that the residual terms seem to have heteroskedasticity, in other
words, residuals are different in different period.
A way to explain this heteroskedasticity is that other than endogenous noise term
𝑑𝑑
(1 − 𝐹) 𝜎√𝑑𝑑𝑁𝑑 , there are exogenous noises, which are independent from the model. These
exogenous noises can be observation error, which represents the mispricing of the market. By
introducing these exogenous noises, denoted by πœˆπ‘‘ , we can regard the historical interest rate path as:
ΜŒπ‘‘ ) = 𝑙𝑛(π‘Ÿπ‘‘ ) + πœˆπ‘‘
𝑙𝑛(π‘Ÿ
where in a kth regime,
𝑣𝑑 ~𝑁(0, π‘…π‘˜ )𝐸[πœˆπ‘– ] = 𝐸[πœˆπ‘— ], π‘‰π‘Žπ‘Ÿ[πœˆπ‘– ] = π‘‰π‘Žπ‘Ÿ[πœˆπ‘— ], π‘Žπ‘›π‘‘ πœˆπ‘– ⊥ πœˆπ‘— π‘“π‘œπ‘Ÿ ∀𝑖 ≠ 𝑗
One important feature about πœˆπ‘‘ is that it does not affect the stochastic model, but only affects
the observation of the interest rate path.
Kalman filter operates recursively on streams of noisy input data to produce a statistically optimal
estimate of the underlying system state. After introducing πœˆπ‘‘ into this stochastic model, we can construct
a kalman filter in kth regime (from π‘–π‘˜π‘‘β„Ž month to (π‘–π‘˜+1 − 1)π‘‘β„Ž month) by taking the following steps :
2
(i) Initialization. 𝑄 = (𝜎(1 − 𝐹)𝑑𝑑 √𝑑𝑑) , 𝑅 = π‘…π‘˜ , π‘ƒπ‘œπ‘ π‘‘_𝑙𝑛(π‘Ÿπ‘–π‘˜ ) = 𝑙𝑛(π‘Ÿπ‘–π‘˜ ) , π‘ƒπ‘œπ‘ π‘‘_π‘ƒπ‘–π‘˜ = 0.
(ii) Predict. π‘ƒπ‘Ÿπ‘–π‘œπ‘Ÿ_𝑙𝑛(π‘Ÿπ‘–π‘˜ +1 ) = [1 − (1 − 𝐹)𝑑𝑑 ]𝑙𝑛(𝑇𝑑 ) + (1 − 𝐹)𝑑𝑑 π‘ƒπ‘œπ‘ π‘‘_𝑙𝑛(π‘Ÿπ‘–π‘˜ ), π‘ƒπ‘Ÿπ‘–π‘œπ‘Ÿ_π‘ƒπ‘–π‘˜+1 =
(1 − 𝐹)2𝑑𝑑 π‘ƒπ‘œπ‘ π‘‘_π‘ƒπ‘–π‘˜ + 𝑄.
̌
(iii) Update. π‘Œπ‘–π‘˜ +1 = 𝑙𝑛(π‘Ÿ
Κ π‘–π‘˜+1 =
π‘–π‘˜ +1 ) − π‘ƒπ‘Ÿπ‘–π‘œ π‘Ÿπ‘™π‘› (π‘Ÿπ‘–π‘˜ +1 ) , π‘†π‘–π‘˜ +1 = π‘ƒπ‘Ÿπ‘–π‘œπ‘Ÿ_π‘ƒπ‘–π‘˜+1 + 𝑅 ,
π‘ƒπ‘Ÿπ‘–π‘œπ‘Ÿ_π‘ƒπ‘–π‘˜+1 /π‘†π‘–π‘˜ +1 , π‘ƒπ‘œπ‘ π‘‘_𝑙𝑛(π‘Ÿπ‘–π‘˜ +1 ) = π‘ƒπ‘Ÿπ‘–π‘œπ‘Ÿ_𝑙𝑛(π‘Ÿπ‘–π‘˜ +1 ) + Κ π‘–π‘˜+1 π‘Œπ‘–π‘˜ +1 ,
π‘ƒπ‘œπ‘ π‘‘_π‘ƒπ‘–π‘˜ +1 = (1 −
Κ π‘–π‘˜+1 )π‘ƒπ‘Ÿπ‘–π‘œπ‘Ÿ_π‘ƒπ‘–π‘˜+1 .
(iv) Repeat step (ii) and (iii) until the whole interest rate path is covered. π‘ƒπ‘Ÿπ‘–π‘œπ‘Ÿ_𝑙𝑛(π‘Ÿπ‘‘ ) is the estimated
real interest rate path yielded by Kalman filter.
The VBA code implemented this estimation if in “3.4-kalman filter”
4 Refernce
1. Bridgeman, J. G., “Random switching times among randomly parameterized regime of random interest
rate scenarios”, Actuarial Research Clearing House (ARCH) 2007.1 (January 2007)
2. Bridgeman, J. G., “Combinatorics for Moments of a Randomly Stopped Quadratic Variation Process”,
University of Connecticut, 2012.8
3. Bridgeman, J. G., “Moments of a Regime-Switching Stochastic Interest Rate Model with Randomized
Regimes”, University of Connecticut, 2007.12
4. Brow, R. G. and Hwang, P. Y. C., Introduction to Random Signals and Applied Kalman Filtering, Wiley
(1997)
Download