📜 ⬆️ ⬇️

We get the absolute exchange rates from the paired cross-exchange rates


Project: “Absolute exchange rate”


Introduction


about the project


The project “ Absolute exchange rate ” is engaged in the analysis of paired exchange rates, the selection of absolute exchange rates from them and their analysis.


Within the framework of the project, a method of converting from pair rates to absolute exchange rates was obtained. Absolute currency ABS is defined for this. Rates of all available currencies are expressed in relation to ABS.


The project explores the properties of absolute courses. Various applications of absolute exchange rates are explored.


Why is this ...?


To date, several articles have already been published on the application of the absolute exchange rate method. I give the last two.


The article “ Study of connectedness of world currencies through the correlation of absolute exchange rates ” describes one of the applications of the absolute exchange rate technology. A formal method for calculating the relationship between different currencies is given.


The article “ The Markovits portfolio method with reference to the foreign exchange market ” describes the previously unavailable technology for optimizing the currency portfolio.


Research does not stop at these two applications. Other uses of technology are being tested. If readers have their own visions of other possible uses, they can be written in the discussions of the article. Links to discussion sites are provided.


The method of obtaining absolute courses


A detailed description of the technology is given in the article “ From currency pairs to absolute exchange rates ”.


The method is based on the analysis of the representation of pair courses. The pair exchange rate is the ratio of the value of one currency to the value of another. And if you enter some universal absolute currency ABS, then the following conversion takes place.


EUR/USD= fracEURUSD= fracEUR/ABSUSD/ABS


The pair exchange rate is the ratio of two absolute rates.


In order to obtain absolute rates, you must first calculate this equation.


ln(EUR/USD)=ln( fracEUR/ABSUSD/ABS)=ln(EUR/ABS)ln(USD/ABS)


Accordingly, it can be seen that the logarithms of paired rates are linearly related to the logarithms of absolute exchange rates. And that means you can search between them a simple linear transformation. Absolute course logarithms can be multiplied by a direct transformation matrix and get logarithms of paired courses.


ln(Xabs) timesMpr=ln(Xpar)


And it is worth expecting that there is an inverse linear transformation for the transition from paired courses to absolute ones.


ln(Xpar) timesMobr=ln(Xobr)


Accordingly, the whole method of obtaining absolute rates is written as follows.


Xabs=eln(Xpar) timesMobr


You just need to logarithm pair courses, multiply them by the inverse matrix and use the exponent.


About the problem


Above it was described how to get absolute courses from couples. This is done using a linear transformation of logarithmic pairs of courses and return through the exponent.
A direct linear transformation from absolute courses to paired is made using a direct matrix. Get it very easy. It consists of zeros, ones and minus ones (“0” means no pair connection and currency, “+1” is the currency in the pair numerator, “-1” is the currency in the denominator of the pair). Below you can see it.


The greatest problem is getting the inverse matrix (more precisely, you need to use a pseudoinverse transformation ). With its help, you can go from pair to absolute courses. But obtaining this matrix is ​​nontrivial due to the degeneracy of the direct transformation matrix .


In the previous article describes one method of obtaining such a matrix. In the article “ Details of the transition from paired (relative) exchange rates to absolute. Work on mistakes ”reveals the method of obtaining absolute rates. In the experiment, we used the technique of transition to linearly independent components. Thus it was possible to get rid of the degeneracy in the pseudo-inverse transformation.


The method of this experiment


This paper proposes another method of avoiding degeneracy in the direct transformation matrix. Currently used paired courses provided by the RBC . There are 88 currency pairs for export. For them, there is the following direct transformation matrix.



White is zero, blue is -1 and red is one. But she is degenerate. Those. it will not make the inverse matrix.


During the previous experiment, it was possible to notice that the diagonally similar matrix has the inverse transformation. Accordingly, a proposal was made to move to cross-rates and a non-degenerate transformation matrix .


The entire calculation was carried out in the Wolfram Mathematica system. The system allows you to receive cross-rates directly within the system .


Experiment details (small example)


There are 45 currencies in total. For clarity, we first consider the case with a small number of currencies and currency pairs. The calculation is available at the link in the Wolfram Cloud .


