# Where is a risk management utility based on correlation?

In Forex, pairs are correlated or inversely correlated to each other on a spectrum, usually measured from -100 to 100.

Here is such a matrix of correlations: https://www.mataf.net/en/forex/tools/correlation

Has anyone made a utility or indicator that calculates the risk one should take on each currency pair given the other currency pairs in their portfolio?

For example, if one is considering entering a long trade into GBP/USD and already has a 1% risk long position in EUR/USD:

• If such a trader were to go long GBP/USD at 1% risk, and if their position in EUR/USD loses by stop-out, their GBP/USD position is likely to be stopped out as well since those 2 pairs are 90% positively correlated.
• Thus, such a risk management utility based on correlation could alert the trader before opening a GBP/USD position that they could incur 2% loses in the future.

As another example, if one is considering entering a long trade into USD/JPY and already has a 1% risk long position in EUR/USD:

• If such a trader were to go long USD/JPY at 1% risk, and if their position in EUR/USD loses by stop-out, their USD/JPY position is likely to hedge this loss since those 2 pairs are 90% inversely correlated.
• Thus, such a risk management utility based on correlation could tell the trader before opening a USD/JPY position that this is a safe trade since it could hedge potential losses in the future.
Again, does such a tool exist?

Forex Correlation
• www.mataf.net
The following tables represents the correlation between the various parities of the foreign exchange market . The correlation coefficient highlights the similarity of the movements between two parities. If the correlation is high (above 80) and positive then the currencies move in the same way. If the correlation is high (above 80) and negative...

Kmt501:

I don't think anyone has thought of making a correlation within a correlation to determine the risk. There are more successful ways of calculating risk that have been extensively tested for decades.

However, if you want to materialise the concept you are proposing, I would advise you to place an order in the Freelance section, as I have not found anything similar in the CodeBase and Market section.

https://www.mql5.com/en/job

• 2023.08.28
• www.mql5.com
The largest freelance service with MQL5 application developers

Kmt501:

In Forex, pairs are correlated or inversely correlated to each other on a spectrum, usually measured from -100 to 100.

Here is such a matrix of correlations: https://www.mataf.net/en/forex/tools/correlation

Has anyone made a utility or indicator that calculates the risk one should take on each currency pair given the other currency pairs in their portfolio?

For example, if one is considering entering a long trade into GBP/USD and already has a 1% risk long position in EUR/USD:

• If such a trader were to go long GBP/USD at 1% risk, and if their position in EUR/USD loses by stop-out, their GBP/USD position is likely to be stopped out as well since those 2 pairs are 90% positively correlated.
• Thus, such a risk management utility based on correlation could alert the trader before opening a GBP/USD position that they could incur 2% loses in the future.

As another example, if one is considering entering a long trade into USD/JPY and already has a 1% risk long position in EUR/USD:

• If such a trader were to go long USD/JPY at 1% risk, and if their position in EUR/USD loses by stop-out, their USD/JPY position is likely to hedge this loss since those 2 pairs are 90% inversely correlated.
• Thus, such a risk management utility based on correlation could tell the trader before opening a USD/JPY position that this is a safe trade since it could hedge potential losses in the future.
Again, does such a tool exist?

Heres a code entry for that for symbol to symbol , if it helps

And a search term for the marketplace : https://www.mql5.com/en/search#!keyword=correlation%20table&module=mql5_module_market

Correlation
• www.mql5.com
Correlation of two symbols.

Miguel Angel Vico Alba #:

I don't think anyone has thought of making a correlation within a correlation to determine the risk. There are more successful ways of calculating risk that have been extensively tested for decades.

However, if you want to materialise the concept you are proposing, I would advise you to place an order in the Freelance section, as I have not found anything similar in the CodeBase and Market section.

https://www.mql5.com/en/job

That is actually a real issue when using correlation that the OP has to consider . Excellent observation

Highly correlated:
(i) can go together either way, for a long time
(ii) change direction together
(ii) change direction apart (correlation flips to opposite) - becomes known after the fact.

Let alone TFs (what's positively correlated on higher TFs, can be negatively correlated on smaller TFs, and vice versa).

- what's the Signal to buy or sell.
- what's the advantage/profitable opportunity (after investing 2+ years in Pearson - I see none).

I made a simple tool in response to my post above, however my correlation matrix is showing different values than the competition (mataf, myfxbook, etc).

Can anyone with python experience chime in and please give suggestions?

https://github.com/kirillmcclintock/fx_correlation_risk_management

GitHub - kirillmcclintock/fx_correlation_risk_management
• kirillmcclintock
• github.com
Contribute to kirillmcclintock/fx_correlation_risk_management development by creating an account on GitHub.

Kmt501 #:

I made a simple tool in response to my post above, however my correlation matrix is showing different values than the competition (mataf, myfxbook, etc).

Can anyone with python experience chime in and please give suggestions?

https://github.com/kirillmcclintock/fx_correlation_risk_management

different price feeds and different periods for checking would be my first guess

Oleksandr Medviediev #:
Highly correlated:
(i) can go together either way, for a long time
(ii) change direction together
(ii) change direction apart (correlation flips to opposite) - becomes known after the fact.

Let alone TFs (what's positively correlated on higher TFs, can be negatively correlated on smaller TFs, and vice versa).

- what's the Signal to buy or sell.
- what's the advantage/profitable opportunity (after investing 2+ years in Pearson - I see none).

the advantage being that it is possible to have more positions in your portfolio and use up more available margin, while keeping the risk of big loses to a minimum.  For example, if you had 10 positions open at 1% risk each, your losses in the future could be kept at 5% or less if you take into account correlation.

Lorentzos Roussos #:

Heres a code entry for that for symbol to symbol , if it helps

And a search term for the marketplace : https://www.mql5.com/en/search#!keyword=correlation%20table&module=mql5_module_market

Also check this out https://www.mataf.net/en/forex/tools/correlation

Forex Correlation
• www.mataf.net
The following tables represents the correlation between the various parities of the foreign exchange market . The correlation coefficient highlights the similarity of the movements between two parities. If the correlation is high (above 80) and positive then the currencies move in the same way. If the correlation is high (above 80) and negative...

I've seen that but thank you .

You also have a further issue if you are deploying on mt4.