Averaged-Calibration-Length Prediction for Currency Exchange Rates by a Time-Dependent Vasicek Model

The mining business is extremely sensitive to market factors in price behavior. One of the main risk factors in the KGHM, one of the biggest mining companies in the world, is the currency exchange rates prices. Thus, one of the main problems from the market risk management perspective is to properly predict the dynamics of the currency exchange rate data in the long-term horizon. In this paper, we propose to model the data by the so-called extended Vasicek model, which is a natural generalization of the classical Vasicek model, also known as the Ornstein-Uhlenbeck process. The classical model is very popular in the financial data modeling, however, it does not capture the possible changes in the long-term mean and long-term variance. The extended model takes into consideration the fact that the dynamics of the data may change over time by using time-varying coefficients. Applying the extended Vasicek model, we demonstrate the problem of long-term prediction and propose a new approach in this context which is based on the averaging of the predictions obtained from different calibration sample lengths.


Introduction
The mining business is extremely sensitive to market factors in price behavior. How to cite this paper: Serafin, T., Michalak, A., Bielak, Ł., & Wyłomańska, A. (2020). Averaged-Calibration-Length Prediction for Currency Exchange Rates by a Time- Dependent Vasicek Model. Theoretical Economics Letters,10, https://doi.org/10.4236/tel.2020.103037 Theoretical Economics Letters The mentioned above approaches have been proved to be effective and extensively used in the context of short-term forecasting but to our best knowledge the problem of the optimal calibration sample length selection remains practically overlooked when it comes to the long-term predictions. In the existing literature on the long-term forecasting, authors most often choose the biggest possible historical data sample and then perform forecasting (Jorion & Sweeney, 1996) (Garratt & Mise, 2014). Although some researchers argue that averaging long-term predictions obtained from different models clearly improve forecasting performance (Kapetanios, Labhard, & Price, 2008) (Hull & White, 1990), the selection of the optimal calibration length problem still remains unaddressed.
In this paper, we apply the generalized Vasicek model with time-dependent parameters to the description of the currency exchange rates data for long-term prediction. The analyzed currency exchange rates are the main risk factors in the KGHM, one of the biggest mining company in the world. KGHM extracts and processes natural resources (copper ore, molybdenum, nickel, gold, palladium, and platinum). The company possesses a geographically diversified portfolio of mining projects. It owns production plants on three continents-in Europe, South and North America. Thus, as it was mentioned above, from the risk management perspective of KGHM, it is crucial to correctly predict the dynamics of the exchange rates in the long-term horizon. The generalized Vasicek model is the natural extension of the classical Vasicek process, which was used to model the interest rate data (Vasicek, 1977). This process is also known as the Ornstein-Uhlenbeck model, which was introduced by Uhlenbeck and Ornstein (Uhlenbeck & Ornstein, 1930) as a proper model for the velocity process in the Brownian diffusion. The Ornstein-Uhlenbeck process very often is considered in theoretical studies in physics and mathematics.
It exhibits so-called mean reversion property which means that over time the process tends to drift towards its long-term mean.
However, analysis of real data indicates that the classical Ornstein-Uhlenbeck process (or Vasicek model) seems to be insufficient. In the literature one can find different modifications of the classical model (Brockwell, 2014) (Brockwell, 2001) (Brockwell, Davis, & Yang, 2011) (Janczura, Orzeł, & Wyłomańska, 2011) (Wyłomańska, 2011). In this paper, we analyze the extended Vasicek model by replacement the constant coefficient in the classical process by the coefficients dependent on time. The considered process seems to be perfect for modeling the analyzed exchange rates data under the condition they are homogeneous. However, in the analyzed data, we observe that some of their characteristics change in time, thus in the long-term prediction problem this behavior needs to be taken under consideration. In general, as it was mentioned, one may expect that the longer the calibration length, the better the prediction performance. This statement is true, but only in the case of the homogeneous data. This problem is hig-T. Serafin et al. DOI: 10.4236/tel.2020.103037 582 Theoretical Economics Letters hlighted in the paper. We demonstrate that the analyzed vectors of observations cannot be modeled by the same process thus in the problem of the long-term prediction the non-homogeneous character of the time series should be taken under consideration.
The paper is structured as follows: In Section 2, we introduce the generalized Vasicek model and show its main properties. Moreover, we present also how to estimate the parameters of the model. Next, in Section 3, we formulate the problem for simulated data with non-homogeneous behavior. The main part of the paper is Section 4, where we demonstrate the deep analysis for two sets of observations corresponding to the currency exchange rates, namely EUR/USD and USD/PLN. In the next Section, we try to explain the obtained in Section 4 results by demonstrating the non-homogeneous character of the data applying the Markov regime switching model. The last Section concludes the paper.

