rectangleThe world's leading A.I. powered trading network
PsyQuation
PlatformPremiumCompanyContact Us

Correlation with a Twist

Leave a comment

I am not sure if you are aware of this amazing correlation of 79% with the number of non-commercial space launches and the number of sociology doctorates awarded in the USA.

 

I hope you realized that this is a spurious correlation joke. There is no relationship between these 2 series other than coincidence. However we have all been victims or perpetrators of applying hindsight narratives to explain the absurd. Remember correlation does not = causation.

 

With that introduction let me dive into a related topic but more exciting. Our data science team have been working on a lead lag indicator. There is great potential to explore whether we can provide you an edge in the market place but need to know we have your support.

 

I don’t want our team investing crucial hours of research we are not 100% sure we can deliver a meaningful result on (robust testing is difficult) if the contents of this post doesn’t resonate with you. I urge you to click this button and vote on our ideas portal. By getting a sense of the communities appetite I can then decide with the team if we will dig deeper.

 

Dynamic Time Warping

 

The standard tool most platforms use to measure the co-movement of 2 similar instruments is the correlation table. This will measure the degree of similarity in price movement of two instruments at the same time. The key words here is ‘the same time’, because if this co-movement occurs exactly at the same time it is near impossible to trade.

 

Now things start to get a little tricky. At least with a typical universe of Forex symbols, as there are no two instruments that co-move with a lag if measured using the correlation formula. For the task of trading our universe it is far too blunt a tool and together with the dangers of spurious correlations its easy for a trader to steadily lose money using the correlation tools most brokers make available.

 

This is a good time for DTW (dynamic time warping) to make its entrance. This is a very sophisticated way of working with individual time series and shifting time to look for similarity patterns whilst measuring the LEAD LAG. PsyQuation uses machine supervised learning (AI) to quantify the most stable lead lag times.

 

Using PsyQuations Lead Lag tool, the user selects a pair of symbols which we run analysis on for the most recent 48 hours of price data in 15 min time intervals.

 

 

See below AUDUSD and Brent Oil which seem to display an interesting lead lag relationship. The pair may not be leading or lagging all the time as can be seen in the chart below:

 

 

So how should I use this chart? We developed a histogram chart to help us develop a trading strategy and make this practical for a trader to use.

 

 

Let me explain what the chart above is showing – The x-axis is the size of the lag in minutes and on the y-axis is the number of times the lag of this x has occurred in prices. For instance on this picture there seems to be a certain lag relation when the price of Brent leads the price of AUDUSD by 4-5 hours (high peaks on the left).

 

So how do we intend for you to use the tool?

 

There are 2 parts to the answer. The first is you will provide a pair of symbols and we plot the above histogram (our algorithm picks the most likely lag) and you visually inspect it. If there is a peak somewhere (not around zero) this means that the algorithm has found a relationship. We help the user with the refined data tab (PsyQuation magic see below) which helps remove confusing short term fluctuations in lead-lag:

 

 

The second way we intend for you to use this tool is described in my final thoughts.

 

Mike’s Final Thoughts

 

I am sure you are all a little confused from this journey into the world of correlations and its spurious dead ends and the potential superhighways into lead lag trading profits.

 

The second part of how we intend for you to use this tools is we have built an EA that trades correlated symbols using dynamic time warping but we are not yet consistently profitable with our preliminary research. Who wants us to continue working on it. Please vote here.

Break Down of a Nervous Breakdown The Deviance of the Standard Deviation