View Full Version : Formula for calculating the correlation value between currency pairs
http://www.myfxbook.com Hello, does anyone know what formula they use to calculate the values on that link?
No one knows? I appreciate any help.
If you have two X and Y series with N elements each, to calculate the correlation coefficient the following is done: The average of X and Y is taken out. X_prom = SUMA(Xi)
Hahaha, how did you do that link trick?
If the formula is that simple, why do so many people use it badly or don’t understand it? I’ve had to see traders who talk about “correlations” and have no idea what they’re saying. They let you know that EUR/USD and USD/CHF are correlated to 99% just because they move in the opposite direction, but they haven’t even done the calculations. I think many don’t even know what statistical correlation means, they just repeat what they hear. But, I guess it’s easier to blame the “manipulated market” than to accept that you didn’t understand a baccalaureate formula.
Okay, I understand better how it is calculated. But now I have another question: what time interval is more reliable to make the correlation between two pairs? Because I guess it’s not the same thing to see the correlation in daily graphs as in hourly graphs, right? I’ve tried several scripts in MT4 and each one throws me different numbers depending on the timeframe, so I don’t know if there’s one “more correct” or if it’s just a matter of interpretation. What do you use?
Thanks to those who have responded, especially to those who made the formula clear. I started to calculate it with Excel and yes, there are numbers similar to those that appear in MyFxBook, so you should go around. Yes, it is easy for people to get involved because the numbers are super sensitive to the data used. If you average with opening or closing prices, the result can change quite a lot. Be careful with that.
I see that many talk about correlation as if it were something static, but it changes every week. I don’t understand how there are people who intend to base their entire strategy on correlated pairs without constantly measuring if that relationship remains in force. Correlation is useful as a reference, but if you don’t adapt, you’re dead. Markets don’t follow fixed formulas for long. This is not pure mathematics, it’s more like a mixture of statistics and chaos.
Let's see if someone makes this clear to me: if I have a strategy based on peer trading, what level of correlation is considered "strong" and usable? More than 0.80? Or is there an acceptable tolerance margin? I want to start trading EUR/USD against USD/CHF, but I don't know if I'm doing it right. I'm afraid I'm basing myself on correlations that no longer exist and end up doubling my losses.
Honestly, it seems to me that many overvalue the correlation. It’s a tool, yes, but it’s not magic. You can have a perfect correlation on paper and still eat a catastrophic operation because you didn’t control the risk. The problem is not the indicator, it’s how you use it. There are people who look for miraculous formulas to compensate for their lack of discipline. Spoiler: they don’t exist.
I started backtesting a coverage system based on correlation between GBP/USD and USD/CHF, and the results were... meh. Too many times the movements were synchronous. What I learned is that you have to analyze more than the numbers: macroeconomic context, fundamentals, market feeling. If you stay alone with the formula, you lose 90% of the picture.
Thanks to all those who are contributing with knowledge and not just with cheap sarcasm. The truth is that yes, this correlation may seem simple, but applying it well is another story. I’m seeing if I can mount a dashboard that updates the correlations automatically in Excel. If someone has a template that I already use, I’d be grateful if I shared it.
What happens with these technical topics is that most retailers have no mathematical training. It’s not to offend, but many don’t understand the mobile average, how are they going to understand a correlation formula? That’s why “magical” indicators and Instagram strategies triumph. This requires studying a little more than most are willing to do.
I've been working with R to analyze peer correlations and the difference with MT4 is abysmal. In R you can do co-integration analysis, time series, cross volatility... If you're really serious about quantitative analysis, you should get out of MT4 as soon as possible. It's a useful but limited platform for this kind of calculations.
A doubt that doesn’t leave me alone: can the correlation also apply to commodities with currency pairs? For example, gold with AUD/USD, or oil with USD/CAD. Is that the same concept? Because I read that those assets have strong relationships, but I don’t know if it’s as linear as with forex pairs. Has anyone tried that in practice?
I don’t know about you, but it seems to me that many websites publish correlations without explaining how they calculate them. Is it weekly? Daily? Do you use closing prices or maximum? All that affects. I would like sites like MyFxBook to be more transparent with the methodology. So one doesn’t stay with a nice but unhelpful table.
What if the correlation changes so much, wouldn't it be better to use a moving average of the correlation itself? I mean, an average of the correlation of the last 30 days, to avoid fake spikes. I don't know if I'm saying a silly thing, but in theory that would soften the decisions. Has anyone tried anything like that?
This correlation reminds me of when I learned about standard deviation. It looks like a technical concept, but it’s amazing how useful it is to understand why your operations fail. In this business, the one who ignores mathematics loses out of ignorance, not out of bad luck.
I am surprised that no one has mentioned how monetary policy influences the correlation between peers. Type rises, central bank decisions... all that breaks correlations in seconds. If you’re operating EUR/USD and USD/CHF and don’t know what the ECB or Fed is doing, you’re flying blind. There’s no formula to save you.
After reading all this, it is clear to me that using the correlation without understanding it well is like driving without knowing what pedals do. You’re going to end up crashing. The idea sounds great in theory, but implementation is what separates the traders who win from those who only play trading.
Powered by nigeriaforextrading® Version 4.2.5 Copyright © 2026 nigeriaforextrading Solutions, Inc. All rights reserved.