The Classical Vasicek Model
The classical Vasicek model was introduced in 1977 by Vasicek (Vasicek, 1977).
It is one of the earliest financial models describing the evolution of interest rates, currency exchange rates, and commodity prices. This diffusion process { } t X (called also the Ornstein-Uhlenbeck process) has a mean-reverting property and it is defined by the following stochastic differential equation (SDE): The µ parameter represents the long-term mean level, θ corresponds to the speed of mean reversion, and the σ is the volatility. It means that all future trajectories of { } t X process will oscillate around the µ , and the θ define the velocity at which these trajectories will regroup around the long-term mean.
The unique solution of SDE (1) is defined as: For any s t < the { } t X process has the conditional Gaussian distribution with conditional expectation equal to . When t tends to infinity, the limits of expectation is equal to µ , and the variance is 2 2 σ θ .
The simulation and estimation procedures for the model (1) are based on the Euler-Maruyama method, and it is one of the popular approaches for the approximation of the numerical solution of the SDE. It is given as follows: where Δt is the discretization step, t ε with  is a sequence of independent and identically distributed normal random variables with , and T is the time horizon. Notice that if the Δt is equal to 1, the given Equation (3) becomes a discrete-time autoregressive model with order 1 (AR(1)) (Musiela & Rutkowski, 1998).

The Vasicek Model with Time-Dependent Parameters
The extended Vasicek model (also called generalized Vasicek model) with time-dependent parameters belongs to the group of time-inhomogeneous models (Fan, Jiang, Zhang, & Zhou, 2003). This model has been extended by the Hull and White by allowing both, the drift and variance coefficients, to be time-varying and its SDE is given by the formula (Fan, Jiang, Zhang, & Zhou, 2003): are the functions. The special case of the model (4) is the process given by (1). However, in the practical applications, it is more reasonable to expect that at least some of the parameters of the extended model involve the time-dependent coefficients.

Estimation
For the estimation of the time-dependent parameters of the model (4), we assume that ( ) ( ) ( ) − . The discretized version of (4) can be expressed as: , and i t ε are independent and standard normally distributed random variable with 0 mean and the variance Δ i t . The form of the functions corresponding to time-dependent parameters is not specified in general. For the sake of simplicity, we approximate them locally at each point by a constant, obtaining a set of points which can be later used for curve fitting. In such a way, we obtain a continuous approximation of time-dependent parameters.
We assume that for a given point 0 t , for a time point t in small neighborhood h of 0 t , the approximation is given by: We assume the local estimators of ( ), 0,1 K ⋅ be a nonnegative weight function, called a kernel function. By using the local regression technique (Fan, 2018) the estimates of ( ) can be found via the following weighted least-squares criterion. With respect to parameters a and b, we minimize the following formula: In our studies we assume,

( )
K ⋅ is the one-sided Epanechnikov kernel (Fan, Jiang, Zhang, & Zhou, 2003) (Hart & Wehrly, 1986): In this way, we use only the data observed in the time interval [ ) 0 0 , t h t − which allows to use only the historical data. When it comes to bandwidth selection, in this paper we take 20 h = (which corresponds to the approximate number of trading days during a month) as the optimal bandwidth selection problem is not the main subject of our concern. The problem of the optimal bandwidth selection is discussed in (Fan, 2018).
The explicit formula for â and b can be presented as: and be the estimator of the mean of the process and let: According to the formulas (6) and (13) we obtain: T. Next, by maximization of the pseudo-likelihood function, we obtain the estimator for ( ) 0 0 t β (Fan, Jiang, Zhang, & Zhou, 2003): In the analysis of the currency exchange rates data for the simplicity we assume that functions The estimated functions are finally applied to the prediction. More precisely, after estimation of the functions β ⋅ based on the historical data, we used them later for the prediction period, as they represent the deterministic components of the model.

