Application of Kalman Filter on Modelling Interest Rates

This study aims to test the feasibility of using a data set of 90-day bank bill forward rates from the Australian market to predict spot interest rates. To achieve this goal I utilized the application of Kalman filter in a state space model with time-varying state variable. It is documented that in the case of short-term interest rates,the state space model yields robust predictive power. In addition, this predictive power of implied forward rate is heavily impacted by the existence of a time-varying risk premium in the term structure.


Introduction
Many economic and financial models depend on data that are not observable.These unobservable data are often used in an attempt to establish a framework that can predict future events.Arguably, the most commonly adopted models for this purpose is a wide range of time series models, including the conventional linear regression model and the Autoregressive Integrated Moving Average (ARIMA) family models.These frameworks can be written and estimated as special cases of state space specifications.The application of the state space models in econometric literature has been intensive, encompassing the estimation of unobserved elements such as (rational) expectations, measurement errors and missing observations, to name but a few.
There are two main benefits to representing a dynamic system in a state space form.First and foremost, the state space allows unobserved variables (known as the state variables) to be incorporated into an observable model.Second, the model can be analysed using a powerful recursive algorithm known as the Kalman filter.Theoretically, the filter can be used to compute exact, finite sample forecasts for a time varying coefficient specification to model the future interest rates.
Following the works of (Arnold et al., 2008;Chatterjee, 2005;Bhar, 1996), this paper presents a preliminary discussion reviewing the feasibility of the Kalman filter in estimating 2 models: the first is the well-known CIR model in continuous time, and the second is a regression type of model predicting future spot rates from past forward rates.
The rest of the paper will be organized as follows: section 2 introduces a derivation of the Kalman filter algorithm in an univariate context.Next, I provide a discussion on the combination of the filter with a Maximum likelihood estimator (MLE) to create an iterative process for parameters estimation.In section 3, I demonstrate the reformulation of one of the well-established continuous-time interest rate models, the CIR model, into a state space form.Then the use of Kalman filter to estimate this model, adopting from the study of Chatterjee (2005) is presented.Section 4 provides an illustration of Kalman filter to estimate a regression type forecasting model set up by Bhar (1996).section 5 is the concluding section.
2 Kalman filter specification 2.1 Simple Kalman filter algorithm I present here a brief discussion of the specification and estimation of a linear state space model using the Kalman filtering process.Greater detail about the methodology could be found in Harvey (1989) and Hamilton (1994).
There are two basic component of a Kalman Filter: the measurement equation and the transition equation.The measurement equation relates an unobserved variable (X t ) to an observable variable (Y t ) in the general simplified form: where, m is a constant and is assumed known.
The transition equation is based on a model that allows the unobserved variable to change through time, with the general form: To begin deriving the Kalman filter algorithm, we can insert an initial value X 0 that is normally distributed with mean µ 0 and variance σ 2 0 .Then we have the first one-period ahead prediction of X t , denoted as X 1P : where t ∼ N (0, r t ) and θ ∼ N (0, q t ).Also, t , θ t and X 0 are uncorrelated and they are uncorrelated with lagged variables.The next step is to get a predicted value of Y 1 , called Y 1P : This is the end of the 'prediction' phase.The second phase of the filter is known as the 'updating' phase.With updated information of actual value of Y 1 , we can obtain the error, Y 1E as: Then we can use this error to "adjust" the predicted value of X 1 : where k 1 is the Kalman gain.This variable is determined by taking the partial derivative of the variance of X 1P −ADJ .Following the work of Arnold et al. (2008) we have: where p 1 = (aσ 2 0 + q 0 ) is the variance of X 1P .Just as the β coefficient from a Linear regression model is set to reduce error, the Kalman gain was set to reduce variance in the adjusted predicted value of X 1 .
The final step is to use the new X 1P −ADJ from equation ( 5) to repeat the process over again to find X 2P .At the end of the process we shall have a prediction series of the dependent variable.

Incorporating MLE to the Kalman filter
The Kalman filter output provides us with estimated values of an unobservable variable (X tP −ADJ ) and a predicted timeseries of the observable variable (Y tP ).However, there are still unknown parameters in the equations, namely: t , a and θ t , that need to be estimated.
Assuming the variables Y tP follow a Gaussian i.i.d process.That is, they are independent and identically normally distributed with mean and variance defined as follow: Then we can derive a joint likelihood function: As Arnold et al., (2008) stated, we need to choose the parameters so that the likelihood function is maximized (to provide the highest probability that the observed data actually occurred).To simplify calculations using the likelihood function, it is common to use the natural logarithm of it: The partial derivative of the log-likelihood function with respect to each parameter t , a and θ t is then set to zero in order to maximize the function.
After estimating a set of parameters (called MLEs) we apply the Kalman filter again to produce new time series of Y tP and X tP −ADJ with associated distribution.The likelihood estimation is then performed again producing new MLEs which will again enter the filter.This iterative process continues until the value of the log-likelihood function can not be improved by a significant amount (referreed to as 'the score').Brockwell and Davis, (2002) called the use of maximum likelihood estimation with the Kalman filter the Expectation Maximization (EM).
3 Kalman filter estimator for continuous-time term structure model

