Proiect Serii de timp PDF

Title Proiect Serii de timp
Course Serii de Timp Time Series
Institution Academia de Studii Economice din București
Pages 26
File Size 2.6 MB
File Type PDF
Total Downloads 34
Total Views 629

Summary

ProjectTime seriesRON-XAU exchange rateI. Stationarity testsThe purpose of this project is to analyze the RON-XAU exchange rate in romania, during a defined period of time (2005-2017), with monthly observations and 147 iterations.Lately, we have seen worldwide cases of currency crises, in which a co...


Description

Project Time series RON-XAU exchange rate

I. Stationarity tests The purpose of this project is to analyze the RON-XAU exchange rate in romania, during a defined period of time (2005-2017), with monthly observations and 147 iterations. Lately, we have seen worldwide cases of currency crises, in which a country’s national currency went through significant spikes, whilst the price of gold being the safest, less likely to suffer fluctuations investment. We are going to determine if the time series is stationary or nonstationary by using some steps, such as analyzing the graph, analyzing the evolution throughout time of the Autocorrelation Function (ACF) and Partial Autocorrelation Function (PACF), as well as computing unit root tests for certain cases. Figure 1 - Graph of the RON/XAU exchange rate series

After analyzing the corresponding graph for the time series throughout the given iterations, it can be observed that the graph has an ascending tendency, however, the trend doesn’t appear to be a constant one. Also, the mean, variance and covariance of the series seem to not be constant in time. The trend is an ascended trend over time, having only non zero values. The time series seems nonstationary.

Testing the time series stationarity

The following tests are used to test the stationarity of the time series, based on the correlogram. We call correlogram the graph of the function in relation with the number of lags k. Figure 2 - Correlogram of the RON/XAU exchange rate series

We analyze the ACF (auto correlation function) starting with k=1. It can be seen that ACF(1) has a rather high value - 0.977 - and is descending very slowly, with ACF(2) = 0.956, ACF(3) = 0.933 and so on. It can also be observed that there are no spikes in the ACF and the values only descend, they don’t alternate. We can observe that the lag k=12 has, still, a very high value, being ACF(12) = 0.730. The probabilities contain only less than 0.05 values, which means that we have serial correlation between the variables. This points us towards the time series being nonstationary, as we know that for nonstationary time series, the autocorrelation coefficients decrease in a very slow manner. We also see that the structure of the correlation observations ( ACF and PACF ) are way over the dotted lines, which also shows that the time series is nonstationary.

Figure 3 - Augmented Dickey-Fuller test( with intercept)

Formulating the hypotheses H0 - series is nonstationary (has unit root) H1 - series is stationary It can be observed that the calculated t-statistic value is -1.27 which, in absolute value, is smaller than the critical values on the significance level 1% - 3.47, 5% - 2.88, 10% 2.57. Therefore, we can conclude that the series is nonstationary, has a unit root and we accept the H0 hypothesis. The series has a stochastic trend and is difference stationary.

Figure 4 - Augmented Dickey-Fuller test( with trend and intercept)

Formulating the hypotheses H0 - time series is non-stationary - has a unit root H1 - time series is stationary As it can be seen from the test results, the calculated value for the t-statistic -1.64, in absolute value, is smaller than the other critical levels of significance 1% 4.02, 5% - 3.44, 10% - 3.14, thus, we can conclude that the time series is non stationary, so it has a unit root, so he accept the H0 hypothesis. (prob 0.77 > 0.05). The series has a stochastic trend and is difference stationary.

For this Augmented Dickey-Fuller test we’ve selected trend and intercept and the automatic selection criterion is Schwarz Info. The null hypothesis for the ADF test is that the series has a unit root, hence being nonstationary. The values have also been compared to a table that contains the ADF critical values, to make sure there were no errors. Figure 5 - ADF critical values table

