# Using ARMA-GARCH models to simulate foreign exchange prices

I've fitted an ARIMA(1,1,1)-GARCH(1,1) model to the time series of AUD/USD exchange rate log prices sampled at one-minute intervals over the course of several years, giving me over two million data points on which to estimate the model. The dataset is available here. For clarity, this was an ARMA-GARCH model fitted to log returns due to the first-order integration of log prices. The original AUD/USD time series looks like this:

I then attempted to simulate a time series based on the fitted model, giving me the following:

I both expect and desire the simulated time series to be different from the original series, but I wasn't expecting there to be such a significant difference. In essence, I want the simulated series to behave or broadly look like the original.

This is the R code I used to estimate the model and simulate the series:

library(rugarch)
rows <- nrow(data)
data <- (log(data[2:rows,])-log(data[1:(rows-1),]))
spec <- ugarchspec(variance.model = list(model = "sGARCH", garchOrder = c(1, 1)), mean.model = list(armaOrder = c(1, 1), include.mean = TRUE), distribution.model = "std")
fit <- ugarchfit(spec = spec, data = data, solver = "hybrid")
sim <- ugarchsim(fit, n.sim = rows)
prices <- exp(diffinv(fitted(sim)))
plot(seq(1, nrow(prices), 1), prices, type="l")


And this is the estimation output:

*---------------------------------*
*          GARCH Model Fit        *
*---------------------------------*

Conditional Variance Dynamics
-----------------------------------
GARCH Model : sGARCH(1,1)
Mean Model  : ARFIMA(1,0,1)
Distribution    : std

Optimal Parameters
------------------------------------
Estimate  Std. Error     t value Pr(>|t|)
mu      0.000000    0.000000   -1.755016 0.079257
ar1    -0.009243    0.035624   -0.259456 0.795283
ma1    -0.010114    0.036277   -0.278786 0.780409
omega   0.000000    0.000000    0.011062 0.991174
alpha1  0.050000    0.000045 1099.877416 0.000000
beta1   0.900000    0.000207 4341.655345 0.000000
shape   4.000000    0.003722 1074.724738 0.000000

Robust Standard Errors:
Estimate  Std. Error   t value Pr(>|t|)
mu      0.000000    0.000002 -0.048475 0.961338
ar1    -0.009243    0.493738 -0.018720 0.985064
ma1    -0.010114    0.498011 -0.020308 0.983798
omega   0.000000    0.000010  0.000004 0.999997
alpha1  0.050000    0.159015  0.314436 0.753190
beta1   0.900000    0.456020  1.973598 0.048427
shape   4.000000    2.460678  1.625568 0.104042

LogLikelihood : 16340000


I'd greatly appreciate any guidance on how to improve my modelling and simulation, or any insights into errors I might have made. It appears as though the model residual is not being used as the noise term in my simulation attempt, though I'm not sure how to incorporate it.

• Hi Jeff! You should also provide your data (or at least a representative sample) to the potential helpers. Also, your sample code does not include the packages you used (where the ugarchspec() and ugarchsim() functions reside). Make sure your code is reproducible whenever you ask a question on here and it will "help people to help you". – SavedByJESUS Feb 10 at 2:49
• Thanks for your advice, @SavedByJESUS. I've updated my post to include the R library that I've used, and clarified the format of my data. – Jeff Feb 10 at 7:03
• The main reason why your simulated data is different from the original series is simply because the fitted model, ARMA(1, 1, 1)GARCH(1, 1), is not the appropriate model for your data. You should start by improving your model first, then your subsequent simulation will be similar to your original data. – SavedByJESUS Feb 20 at 2:00

I am working with forex data forecasting and trust me whenever you use Statistical forecasting methods be it ARMA, ARIMA, GARCH, ARCH etc. They always tend to get deteriorated as you try to predict much ahead in time. They may or may not work for next one or two periods but definitely not more than that. Because the data you are dealing with has no auto-correlation, no trend and no seasonality.

My question to you, have you checked ACF and PACF or tests for trend, seasonality before using ARMA and GARCH? Without the above mentioned properties in the data statistical forecasting doesn't work because you are violating the basic assumptions of these models.

• Thanks for your comment @JAbr, but I'm not actually forecasting. Rather, my application is strictly simulation of an alternative price path with the same statistical characteristics as the observed data. – Jeff Feb 14 at 8:25
• Okay but in other wards you are actually forecasting using garch model isn't it, your simulations uses garch, and garch produces observation by forecasting. – JAbr Feb 14 at 8:36
• Absolutely, but you've said that time series model forecasts deteriorate as the horizon extends further into the future. I'm suggesting that the model doesn't sufficiently capture the dynamics of the series even when simulating (or forecasting) at horizons of a single period. – Jeff Feb 14 at 8:42
• i said "They may work for next one or two periods" my bad, i should have said may or may not. – JAbr Feb 14 at 8:44

My suggestions would be to make sure the model you have selected is appropriate for the data.

• Make sure there are no cyclic or seasonal components.
• Perform an Augmented Dickey Fuller Test to test the presence of unit root. If unit root is present then keep differencing the data until The Augmented Dickey Fuller Test shows presence of no unit roots. Alternatively observe the Auto correlation coefficients, they should drop after some n time lags for stationarity.
• Maybe you have over-fit or under-fit the model using incorrect orders? Find the correct orders using AIC and BIC.
• The last point is only relevant if the assumed distribution is Normal, but that is out of line w.r.t. stylized facts of financial returns. The OP is using Student's $t$ distribution by specifying distribution.model="std", which makes sense. – Richard Hardy Feb 15 at 17:58
• You are right. I'll edit my answer. – A-ar Feb 15 at 19:11
• I'm not worried about over-fitting--in fact, for my intended application I want to over-fit the model. I've tested for stationarity, though not for seasonality. Irrespective of these issues, the GARCH model does not appear to be working correctly. It looks as though the simulated series is thoroughly homoscedastic. – Jeff Feb 18 at 6:27