The CIR model
In a continuous-time framework, the term structure of interest rates is commonly illustrated with a one-factor model.One particular class of these models are the so-called 'arbitraged-based' models, which take the observed current term structure as given, then seek to price interest rate derivatives by arbitrage alone.Cox et al., (1985) (hereafter CIR) developed a general asset pricing model set up as a single good, continuous time economy with a single state variable.The model derived a process for the short rate, r, and then explore the implication of r on bond prices in a risk-neutral world (in the case of modelling a term structure, we need the yield curve of a zero coupon bond).r cannot be directly observed and is "a theoretical construct designed to facilitate the modelling process" (Chatterjee, 2005).
In the CIR model, an agent with constant relative risk aversion faces production opportunity which evolve according to movements in a single state variable.This implies that the instantaneous interest rate can be thought of as a state variable with the given process: As mentioned in Cairns, (2004) andChatterjee, (2005), this model accounts for the fact that the risk-free rate must be positive.It also implied the dependence of short-term interest volatility and the interest rate itself.dW P is a Wiener process under the measure P .Chatterjee, ( 2005) then provided a risk-adjusted process that incorporates the effect of market price of risk.Assuming the zero coupon bond price follow a martingale process the CIR model can be rewritten as: Where dW Q is a Wiener process under the Q measure and λ is the market value of risk.Details of bond price formulae from this process could be found at (Cairns, 2004) (pp.67).

The Kalman filter
In dealing with the estimation of exponential affine term structure models, the Kalman filter has been used in various papers.One assumption of the affine models is that bond price is a linear function of the underlying state variables.
As illustrated in section 1, we can use the Kalman filter to estimate the parameter set given the relationship between bond yields and the unobserved state variables.
To do this, we need to reformulate the CIR model in equation 11 into our familiar system of measurement and transition equations.In principle, we need only one zero-coupon bond yield as input of a one factor model.Under the assumption that measurement errors are additive and normally distributed we have where R t is the continuously compounded zero-coupon bond yield, it is an affine function of the short rate, and depends upon the long-run level of short rate θ, the degree of mean reversion k and the volatility of the short rate σ.ψ contains the unknown parameters: ψ = (θ, k, σ, λ, h 1 ) with h 1 is the covariance matrix of the error terms .It is an n-diagonal matrix where n is the number of maturities in the specification (here it is 1).The transition equation is as follow: Similarly, Q t is the covariance matrix of u t , it is a m-diagonal matrix where m is the number of factors in the model.It is further assumed that the error terms, t and u t , are normally distributed and uncorrelated, thus enabling the calculation of the MLE.
Subsequently we can use a Kalman filter algorithm to obtain information about X t , by recursively calculate the distribution of X t conditional on the observation of the zero-coupon yields (R t ).
Following a repetitive process of prediction and updating phases and utilizing an MLE similar to the one shown in Section 1, Chatterjee, (2005) was able to obtain a statically significant vector (ψ) of the one-factor CIR model for the UK treasury bond yields with 8 different maturities.The estimation of the mean-reversion parameter is 0.1443 and indicates an expected 4.8 years for short rate to return half-way to its long-run average mean θ = 0.0879.This slow mean-reversion process is characterized by a low but significant volatility estimate σ = 0.0081.The market price of risk (λ) is −0.1176 and is necessary for positive risk premia.We can now put these estimates back to the model to get the stochastic process describing the short rate r t .