List of currencies and currency pairs


The following 10 currencies were selected: AUD, CAD, HKD, JPY, SEK, USD, CHF, EUR, CNY, CZK. Of these, 9 currency pairs were identified: AUD / CAD, CAD / HKD, HKD / JPY, JPY / SEK, SEK / USD, USD / CHF, CHF / EUR, EUR / CNY, CNY / CZK.


Direct conversion matrix


The direct transformation matrix has the following form.



The colorized version looks like this.



The size of the matrix - 10x9. The rank of the matrix is ​​9. The matrix is ​​nondegenerate. You can freely search back to her.


Inverse transformation matrix from pair to absolute courses


As a result of applying the pseudo-inverse transform method, we obtain the inverse matrix.



In the colorized form so.



The size of the inverse matrix is ​​9x10.


Inverse Matrix Check


Before moving on, we check the resulting matrix. To do this, multiply the inverse matrix by a straight line. The result is the following.



And in the colorized form.



Really got a single diagonal matrix . So the reverse is true.


In the previous experiment , the method of obtaining absolute rates was tested. To do this, pair courses were restored from the absolute courses obtained through the direct transformation matrix. Then compared the restored pairs of courses with the original and looked at the error. In our case, the error in such a test will be within the limits of machine accuracy.


Check on real courses


Now let's see the results on real data. Let's take real quotes for paired currency cross rates and calculate absolute rates for them.


Were taken daily cross-rates for 30 days from 03/28/2019 to 04/27/2019.


Currency rates


Here is a matrix of paired exchange rates. These are pairs of exchange rates for the following pairs: AUD / CAD, CAD / HKD, HKD / JPY, JPY / SEK, SEK / USD, USD / CHF, CHF / EUR, EUR / CNY, CNY / CZK.



Here is a course chart for one of the currency pairs.



The average values ​​for paired courses turned out as follows.



Now let's try to estimate the variability of the data. For this we use the standard deviation . But for standardization, we divide it by an average value. The results will display on the chart.



As you can see the standard deviations for each currency pair are in the range of 0, 2% - 0, 9% of the average values ​​of pair rates.


Absolute Courses


Now we calculate absolute rates for paired courses (the technique is described in the Methodology of obtaining absolute courses). After calculations we get the following data series.
These are absolute exchange rates for the following currencies: AUD, CAD, HKD, JPY, SEK, USD, CHF, EUR, CNY, CZK.



We present a graph of the absolute rate of one of the currencies.



Mean values ​​for absolute rates are as follows.



We estimate the variability of absolute exchange rates.



Standard deviations for absolute rates of each currency are within 0, 2% - 0, 7% of the average values ​​of absolute rates. And this is consistent with the data for currency pairs.


Results in all currencies


Now consider the results on all available currencies. The source code is available at the link .


List of currencies and currency pairs


The full list contains the following 45 currencies: AUD, CAD, HKD, JPY, SEK, USD, CHF, EUR, CNY, CZK, GBP, ILS, NOK, NZD, RUB, SGD, ZAR, AED, ARS, BRL, CLP, COP , DKK, EGP, HUF, IDR, INR, ISK, KRW, KWD, KZT, MXN, MYR, PEN, PHP, PKR, PLN, QAR, RON, SAR, THB, TRY, TWD, UAH, VND. The following 44 currency pairs are chosen for them: AUD / CAD, CAD / HKD, HKD / JPY, JPY / SEK, SEK / USD, USD / CHF, CHF / EUR, EUR / CNY, CNY / CZK, CZK / GBP, GBP / ILS, ILS / NOK, NOK / NZD, NZD / RUB, RUB / SGD, SGD / ZAR, ZAR / AED, AED / ARS, ARS / BRL, BRL / CLP, CLP / COP, COP / DKK, DKK / EGP, EGP / HUF, HUF / IDR, IDR / INR, INR / ISK, ISK / KRW, KRW / KWD, KWD / KZT, KZT / MXN, MXN / MYR, MYR / PEN, PEN / PHP, PHP / PKR, PKR / PLN, PLN / QAR, QAR / RON, RON / SAR, SAR / THB, THB / TRY, TRY / TWD, TWD / UAH, UAH / VND.