Problem Formulation
In the econometric literature, the vast majority of papers regarding forecasting and modeling focus on developing more complex and better performing statistical models that will more precisely represent the features of the underlying's price process. Obviously, each of these methods first involves calibrating the model to a portion of historical data. Interestingly, hardly any authors consider the selection of the optimal calibration sample length, usually the choice is made in an "ad-hoc" fashion, and the most common approach is to choose the longest training sample possible. However, some researches argue that the quality of the forecasts strongly depends on the choice of the optimal calibration window. Pesaran & Pick (Pesaran & Pick, 2011) focus on the presence of the structural breaks (the rapid and unexpected changes in the underlying process) and show that for the futures market, averaging predictions from the autoregressive model over different estimation windows lowers the root mean square forecast error. Marcjasz et al. (Marcjasz, Serafin, & Weron, 2018) and Hubicka et al. (Hubicka, Marcjasz, & Weron, 2018) conduct a study for the electricity market and conclude that averaging forecasts over a number of carefully selected calibration window lengths yields significantly better forecasting accuracy than the single "optimal" (selected ex-post) calibration window.
In this study, we focus on the problem of the parameter estimation for the time-varying Vasicek model using different lengths of the historical data calibration sample. Then we forecast future values by simulating a number of trajectories from the extended Vasicek model with estimated parameters, and we investigate how the length of the calibration sample impacts the quality of our predictions. Finally, we try to find the "optimal" calibration window length. Our gen-DOI: 10.4236/tel.2020.103037 586 Theoretical Economics Letters eral methodology consists of several steps which are presented by a flowchart in Figure 1.
In order to illustrate the formulated problem, we first present our approach to the simulated data set. As our exemplary data, we consider a simulated trajectory ( Figure 2) of the model defined in (4) for constant coefficients. We use first 252 × 9 = 2268 observations (on the left-hand side from the dashed vertical line) as a training period for estimation of the model parameters. Note that in the simulated trajectory, we can distinguish three different regimes, i.e., the trajectory consists of three realizations of the Vasicek process, simulated with three different sets of parameters (we denote these three parts 1 2 3 , , X X X , respectively).
Values of these parameters are shown in Table 1.
Next step requires the selection of a calibration period for the parameter estimation-a training sample consisting of historical data on which we estimate the parameters of the Vasicek model (to later use the estimated model to forecast the future values). A common belief is that the longer the calibration sample is, the better the results are. However, in our case, as can be seen from Figure 2, the data that we want to forecast, i.e., observations from 2267 to 2520 (on the right-hand side from the vertical dashed line), was generated using the same set of parameters as for the last 3 × 252 observations in the calibration sample (observations from 1513 to 2268). Therefore, with this knowledge, intuitively, taking a long calibration period that takes into account the whole calibration sample should bring less satisfactory results that calibrating our model to the last 3 × 252 observations. In our study we consider different lengths of the calibration period (calibration windows)-it ranges from 3 × 252 up to 9 × 252 observations for the simulated case. Note that all training samples are left-truncated so that they end on the same observation of the training period, i.e., when considering a 3 × 252 observation calibration window we take observations from 1513 to 2268, and for 7 × 252 calibration sample we take observations from 505 to 2268.
Once the parameters of the Vasicek model are estimated from historical data, we predict future values by simulating 10,000 trajectories (each containing 252 observations) using the calibrated model. Next, we evaluate the performance of our estimations using two following measures: mean absolute percentage error (MAPE) and a novel technique introduced in (Sikora, Michalak, Bielak, Miśta, & Wyłomańska, 2019), called a validation factor (VF).
The first measure, MAPE, is calculated in the following way: is the predicted value at prediction time t from the n-th generated trajectory from the validated period, obtained from the Vasicek model calibrated to a training sample of length cal, t X is the real value at time t, N is the number of generated trajectories and T is the length of each trajectory. We take 10000 N = and 252 T = .
where ( ) cal q Q t is a q-th quantile of the simulated prices from a certain calibration window cal, calculated for values of 10,000 simulations at time t.
The second error measure, VF, is calculated in the following way:  The results of the evaluation for the simulated data case are presented in Table 2. It turns out that indeed taking the shortest, 3-year (3 × 252 observations) calibration sample produced the best results in terms of both MAPE and VF. This simple analysis is a motivation and a starting point to the real data consideration.

