Discussing the article: "Statistical Arbitrage Through Cointegrated Stocks (Part 7): Scoring System 2"
First, I appreciate your attempt to explain this topic simply.
But I think your backtests are far from reality.
A delay of 0 and modeling 'every tick' are both unrealistic because neither exists. A delay of 0 doesn't actually exist. Set it to at least 100 ms.
And 'every tick' modeling is a manufactured tick by the MT5. You need a 'real tick'.
If I were you, I would make it very clear that this is a sure-loss strategy for retail MT5 users.
Cyberdude #:
Yes, you are right in these points: a delay of 0 is unrealistic, as is the 'every tick' choice. But there is a reason for these choices.First, I appreciate your attempt to explain this topic simply.
But I think your backtests are far from reality.
A delay of 0 and modeling 'every tick' are both unrealistic because neither exists. A delay of 0 doesn't actually exist. Set it to at least 100 ms.
And 'every tick' modeling is a manufactured tick by the MT5. You need a 'real tick'.
If I were you, I would make it very clear that this is a sure-loss strategy for retail MT5 users.
'Every tick' is because we have to deal with very low quality history data for stocks symbols in the default demo account without Exchange subscription. 'Every tick' provided, although yet low quality, slightly better history data.
When it comes to the 0 delay, that is because in this article I was focused in describing the proposed scoring system skeleton, not with the strategy performance in real trading. So, I didn't even think about it.
Don't take me wrong. You are right and **your alert for the readers is valid**. This 'strategy' must be read between quotes. It was never intended as a real world strategy.
Thank you.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Check out the new article: Statistical Arbitrage Through Cointegrated Stocks (Part 7): Scoring System 2.
This article describes two additional scoring criteria used for selection of baskets of stocks to be traded in mean-reversion strategies, more specifically, in cointegration based statistical arbitrage. It complements a previous article where liquidity and strength of the cointegration vectors were presented, along with the strategic criteria of timeframe and lookback period, by including the stability of the cointegration vectors and the time to mean reversion (half-time). The article includes the commented results of a backtest with the new filters applied and the files required for its reproduction are also provided.
For the readers who may not be following this series, we are developing a statistical arbitrage framework for the average retail trader with a consumer notebook, limited funds, and a regular internet bandwidth. The project started as an informal chit-chat with friends and resulted in a challenge that my partner and I accepted as what it is: an opportunity for learning and to improve our skills as traders. The conversation was motivated by the passing of the mathematician and hedge fund manager Jim Simmons, who achieved a record of 30 years of consecutive gains with his legendary Medallion Fund, with a "66.1% average gross annual return or a 39.1% average net annual return between 1988 and 2018" using statistical arbitrage and, in his own words, “some kind of machine learning”.
Until now, we have seen how to apply and interpret the most common correlation, cointegration, and stationarity tests for pairs-trading and for portfolio groups (baskets). We implemented several Python scripts for analysis, two sample Expert Advisors, one for pairs-trading and the other for baskets, and ran some backtests with them. We also set up and have been evolving the required database schema to support our experiments.
If the statistical arbitrage approach is of interest to you, please check the previous articles of this series and take some time to play with them. You will see that the conversation is very trader-friendly, as we have been standing “on the shoulders of the giants”. Professional mathematicians and statisticians already did the hard work for us, and we are benefiting from it by keeping the focus on the trading side - instead of the hard math - and making extensive use of ready-made open-source libraries. Now that we are near the end of the basic part of this series, it’s a good time to review the fundamentals.
That said, let's finish our scoring system. We’ll start by modifying our coint_rank table to accommodate the missing data, the two missing ranking factors.
Author: Jocimar Lopes