Direct conversion matrix


A direct transformation matrix of 45 by 44 was obtained. Its rank is 44.



Inverse Transform Matrix


The inverse matrix is ​​the result of applying reverse pseudo-transformation. The size of the matrix is ​​44 by 45.



Inverse Matrix Check


After multiplying the inverse matrix by the straight line, we obtained the unit matrix.



Check on real courses


Loaded 44 paired currency cross-rate. An example of one is given in the following graph.



Here are the average rates for each currency pair.


AUD / CAD 0.951638
CAD / HKD 5.8662
HKD / JPY 14.2202
JPY / SEK 0.0834375
SEK / USD 0.107433
USD / CHF 1.00544
CHF / EUR 0.885125
EUR / CNY 7.54636
CNY / CZK 3.40522
CZK / GBP 0.0335481
GBP / ILS 4.69022
ILS / NOK 2.38106
NOK / NZD 0.173451
NZD / RUB 43.5338
RUB / SGD 0.0209621
SGD / ZAR 10.4641
ZAR / AED 0.259015
AED / ARS 11.7136
ARS / BRL 0.0907021
BRL / CLP 171.256
CLP / COP 4.72058
COP / DKK 0.00210715
DKK / EGP 2.60095
EGP / HUF 16.5291
HUF / IDR 49.5307
IDR / INR 0.00490364
INR / ISK 1.73912
ISK / KRW 9.44975
KRW / KWD 0.000266945
KWD / KZT 1248.05
KZT / MXN 0.050062
MXN / MYR 0.216251
MYR / PEN 0.803967
PEN / PHP 15.7631
PHP / PKR 2.71475
PKR / PLN 0.0269842
PLN / QAR 0.954411
QAR / RON 1.16298
RON / SAR 0.885697
SAR / THB 8.48908
THB / TRY 0.179564
TRY / TWD 5.39876
TWD / UAH 0.871089
UAH / VND 863.675


For each currency pair, we consider the variability as in the experiment above.



The standard deviation for all currency pairs is in the range from 0.2% to 2.5% of the average value.


After recalculation we get absolute rates. Here is a chart of the absolute rate of one of the currencies.



The mean values ​​of the absolute rates are as follows.


AUD 12.4626
CAD 13.096
HKD 2.23247
JPY 0.156996
SEK 1.88165
USD 17.5149
CHF 17.4213
EUR 19.6824
CNY 2.60821
CZK 0.765955
GBP 22.832
ILS 4.86814
NOK 2.04455
NZD 11.7884
RUB 0.270822
SGD 12.9197
ZAR 1.23485
AED 4.76765
ARS 0.407218
BRL 4.49018
CLP 0.0262207
COP 0.0055548
DKK 2.63619
EGP 1.01359
HUF 0.0613224
IDR 0.00123809
INR 0.25249
ISK 0.145194
KRW 0.0153652
KWD 57.5605
KZT 0.0461203
MXN 0.921362
MYR 4.26106
PEN 5.30007
PHP 0.336241
PKR 0.123862
PLN 4.59025
QAR 4.8096
RON 4.1356
SAR 4.66938
THB 0.550046
TRY 3.06473
TWD 0.567676
UAH 0.651731
VND 0.000754602


The variability of absolute rates can be estimated from the chart.



The standard deviation of all absolute rates ranges from 0.2% to 2.5% of the mean. That is consistent with the data of currency pairs.


findings


The experiment with obtaining absolute courses from paired cross courses was a success. A new method for calculating absolute rates has been obtained. The method works and is easy to apply. For further research it is easy enough to get absolute rates.


The accuracy of the method is limited only by the accuracy of the cross-rates issued.


Unfortunately, open sources of cross rates cannot be found online. And accordingly, this method will not work on the site. But during the initial comparison of absolute rates from the site and those obtained in the present experiment, differences were revealed only in the fourth decimal place. A detailed comparison will be carried out in the following works.


The latest version of this article in PDF format can be downloaded here .


Enin A.V.
Orenburg.
05/02/2019


')

Source: https://habr.com/ru/post/450368/


All Articles