ARIMA/GARCH – Straight Out of the Lab to the Trading Scene

Arima/Garch hybrid model is one of the hottest area of research for both time series forecasting as well as modeling markets. I have spent over a year working with this methodology. Large Institutional Traders and Hedge funds are researching methods like this. In my opinion, your days are numbers as a trader if you don’t add this type of research into your trading.

Traders and Quants want predictions to return a single or multiple bars into the future. To achieve this, there are diverse ensemble methods to go with. Among the ensemble method is a hybrid model bears both the autoregressive integrated moving average (ARIMA) model and the generalized autoregressive conditional heteroscedasticity (GARCH) model.

Experts predict that the implementation of machine learning to backtesting and trading platforms will be indispensable few years from now. So will the use of programming language libraries of R and Python. While R boosts of numerous machine statistical and machine learning libraries, Python has a matchless text processing (NLP) to craft sentiment indicators the social media or news sources.

I think this can be one of the most important technologies for traders in the modern computer era on par with Spectral analysis and Game Theory in trading world. The research in this area is just starting, a good percentage of peer review papers are less than 4 years old and some are less than 2 years old. This will be a one of the hottest areas of research for the next 5 to 10 years. If you don’t look at this technology you will have institutional traders making classic methods untradeable over time.

I have been researching ARIMA/GARCH Hybrid models for almost year and I feel I have just touched the surface. I have studied a lot of the published research as well as developing my own research tools in R. My R program ARIMA/GARCH Professional is the results of about 500 hours of work and is outputs many internal variable and advance features of ‘rugarch’ R library. You could try to develop something like this yourself but it requires world class R programming skills.

A Simple Prediction Model

The ARMA model and ARMA-GARCH model can be used to forecast the trading markets. Out-of-sample forecasting performance is evaluated to compare the forecast ability
of the two models. From a statistical point of view, the ARMA-GARCH model outperform with all of the three commonly used statistical measures. Traditional engineering type of models aim to minimize statistical errors. However, the model with minimum forecasting errors in statistical term does not necessarily guarantee maximized trading profits, which is often deemed as the ultimate objective of financial application.

The best way to evaluate alternative financial model is therefore to evaluate their trading performance by means of trading simulation. We found that both ARMA and ARMA-GARCH models were able to forecast the future movements of the market, which yields significant risk adjusted returns compared to the overall market during the out-of-sample period. In addition, although the ARMA-GARCH model is better than the ARMA model theoretically and statistically, the latter outperforms the former with significantly higher trading measures.

The chosen model will make use of the ARIMA/GARCH mode. This makes use of a mean prediction that an ARCH/ARIMA renders and combines it with a GARCH procedure. A lot of R libraries can execute this but just a single one is deployed as a research tool.

The Rugarch library is written by Alexios Ghalanos where he takes the analysis from interesting academic research to a tool that is capable of both risk and trade analysis and predicting future returns.

His GARCH research has allowed him to analyze how a given model will react to the impact of news events. It also supports GARCH models and submodels explained in the research.
The Rugarch is not the only R library effective. Quantmod can always come in handy too. It helps quantitative traders in developing, testing, and deploying statistically based trading models.

Both split and dividend adjust data are deployed for SPY by which the data finesse the effects. At this stage, we will not be making use of the regressor but the ARIMA/GARCH model. We shall test from 1/1/1995 to 7/25/2018. 

Using TradeStation

Our signal data generated from our prediction model is a ascii file. Thus, we can load this into TradeStation as data2 and our EasyLanguage code simply issues buys/sell signals based upon our predictive data. The signals represent a prediction that tomorrow will be:

  • 1 – up
  • -1 – down
  • 0 – don’t know. 

Below is the EasyLanguage code.

// MLPro_ArimaGarchSimple simple strategy using predictions
Inputs: BuyLev(0),SellLev(0);.

Pred= close of data2;

If Pred>BuyLev then buy next bar at market;
If Pred<SellLev then sell short next bar at market;

// could not make prediction so let's just exit
If Pred=0 andmarketposition=1 then sell("FlatLX") next bar at market;
If Pred=0 and marketposition=-1 then buytocover("FlatSX") next bar at market;

As default zero value is being used, the results corresponds to the one produced when the backtest ran in the course of modeling. Do not forget that in this we used case, spit/dividend adjusted data but TradeStation’s data is split adjusted alone. This is the cause of the disparity between them.

Bear in mind that this is only raw forecasting, with the use of zero as a boundary and filtering out when result is zero just because we cannot predict. This is only a starting point, using the extra information in our advance file can improve performance.

Combining this predictive model with other technical data or models can really create improvement. Think of the predictive model as a filter helping you determine if your stratgy should be focusing on the long or short side!

In my research I have seen external regressors improve results as much as 20%-30%. You can see that ARIMA/GARCH appears very promising. Having the right tools and guidance can allow you to add this tool that large institutional traders are research to your arsenal so you don’t get left in the dust. 

Get the tool used to generate this Arima/Garch model by visiting here.

-- By Murray Ruggiero, Using EasyLanguage

Predict market direction one, two or three bars into the future

Learn more about Murray Ruggiero's machine learning tool,
Arima/Garch 1.5 Pro, to help predict market direction!

About the Author Murray Ruggiero

Murray Ruggiero is the chief systems designer, and market analyst at TTM. He is one of the world’s foremost experts on the use of intermarket and trend analysis in locating and confirming developing price moves in the markets. Murray is often referred to in the industry as the Einstein of Wall Street.He is a sought-after speaker at IEEE engineering conventions and symposiums on artificial intelligence. IEEE, the Institute of Electrical and Electronics Engineers, is the largest professional association in the world advancing innovation and technological excellence for the benefit of humanity. Due to his work on mechanical trading systems, Murray has also has been featured on John Murphy’s CNBC show Tech Talk, proving John’s chart-based trading theories by applying backtested mechanical strategies. (Murphy is known as the father of inter-market analysis.)After earning his degree in astrophysics, Murray pioneered work on neural net and artificial intelligence (AI) systems for applications in the investment arena. He was subsequently awarded a patent for the process of embedding a neural network into a spreadsheet.Murray’s first book, Cybernetic Trading, revealed details of his market analysis and systems testing to a degree seldom seen in the investment world. Reviewers were universal in their praise of the book, and it became a best seller among systems traders, analysts and money managers. He has also co-written the book Traders Secrets, interviewing relatively unknown but successful traders and analyzing their trading methodologies. Murray has been a contributing editor to Futures magazine since 1994, and has written over 160 articles.As chief systems designer, Murray digs into the depths of niche and sub-markets, developing very specialized programs to take advantage of opportunities that often escape the public eye, and even experienced high level money managers.

  • Ed Carp says:

    Interesting to see if this could be taken down to a lower timeframe – say, 15-minute bars or hourly bars – for intraday trading. Much greater profit potential riding the intraday market swings!

    • The software can handle lower timeframes than daily but , problem is there no way to handle getting the data into TradeStation in real time because it works though data files and analysis takes time to run.

  • >