This guide is intended to help a user navigate this simple app, which was developed as coursework for the Johns Hopkins University Data Science Specialization through Coursera.
A user with an interest in monitoring foreign currency exchange rates for investment, planning, or policy purposes will need to be able to visualize historical rates and trends. This app begins by providing a basic time series plot of exchange rates in a selected pair. It then allows the user to choose to display two analytic overlays. It also provides a experimental way of gaining intuition about rounding bias, and where it comes into play in price settings.
The app draws daily close rates from Oanda. Currency exchange rates may experience significant intraday volatility that is not reflected here.
Begin by entering a buy and sell currency. For simplicity of demonstration this app only supports five currencies by arbitrary selection. Then set the desired date range.
Note: Oanda only provides the past 500 days through the API used for this app.
Once your currency pair is set, you may choose the option to display Fibonacci retracement guides or an inset Moving Average Convergence Divergence (MACD) plot.
Note: For the fibonacci retrancement guides in this app to make the most sense, it is necessary to adjust the date range so that the min and max price in the plot are from one advance (general upward trending period) or decline (general downward trend).
*Note: Because MCAD uses a 27-day average this option will produce an error if the date range is set to less than 27 days.
Another factor in security and currency trading, and in many other human activities, is the rounding bias. This app helps a user understand what the market treats as a significant digit in a given currency exchange pair and the extent to which rounding-bias is evident. It may be to a trader’s advantage to take long or short positions on a currency ahead of or behind this trend, where it exists.
The Shiny app allows a user to explore the human round-number bias by interactively creating a density plot for any supported currency, for any window of dates up to 500 days in length, for a selected significant digit.
Rounding bias has several mechanisms, including government intervention to support a currency, transactions by currency traders, and unlawful collusion. Nothing stops a trader from selling or buying at a given time, at whatever the market rate happens to be. Routine trades may also be placed based on algorithms, such as MCAD, which determine an optimal sell/buy price. These practices should be expected to introduce random noise into pricing (assuming everyone is not using the exact same algorithm and settings). However, some traders manually set price points at which they will sell or buy at a currency. These traders introduce a signal into the price data, since the human preference for round numbers is widely documented by behavioral scientists. The actual mechanism for a given currency is complex and may be influenced by the total size of the currency, price volatility, and the ratio of human and algorithmic traders in a given pair. Consequently, the amplitude of the bias signal will vary significantly over time and across currencies.
The demonstration below shows the density of numerals in the thousandths place of the Russian Federation Ruble (RUB)/United States Dollar(USD) for each of the past four years (each year running from October 1 through September 30). This suggests that there is a human bias in this pair, causing prices to close more often at a price close to a round hundredths point.