The presence of a time-varying risk premium
Numerous empirical studies have emphasized on testing the Unbiased Forward rate Hypothesis (hereafter the UFH) which implies that the forward rate is a relatively accurate predictor of the future spot rates.With some restrictions, this hypothesis is sometimes considered analogous to the Expectation Hypothesis, which states that all market expectations eventually reflect actual fluctuations, and also implies that market is "efficient".Although the hypothesis can be applied to any financial market indicator, the bulk of the research has been focused on the exchange market so far.
Although there is significant support for the UFH across a wide range of academics, almost as great are the evidence against it.To our best knowledge, there exists a continuous debate of the validity of this theory.Macaulay (1938) was among the first to test the UFH where he found no evidence to support it.His study was in conjunction with (Culbertson, 1957;Shiller et al., 1983;Fama and Bliss, 1987) and (Bekaert et al., 2001), all of whom partly rejected the UFH.In these papers, forward rates are documented to be systematically higher than realized spot rates by an amount known as 'risk premium' (also called 'term premium' by some researchers since it is implied in the term structure of interest), which provides compensation for the risk borne when lending over longer periods of time.In particular, Fama (1984) asserted that because forward rates "contain not only information of future spot rates but also that of a risk premium", and that unadjusted variation in this premium could significantly reduce the predicting power of forward rates.He provided an intuitive examination of the existence of this premium which caused the implied forward rates to deviate from the long-term expectation of spot rates.Gordon (2003) used a Kalman filter specification to produce time-varying estimates of the risk premium implied in the term structure.Gordon's goal was to estimate the observed difference between expected and realized interest rates.He argued that while market interest rates might provide the best measure of average expectations, they first need to be 'disentangled' from the term premium.He concluded that the volatile gap between forward rates and spot rates is a result of changes in both interest rate forecasts and in the premia.This research provided us with a tractable approach to estimating the term premium as a supplementary for our main test.

Estimating time-varying parameters with
Kalman filter

Data description
Forecasts of risk-free interest rate, especially short-term rates, are always of great interest to academics.In Australia, the 90-day bank bill rate is considered the primary benchmark for interbank financing, and is one of the key financial variables in the economy.It is a target instrument that the Reserve Bank use to implement monetary policy and an important economic indicator for regulators and governments.It is also a key variable for business since it forms the basis of floating rate loans and most of the financial instruments that can be used to manage interest rate risk.Moreover, longer-term interest rates reflect, at least in part, the expected values of future short rates.For all these reasons, a good model of the short-term interest rate is of great practical importance.
As one of the short-term interest rates, the Australian 90-day bank bill rate is important because it affects economic activity through a number of channels.Floating rates mortgages and fixed-income securities are often pegged against it, so changes in the rate affects consumer income and spending.The rate can also provide the basis for the risk-free rate used in capital asset pricing models, thus affects corporate decision making.The short-term interest rate also affects the exchange rate and money supply, which is impacted by, and also leads to changes in inflation.
Within the scope of this paper we collected data of short-term rates including 90 days and 180 days and monthly bank bill rates.Data is collected from the Data stream vendor and the Reserve bank of Australia.As mentioned in section 1, since the daily data is most likely incomplete (due to omission of weekends and holidays), it is best used in regression type modelling.In contrast, the monthly data series has a stable frequency, therefore is more suitable for a time series approach.Presented in Table 1 are the descriptive statistics of these time series.
There are no significant differences between the 90 days and 180 days time series in terms of basic statistics such as mean, median or standard error.This might indicates no difference in market expectation in the short term compared to the mid term.