We can see that since we have approximately 150 iterations, that puts us between the 100-250 values, and our t-statistic values are very similar to the ones in the table (-4.02, -3.44, -3.14 ). The ADF t-statistic in absolute value (1.64) is smaller than all of the other tstat values, even the weakest one at 10% (3.14). The probability value is 0.77, which makes it less significant. We also observe that the C variable is the most significant one, while the trend and intercept aren’t that significant.

Figure 6 - Augmented Dickey-Fuller test( no trend or intercept)

Formulating the hypotheses H0 - series is nonstationary (has unit root) H1 - series is stationary It can be observed that the calculated t-statistic value 0.94 (positive this time) is smaller than the critical absolute values on the significance level 1% - 2.58, 5% - 1.94, 10% 1.64. Therefore, we can conclude that the series is nonstationary, has a unit root and we accept the H0 hypothesis. The series has a stochastic trend and is difference stationary.

We LOG the time series for the next step, and check the stationarity again. We create a new object as a series, then we use logxau=log(xau) .

Figure 7 - Correlogram for the series with LOG

Figure 8 - ADF test for series with LOG

Once again, we can analyze the test and see that the series is still a nonstationary one, the absolute values being lesser than the critical values for the levels of significance, so we move onto the next step.

Next, we compute the Correlogram and ADF test for the first difference, and we can observe that the series becomes stationary at the first difference. We create a new object as a series, then we use dxau=d(xau) . The graph for the differentiated series DXAU shows signs that the time series became stationary, no longer having a trend and the mean being rather constant.

Graph after applying the first difference

Nevertheless, we are still going to compute all the necessary tests to prove the fact that after differentiating, the series becomes stationary.

Figure 9 - First difference correlogram

Figure 10 - First difference ADF test

As a result, the absolute value 13.40 is way higher than every other value at 1%, 5% and 10% level (4.02, 3.44, 3.14). The probability is very low (0.0000) which means that the value is highly significant. We reject H0 and accept H1 as hypothesis, resulting that the series is stationary and doesn’t have a unit root.

II. ARIMA models(Box-Jenkins Methodology) In order to build the ARIMA(p,d,q) models we need to follow 4 steps: 1. Identification 2. Estimation (and selection)

I.

3. Diagnostic checking 4. Model’s use (forecasting) Identification - finding the values of p, d and q, in order to capture the dynamic features of the data.

Series lron_xau=log(ron_xau)

II.

Estimation - using step 1 we estimate the parameters of the different models.

The following correlogram of the lron_xau series, we can observe that the autocorrelation is decreasing and significant different to 0, the first value being 0.977. The PAC (partial auto correlation) is significant different to 0 in the first lag, then it becomes closer to 0. The probability is constantly 0 and smaller than 0.05, therefore there is a serial correlation between the variables.

Hypothesis for unit root test: H0: the time series has a unit root and is non-stationary H1: time series is stationary We can observe from the unit test (Augmented Dickey Fuller), that the probability has a value of 0.3848 > 0.05. Therefore we accept the null hypothesis (H0). We also have the following critical values: - -3.475184 for 1% significance level - -2.881123 for 5% significance level - -2.577291 for 10% significance level The t-statistic value is -1.789015, which has the absolute value smaller than the critical values, -> we accept the null hypothesis -> the ron/xau time series nonstationary.

We obtain the first order difference of ron/xay using the command series dron_xau=d(ron_xau).

We can observe that the series is stationary.

The probabilities for lag 1(0.173) and lag 2(0.354) are higher than 0.05 which means there is no serial correlation. Therefore we select pmax=1 and qmax=1.

The probability for the unit test is 0 < 0.05, therefore we reject the null hypothesis (H0) and we accept H1, meaning that the series is stationary. In practice, identifying p and q using the ACF and PACF methods, involves a trial and error approach. The practical rule is: - To choose an upper bound for p say pmax, and q, say qmax; - Estimate all models with 0...


Similar Free PDFs