Real Data Analysis
In this section, we present the results of our investigation concerning the selection of the calibration window for the estimation of the generalized Vasicek model parameters for real data. We propose here a new approach in the considered issue. We consider daily-frequency of the EUR/USD and USD/PLN currency exchange rates, both spanning from 2nd January 1997 up to 2nd January 2015, we use first 10 years of data, i.e., from 2 January 1997 to 29 December 2006 (dashed, vertical line in Figure 3 and Figure 4 marks the end of this period) as the initial period for the model calibration. The data is freely available (https://stooq.pl/, 2020). For each currency pair, we examine the influence of the length of a training sample on the quality of our 1-year forecasts-the methodology is similar to the one used in case of simulated data. For each test-year (from 2007 to 2014) we first calibrate generalized Vasicek model's parameters on the different lengths of historical data and then generate 10,000 exchange rate trajectories for the corresponding year. Then we use the real data to evaluate the predictions in terms of both MAPE and VF-results are shown in Table 3 and Table 4. The columns are labeled from 2 to 10 and correspond to the length of the historical data sample used to estimate generalized Vasicek model's parameters.
For each row (which corresponds to a certain test-year) we mark the best performing calibration window, i.e., we mark the calibration window length for which generated trajectories produced the best results in terms of a certain error measure (MAPE or VF). This allows us to clearly depict which calibration window length was the "optimal" one in a certain year.

Results
As can be seen from Table 3, for the EUR/USD pair, no clear pattern emerges from the evaluation of our predictions neither in terms of MAPE nor in terms of VF. None of the calibration windows is chosen constantly as the best one, their performance is highly unpredictable and changes significantly in different testyears.       When looking at results for USD/PLN in Table 4, a similar conclusion as for the EUR/USD can be drawn. Neither MAPE nor VF confirms that one certain window length outperforms the rest. Looking at MAPE for USD/PLN (Table 4) we notice that almost every year, there was a different calibration window length that was chosen as the optimal one. Similarly, when looking at the VF criterion, it is impossible to recommend just one calibration sample length. It is also worth noting that the optimal calibration windows for a certain year were almost al-

Averaging Predictions across Calibration Windows
As we have seen in the previous subsection, the choice of just one optimal calibration window length for estimating the extended Vasicek model parameters is, in our case, a cumbersome and hardly doable task. The performance of certain windows changes significantly over time, and an inappropriate choice can bring extremely disappointing effects by significantly lowering the accuracy of our predictions. Also, it is worth mentioning that the selection of the optimal calibration window was made ex-post, we would not be able to indicate the best calibration sample length in advance.
Therefore, in order to tackle this issue, analogously to (Hubicka, Marcjasz, & Weron, 2018) and (Marcjasz, Serafin, & Weron, 2018) we examine several combinations of different calibration window lengths and average the predictions obtained from these windows. Then we evaluate the accuracy of averaged forecast in terms of MAPE and VF. We consider five different combinations of calibration windows; we denote them by Avg (·) and the argument describes the windows that we choose for averaging. We use MATLAB notation in order to refer to a certain combination, e.g. Avg (2:10) refers to averaging predictions from all window lengths from 2 to 10 years while Avg (2:4, 8:10) to selecting predictions from three shortest (2, 3, 4-years) and three longest (8, 9, 10-years) windows.
We use two different approaches to average the predictions-the choice depends on the selection of the evaluation measure.

Averaging Approach When Evaluating MAPE
When evaluating the forecasts in terms of MAPE, we take every simulated trajectory from each calibration window length and average their values with corresponding trajectories from different windows in the chosen combination.
As an example we take Avg (2:4)-we average predictions of currency pair of exchange rates obtained from the extended Vasicek model calibrated to 2, 3, and 4-year historical data samples. For each calibration window length, we obtain 10,000 simulated trajectories of the underlying's price. We take the first trajectory for each of the calibration window length and average their values-we obtain a new, averaged trajectory of the same length (1-year). This procedure is repeated for all trajectories and for each test-year. Then, MAPE is calculated for new, 10,000 averaged trajectories in the same way as it was shown in Section 3.

Averaging Approach When Evaluating VF
The second error measure, a validation factor, assesses the performance of pre- Then we evaluate the performance of a certain combination by calculating the value of the VF for averaged quantile lines. An exemplary procedure of averaging quantile lines for two calibration windows is shown in Figure 5.

Discussion
The presented results indicate the analyzed data can be modeled by using the generalized Vasicek process defined by the stochastic differential Equation (4).
However, by the analysis of the real time series one needs to take under consideration the specific behavior of the data. One may expect, the data are not homogeneous, which means for the historical data, the parameters of the model may change in time. This case is considered in this paper. For the analyzed currency exchange rates, one can explain this regime-change behavior. Exchange rates markets always have been characterized by high dynamics and tendency to shift while some external shocks occur. Taking into account central banks activity in recent years, growth of geopolitical tensions including free-trade restrictions and speeding-up changes on capital markets, stability of models used is under constant pressure.
In order to confirm the analyzed real data have non-homogeneous behavior, we present a short analysis in the contest of their regime-change behavior.
We have applied here the Markov regime switching model (Janczura & Weron, 2012) (Hamilton, 1990) (Hamilton, 2016) that assumes the analyzed data constitutes a sample of independent random variables with the same distribution however the parameters of the distribution may change over time. Because our analyzed time series related to the currency exchange rates are not independent, we applied this methodology to the logarithmic returns of the currency exchange rates data. In the Markov regime switching model, we assume the data have Student's t distribution, and the parameter (number of degrees of freedom) may change over time. For simplicity, we assume here two regimes (R1 and R2) corresponding to two numbers of degrees of freedom of Student's t distribution v1 and v2, respectively (Dueker, 1997). It is worth to highlight, the Markov regime switching methodology is here applied only to detect the significant changes in the logarithmic returns of the analyzed data. In the algorithm, the estimation is made using the second partial derivatives of log-likelihood function (a.k.a. the Hessian matrix). As a result of the procedure, we obtain the vector of probabilities (of the same length as the analyzed vector of observations) of being in regime R1 (corresponding to the Student's t distribution with v1 number of degrees of freedom). We assume the regime change occurs at a given time t when the corresponding estimated probability is higher or equal 0.5.

Conclusion
In this paper, we have considered the problem of the selection of the calibration window length of the long-term prediction for the currency exchange rate data.
We propose here a new approach. The prices of the currency exchange rates USD/PLN and EUR/USD are the main market risk factors of the KGHM mining company, and thus the proper long-term prediction of their dynamics is the crucial point from the risk management perspective. In this paper, we propose to model the real data by the extended Vasicek process with time-varying coefficients, which is a natural generalization of the classical Vasicek model where the coefficients are constant in time. We define the extended model and demonstrate how to estimate its parameters. The problem is formulated based on the simulated time series. The simulated data comes from the Vasicek model, but we assumed that some of the model's parameters change in time. Based on that, we demonstrated how to select the optimal calibration window length and indicated Theoretical Economics Letters that in this case, the longer length of the historical data is not the optimal choice for the estimation period because of the non-homogeneous behavior of the data.
Finally, we presented the deep analysis of real time series of the mentioned currency exchange rate data in the context of the long-term prediction. We demonstrated that depending on the test-year (defined in the previous section), one might obtain different results. This behavior we have explained by the simple analysis of the logarithmic returns of the considered real data where we demon- We see here also the huge potential of the application of the non-Gaussian models. In most of the cases, the real financial data, especially the currency exchange rates data, exhibit non-Gaussian behavior and the assumption of the Brownian motion in the considered model is only the simplification. In further study, we plan to extend the considered model to the non-Gaussian case.