Results
Estimates from state space model: The model set up in this section follows Bhar's (1996) framework, in an attempt to estimate the time-varying parameters of a model capturing the relationship between the implied forward rates and the spot interest rates.For this project, I collect data of the daily 90-day and 180day Australian bank bill rate to compute the 90-day forward rates using the "bill parity" formula: where f (i) t+j,t is the i-period forward rate for future period t + j.Next I will set up a linear state space specification as follows: • Measurement/signal equation: • State/transition equations: In this model: r t is the spot rate and f t is the implied forward rate; the initial value of state variables are α 0 ∼ N (0, σ 2 α ) and β 0 ∼ N (0, σ 2 β ).To simplify the notations, define α t = (α, β) as a 2x1 vector of unobserved state variables.Also, set r t = y t = α t * Z t + t where Z t = (1, f t ).Then define the mean and variance matrix of the conditional distribution of α t as: By setting s = t − 1 we can obtain the one-step ahead mean a t|t−1 and variance P t|t−1 (a t|t−1 is the minimum MSE estimator of α t while P t|t−1 is the MSE of α t .We can form the one-step ahead estimate of the signal variable: The corresponding prediction error: t = t|t−1 = y t − y t|t−1 and its variance With this framework I have to provide the initial value for the state variables and their variance matrix: α 1|0 = 0 and P 1|0 = 10, 000 (initial distribution of the SVs is diffuse prior).The final estimated coefficients and root mean square estimates of the SV1 and SV2 (State variables) are 3.618406, 0.247653 and 0.143754, 0.030583 respectively. 2 Next, I use a Kalman smoothing technique to get the evolution of the state variables: the fixed interval smoothing uses data sequence up to time period T to form expectations at any period up to T .
• Smoothed estimates of states: α t = a t|T = E T (α t ) • Smoothed estimates of state variances: V t = var T (α t ) • Smoothed estimates of the signal variables: The results are shown as in Figure 1.
2 Please See appendix for reference At the first glance we can see that the evolution of the two state variables mirror each other relatively closely.There are some notable features about the evolution pattern: the most visible feature is that the model's parameters are not constant overtime: • At mid 2002, the value of α decrease close to zero, while that of β moving up to 1.This is very adjacent to supporting the Unbiased Expectation Hypothesis, which suggests the equality of the forward rates and future spot rates.
• However, from mid-year 2008 to 2009, interest rate decrease sharply from around 8% to 3 % (perhaps due to government large stimulation package after the global financial crisis), corresponding with a decline of α and increase of β.This result is consistent with the existence of a risk premium suggested by (Fama, 1984) and generally does not support the Unbiased Expectation Hypothesis.
Figure 2 shows the fitting of the 1-step ahead and smoothed forecast from the estimated state space model.Both follow the actual data very closely, although the smoothed method seems to perform better.Estimating risk premium: In their respective studies of New Zealand and Australian markets, Guthrie et al., (1999);Krippner, (2002) have documented a statistically significant term premium on money market rates.Bhar (1996) also found a time-varying premium in Australian rates.None of these studies have addressed the question of a time-varying premium in any detail, although the literature suggest that a constant term premium is a reasonable assumption.We used Gordon's (2003) framework to estimate this premium with 3 specifications that assume different behaviour of the premium: constant, random walk and mean reverting.To see which specification perform best, we used these estimates to fit the 1-period ahead excess forward return.This will help us determine whether the validity of the UFH is influenced by a time-varying term premium.
Our result indicates the existence of a time-varying term premium on shortterm interest rates in Australia, and the premium appears to be best described as slowly mean-reverting.This supports the findings of Gordon (2003).We can see that the evolution of the excess forward return is similar to that of the first state variable (α) in our time-variant specification.More importantly, it appears that a model with changing term premium does explain the deviation of the forward interest rate from the expected future rates much better than the traditionally assumed constant premium model.A relevant finding is documented by Gravelle and Morley (2005) who estimated term premia displaying significant time variation in Canadian market, and suggesting that the Expecta-tions Hypothesis is strongly rejected.Gravelle and Morley (2005) also provided noteworthy methodology that could add more substance to our future works, for instance the extended and modified Kalman filter specification accounting for changes in interest rate volatility, possible permanent changes in term premia, and overlapping forecast errors.In particular, these authors documented some evidence of a positive relationship between term premia and interest rate volatility.Moreover, other macroeconomic and political factors are also important, especially exchange rate volatility.

Forecast Random Walk Term Premium
Forecast With Constant Term Premium Forecast With Mean Reverting Term Premium Though not included in this paper's objectives, identifying factors that influence the size or variability of the term premium provide motivation for future researches.With respect to this matter, Chiang (1988); Hamburger & Platt (1975) examined the effect of timing in monetary policies.I believe that the argument of Demiralp (2008) regarding the effect of target interest rate on 3 month Treasury rate expectation provides a possible explanation of the empirical results.

Conclusion
Within this project's scope, my modelling of continuous time term structure starts out with the specification of a time series process for the instantaneous spot interest.The no-arbitrage condition then permits the derivation of a bond pricing formula whereby the bond price is a function of the unobserved instantaneous spot rate and the model's parameters.Using the yields on zero-coupon bonds as inputs for the estimation process, the CIR model can be estimated by a MLE approach based on the Kalman filter.
In addition, the Kalman filter provide a strong framework to modelling regression-type specification and allows us to estimate time-varying parameters.This additional assumption could significantly enhance the model's predictive power, especially when there is significant fluctuation in the short-term rates during the sample period.The result indeed implies the existence of timevarying state variables that explain for the rejection of the Unbiased Hypothesis.
The rejection of said hypothesis is believed by many to be a result of risk/term premia which were not controlled for in this research.We then provide examination of an existing Australian term premium and find that it is a potential source of variation in the expectation of interest rates.Our result confirms the existence of varying premia in Australian term structure.This finding is in line with studies of Fama (1984); Gordon (2003); Gravelle and Morley (2005).However, the evidence presented the current paper is preliminary at best, and further works on the topic of factors affecting the validity of UFH are needed.

Figure 1 :
Figure 1: Graph of smoothed state estimates (α t = a t|T = E T (α t )).Blue curves are the varying pattern of the state variables (α and β, both of which have a confidence interval equals twice the length of the Root Mean Squared Errors (red curves)).Sample period ranges from 31 Dec 2001 to 17 Oct 2011.

Figure 2 :
Figure 2: Graphs of smoothed forecasts (green line) and one-period ahead forecasts (red line) for Australian 3-months interest rate.Sample period ranges from 31 Dec 2001 to 17 Oct 2011.

Figure 3 :
Figure 3: Forecasts of excess forward returns with different specifications of term premium.Sample period ranges from 31 Dec 2001 to 17 Oct 2011.

Table 1 :
Descriptive statistics of Australian 90 days and 180 days bank bill rates (in percentage).