The Exchange Rate Correlation App (X-rate App)

Dr. Camilla Jensen
21 June, 2018

Intro to the X-rate App

The basis for this app is a plot of the exchange rates of 6 European transition countries against the US dollar since 1989. The plot shows the relative depreciation history of these exchange rates. The app makes it possible to conduct a deeper analysis of what is going on in the diagram.

The left hand side plot

plot of chunk unnamed-chunk-1

The right hand side correlation matrix heat map

With the addition of the following code it is then possible to include a heat map that shows the historical correlation among the six selected currencies

rng <- (datapoint - window):(datapoint + window)
cormat <- round(cor(xrates3[rng, 2:7]), 2)

Bringing it all together in an app

plotly_hover is a function that can be used to return information about data points on mouse hover - hence the user triggers what will be shown on the right hand side correlation matrix - so by using the app the user produces his or her own historical analysis or evaluation of co-movement or correlations in exchange rates among a selected number of currencies

Credits and potential extensions to the app

In developing this app I drew extensively on the following example on the plotly pages: https://plot.ly/r/shiny-coupled-hover-events/#coupled-hover-events-in-plotly-using-shiny

The app could be of usage for amateur currency investors. A necessary extension would be to make it possible for the investor to choose among a larger selection of currencies to be included in the diagrams. The time series should be changed to daily datapoints (I only used yearly data from the OECD). Investors can then look up and follow on a day-to-day basis the correlation or co-movement in the currencies that they speculate in.