Correct calculation of currency indices. - page 4

 
Prival >> :

Let's put it this way, flies apart, cutlets to the other side.

We construct an index. It should be correct. If so, what is the criterion for the correctness of the index construction ?

For example. The sum of the squares of the deviations of the synthetic rates from the real rates should be minimal. I have it that way.

Let me explain. Suppose we calculate EUR/USD. For this purpose we use the EUR index and the USD index. We calculate it, divide it, it does not coincide with the current EUR/USD quote. And now think if the EUR/USD quote is true (because it is chosen as a criterion), then why do we need these calculations? The "truth we already know" is the EUR/USD quote, we just take it and that's it.

No, that's the trick, we may see a local trend on one pair, for example EUR, that is absent on other pairs with EUR. This can lead to a deviation of the synthetic rate from the real one, and by the way, the synthetic rate will be more reliable in this case.

Your ideal course also shows this.

 
voidpiligrim >> :

I tried to calculate exchange rates from a system of equations:

EUR/USD = EURUSD

USD/JPY = USDJPY

and so on, plus a normalising equation

EUR*USD*JPY*CHF*GBP*CAD=1

After recalculation of obtained rates back to currency pairs I got deviation of 6-12%. However, it turned out that the pound price is 100 times more than the yen price, which means that the weights of currency pairs are different.

Now I converted to the quotation correlation with its moving average, the deviation obtained during reverse recalculation is about 0.1 per cent. This is the only reason why the price has appeared in relative units instead of absolute ones. For converting into abstract units I now try to take the product of rates with different moving average length.

When setting the system USDJPY (and other quotes involving JPY) you need /100 to fit these quotes into the
for all other quotes, because 1 point JPY is 0.01, and for all other quotes 1 point is 0.0001.
In the reverse process *100.

 
Prival >> :

Let's do it this way, flies separate, cutlets the other way.

Let's build an index. It must be correct. If so, what is the criterion for the correctness of the index?

Let me explain. Suppose we calculate EUR/USD. For this purpose we use the index EUR and the index USD. We calculate it, divide it, it does not coincide with the current EUR/USD quote. And now think if the EUR/USD quote is true (because it is chosen as a criterion), then why do we need these calculations? The "truth we already know" is the EUR/USD quote, we just take it and that's it.

Now let's talk about the extrapolation. For extrapolation, the most important thing is the model that underlies the extrapolation. There are several types of errors in extrapolation. There are model errors and errors of current measurements. Which in the end lead to extrapolation errors. Let me explain. If we know for sure that the cotier moves sinusoidally (this is the model), then having the current measurements we determine the amplitude, frequency, and phase of the oscillation. We substitute them into the sine wave and extrapolate, if we didn't measure accurately (amplitude and/or frequency and/or phase) there will be extrapolation errors.

You are trying to reduce the error of current measurements for extrapolation, this is good. But it is not the accuracy (ignorance) of the model that introduces the main error. And another simple example, let's say we are trying to predict the speed of a car driving along the Moscow Ring Road = kotir. And for this we use speeds of all other cars (measure their speeds and extrapolate). You can do that too (some analogue of group speed). Or you can just measure the speed of the car we're interested in and extrapolate exactly that speed. But models will differ for group speed and for every separate car (quote) and each method will have its own error of measurement.

If I wanted to discuss extrapolation problems I would have asked the question "Extrapolation problems",
the question is "Correct calculation of currency indices" tchk,
and extrapolation comes from Zhunko's question: "Why calculate them at all?!"
I am sure that the correct calculation of indices gives a lot of useful information for various
I am sure that if you calculate the indexes correctly you will get a lot of useful information for various technical analysis methods.
But meanwhile the calculations are not correct.
(I deliberately do not use the word "correct" because different formulas give different results and they are all correct,
from a mathematical point of view, but they may not be correct in the problem statement),
So while calculations are not correct, development of technical analysis by indices will not happen, because technical analysis will blatantly lie.
Now concerning the task formulation:
it is important that the synthetic exchange rate obtained from the direct quotes should converge to the cross, which was not involved in these calculations,
this is the criterion of correctness, all the rest is a division of flies into cutlets.

If the question of extrapolation problems is interesting, ask in a separate topic "Extrapolation problems" I will support...


 
Urain писал(а) >>

Now on the problem statement:
It is important that the synthetic rate obtained from the direct quotes should be equal to the cross, which was not involved in these calculations,
that's the criterion of correctness, everything else is a division of flies into cutlets.

Use a formula to write down what you said.

1. Synthetic rate of what ?

2. Cross what ?

Suppose we have eight currencies: USD, EUR, GBP, CHF, JPY, CAD, AUD, NZD.

And there are twenty-four currency pairs: EURUSD, EURGBP, EURCHF, EURJPY, EURCAD, EURAUD, EURNZD, GBPUSD, GBPCHF, GBPJPY, GBPCAD, GBPAUD, GBPNZD, USDCHF, USDJPY, USDCAD, AUDUSD, AUDJPY, AUDCAD, AUDNZD, NZDUSD, NZDCHF, NZDJPY.

To make EUR/USD out of pairs, the condition USD and EUR must not be in the pair. Is it so?

 

Urain, you can't just multiply it by 100. There has to be some justification, and the notional value of the currency changes over time. After all, in 2004 the pound's value, when calculated using my system of equations, was 3, the euro 1.5. They also need to be equalized somehow. Which I actually do, through dividing by moving averages (200 days, 2000 days, the whole story).

 
voidpiligrim >> :

Urain, you can't just multiply it by 100. There has to be some justification, and the notional value of the currency changes over time. After all, in 2004 the pound's value, when calculated using my system of equations, was 3, the euro 1.5. They also need to be equalized somehow. Which I actually do, through dividing by moving averages (200 days, 2000 days, the whole story).


I'm not referring to the notional value but the dimension of the units. In Forex with a leverage of 1/100 if you get
0,0001 is a profit value, you get 1% of the invested money.

That's why we created the variable "point" which is 0.0001 for all currencies.
and the JPY point= 0.01.

 
The system suggested by voidpiligrim, I have a solution in MathLab (accuracy I'm happy with),
But it uses "sqrt(-1)"-irrationality. Does anyone know how to translate this into MQL?
 
Prival >> :

Use a formula to write down what you said.

1. Synthetic rate of what ?

2. Cross what ?

Suppose we have eight currencies: USD, EUR, GBP, CHF, JPY, CAD, AUD, NZD.

And there are twenty-four currency pairs: EURUSD, EURGBP, EURCHF, EURJPY, EURCAD, EURAUD, EURNZD, GBPUSD, GBPCHF, GBPJPY, GBPCAD, GBPAUD, GBPNZD, USDCHF, USDJPY, USDCAD, AUDUSD, AUDJPY, AUDCAD, AUDNZD, NZDUSD, NZDCHF, NZDJPY.

To make EUR/USD out of pairs, the condition USD and EUR must not be in the pair. Is it so?

It is important that AUDx/CADx obtained from the direct quotes will converge to AUDCAD. I think that in the formula we have to use

because 87% of currency exchange operations are performed with USD.

and in general the reverse process only makes sense to check the calculation formula.

 

Here is the solution to the system in MathLab (add NZD to the system if you need it, it is not available in my DC).

If you are unfamiliar with MathLab (x)^(y) means x to the power of y, I use the first formulas, accuracy to +-1 point,

Those who wish to be more precise use the others, but they are calculated using complex numbers.

Files:
 
Urain, how did you get the root of -1? I only have positive numbers in my formulas.
Reason: