Not entirely satisfying but cointegration is a linear association between multiple time series and most prone to break when a shock occurs. Shocks (excluding calendar events such as earnings announcements) tend to be unheralded.
However, for entertainment value the question can be answered with a high degree of statistical confidence. This Google Book preview link to Professor John D. Barrow’s entertaining book “100 Essential Things You Didn’t Know You Didn’t Know” explains.
The moral, maybe, is that statistical confidence is not the only consideration to take account of in decision-making!
Running Forex pairs in ArbMaker differs from equities in critical ways, especially at the intraday level. Here, for example, are a few points worth considering very carefully:
- Spreads on many FX instruments can be significantly difficult to cover in a pairs trade – all the more so at higher frequency intervals like 5 and 15 minutes
- Cointegrated relationships change/break faster at higher frequency levels and require careful monitoring
- FX is particularly volatile due to near daily rafts of macro-economic announcements
- It is much harder to dilute risk in FX due to fewer available instruments and the dominant influence of the USD in the market
The typical use of easily available high leverage for FX trades amplifies the downside of all of the above. And on top of all this trading triagular FX pairs can make it all worse. That is to say pairs such as EURGBP/EURUSD where EUR appears on both sides of the trade.
Depending on the order of the EURs these ‘triangles’ either cancel out or double up a short/long position. Tricky to trade and, for the unwary, can lead to big holes in one’s trading capital.
If you do not want to risk them simply filter the triangles out of your Scheduler Job options like this:
At each update in the Tracker new data is added to the time series and its impact on the statistical profile integrated.
Depending on what that profile looks like over time users may want to discard certain pairs (for instance, if they are no longer cointegrated at 95% and so on – but the criteria used to keep/discard is entirely up to the trader).
In our internal intraday portfolios it is this process that tends to drive the frequency/sequence to run scans for pairs already in the Watchlist and/or Tracker. As we lose pairs to failing cointegration we will run new scans.
Why? The premise of the software is to:
- allow users to construct their own pairs trading strategies; and
- to ensure those strategies are applied to cointegrated pairs.
Note that the software is designed to control the latter point through deployment of our ‘Dynamic Filters‘ In the Tracker. These monitor the stat profile with each new piece of incoming data.
Trials of version 4.0 can be had here.
- The scan was for a small number of combinations. The smaller the number of pairs scanned the fewer the results. By default the ‘Coint. Scan’ screen returns only cointegrated pairs. So if it finds nothing there will be no returns. However, by ticking the ‘Bypass’ box on the ‘Coint Scan’ screen the software will return the fails also. This enables users to see at which point in the process certain pairs failed cointegration. There is a limit of 500 combinations using the Bypass but it will allow you to see what is going on with the lack of returns.
- The date range used uncovered no cointegrated pairs. Changing the date range will change the statistical profile of the scan returns (both the fails and any cointegrated pairs). Similarly, end-of-day and intraday scans on the same symbols will produce different results.
- The feed might not be configured correctly. This can be tested by going to Parameters->Symbols and clicking the ‘View’ button on one of your symbols. If the graph that appears is populated everything is OK. If not double check the configuration using the documentation instructions.
ArbMaker 4.0 handles out-of-sample testing at the point of pair selection but also can be used to check if your pairs still look as promising as the day they were placed in the portfolio.
For this, just go to the Portfolios, click Test on the pair in question and in the back tester dialog that opens tick the ‘WalkForward’ option.
The test will run your original strategy parameters to the day you placed the pair in the portfolio; and use all the new data that arrived since that date for the out-of-sample run. The results will be listed separately as Training and Run data.
Take a trial of the latest version right here and try it out!
Another mini-chapter in the knowledge-sharing series in support of release of version 4.0 (for which trials can be taken here).
Incoming data changes the statistical profile of pairs – sometimes for the worse in terms of cointegration. For these pairs users may wish to:
- refrain from opening positions where the statistical profile of a given pair deteriorates below a certain level
- close currently open trades where the statistical profile of a given pair deteriorates below a certain level
That’s possible using 6 available statistical filters in ArbMaker’s Tracker screen. These are:
- The Mean Reversion Coefficient (MRC)
- Fixed Beta (entered as an absolute number)
- Correlation (entered as an absolute number)
- Pair Reversed
See the documentation for the detail but, in brief, each of these works an exclusion basis. For example, the cointegration filters exclude pairs failing at chosen levels; the MRC filter excludes pairs sporting a coefficient greater than a user-defined level; and so on. Settings can be saved via the ‘Save Layout’ button.
With these controls traders only go into pairs with the stat profiles they want.
ArbMaker 4.0 was released yesterday. The software remains unique in the marketplace and questions we have had over time demonstrate a demand for detailed information specific to pairs trading using cointegration.
So, in a series of blog postings, we are increasing knowledge-sharing based on a collection of those questions.
Today’s post covers one of the more important questions: how is it that a spread trade can end up reverting to its mean at a loss? There are several ways. For example:
- The spread distribution underlying the Z score chart is not near-normal. Z scores rely on normality or near normality to be meaningful.
- The live beta deviates during the trade from the modelled historic beta. That may be due to a disturbance to the underlying cointegrated relationship – i.e. conditions are changing. This is common in FX where there are macroeconomic announcements nearly every day that are more signal than noise and can break cointegrated pairs – especially at the intraday level.
- The beta is unreliable due to a low R² (R² being a measure of model strength). We find R²s less than 70% have a higher likelihood of failing to revert with profit.
Keep in mind, too, that the Z score is a description of the spread and not an indicator of cointegration. If it blows out it may be reflecting a weakening cointegration situation; or it might be reflecting a small window size (if one was used for the Z calculation) making it more sensitive to the incoming price data.
This is one of the main reasons the software integrates “dynamic filters” into its Tracker allowing stops to be set based on MRC, R², degree of cointegration and so forth. These are measures of and/or prerequisites for cointegration and will pick up direct changes to the underlying relationship better than a stop on the Z alone.
Take our latest version 4.0 for a free trial now to test and integrate these controls into your own strategies.
- Overall stability
- Performance and capacity to handle more volume and operations
- Better graphics
To take 4.0 for free trial click here
Some of the new stuff in 4.0:
- Database change to Microsoft SQL Express: more data & increased overall performance.
- New graphics: faster rendering, mouse/trackball control, dynamic data labels and more robust
- New back tester: more info, new P&L chart presentation, better out-of-sample testing
- New Portfolio back tester: support for intraday portfolios, new charts and and benchmark performance
- New user balancing mechanism: user choice to override auto-hedge
- New ROIC calculation: implemented in both individual and the Portfolio back testers
- One click enabling of Scheduler jobs
- Faster start-up initialization
- Updated screenshots here
- Updated documentation here
Conventional wisdom suggests that weak out-of-sample results mean unreliable in-sample results. Yet that is not necessarily the case: in-sample data is not always biased to detect spurious predictability.
For example, splitting a sample between in and out portions may mean a general loss of information and less predictive power. This is aggravated in samples of small size. Thus an out-of-sample test may end up falsely rejecting valid in-sample results.
There is also the issue, in the context of our software, of reconciling instances where the split period used for the training turns out not to be a period over which the pair is cointegrated whereas the whole period is.
Overall the message might be this: traders could usefully take the view that both in-sample and out-of-sample test results be viewed as informing the pursuit of tradable pairs rather than one being the underwriter of the other.
Check out the screen shots from upcoming version 4.0 here (images 20 to 25) to see how ArbMaker performs out-of-sample tests: .