Cryptocurrency has been a trending topic lately, especially amongst millenials following a significant increase in volume as well as prices. Bitcoin, the first decentralized and most widely used cryptocurrency has been in circulation since 2009. The currency is created through mining, and the prices are set solely based on demand. As expected there has been some speculation, and research into how exactly bitcoin prices trend, how consumers are making the decision to use bitcoin, and if there is a relationship between demand for the crptocurrency and other economic indicators.

In particular, there has been research to try to deduce if investors are using bitcoin as a hedge or short in times of financial distress. This area of research seeks to find out, if investors demand more bitcoin just like other more stable financial instruments like bonds, in times of high volatility. This begs the question of if bitcoin is a stable financial instrument. In this brief, I seek to study the trend of bitcoin prices, conduct times series spectral analysis to find any possible trends and cycles as well as deduce the relationship between bitcoin prices and times of financial stress.

Data

The data for this analysis includes weekly open prices for bitcoin, from July 2010 to February 2018. I will be using open prices to reflect the price for bitcoin.
To proxy times of financial stress, I’ve used the St. Louis FED financial stress index reported weekly and for the same time frame. For the stress indicator, I’ve added a constant (5) to remove negative values and make the data easier to work with.

Limitations

Because bitcoin, and cryptocurrency in general is fairly new, there isn’t a lot of data to base this analysis on.

Bitcoin prices in the last decade

## Parsed with column specification:
## cols(
##   DATE = col_date(format = ""),
##   STLFSI = col_double()
## )

Looking at the plot of bitcoin prices, we can see that there has been a steady increase with a substantial jump at around 2017. I will take a log of the open price variable to show any possible trends and reduce some of the variance from volatility.

The log of the open price shows us any possible trends much better. We see a little noise where there are some volatile peaks, but it looks like there is an overall trend of an increase in bitcoin prices which tracks with what we know about cryptocurrency and it’s current popularity.

Spectrum Analysis

To see if there are any cycles bitcoin prices have, I will look at the spectrum and wavelength of the data. Although I am working with such limited data, I do not believe any cycles identified are applicable in the long run.

From the unsmoothed and smoothed spectrums, there doesn’t seem to be any obvious cycles in the raw data. it looks like the highest frequency is around 1. To analyse this further, I will detrend both the bitcoin and FSI data, and remove seasonality by separating out the high frequencies from the low using Loess smoothing.

The trend is a lot more identifiable in the low frequency of the data. The cycles are a lot more apparent as well. Let’s analyze the cycles of bicoin prices, and FSI to see if there are any commonalities, or similarities in cycle and overall trend.

Looking at bitcoin prices plotted against FSI, we can see that they trend similarly with a slight lag after times of financial stress.

Let’s also look at the wavelength to identify possible cycles. Here I’ve included a plot of the ‘morlet’ wavelet which is the wavelet that estimates the periodogram.

From this, we can see that the strongest component is about 10 years at all time points.
We can also calculate the “averaged” wavelet. If we calculate the average across all times, we should get another estimate of the spectral density function.

This plot shows a weak peak frequency at about 4.2 years and again a steady increase in frequency from 8 years. This is to be expected as the data is only for about 8 years. The slight peak at 4.2 years is more intersting.

Parametric methods to estimate the relationship between FSI and bitcoin prices

From looking at the spectrums, and the cycles, we now have an idea of how bitcoin prices have been trending historically, as well as possible correlations to times of financial stress. Now, let us try to estimate the relationship parametrically and see if we can find any conclusive results. First, I will start with a linear regression just to see if in fact FSI is a significant contribitor to open prices.

## 
## Call:
## lm(formula = log(btc$Open) ~ fsi$STLFSI)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -5.0106 -1.6609  0.3164  1.5188  5.4179 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  27.8174     1.2281   22.65   <2e-16 ***
## fsi$STLFSI   -5.9209     0.3105  -19.07   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 2.122 on 397 degrees of freedom
## Multiple R-squared:  0.478,  Adjusted R-squared:  0.4767 
## F-statistic: 363.6 on 1 and 397 DF,  p-value: < 2.2e-16

Looking at the negative coefficient, we can speculate the bitcoin prices, and demand by proxy do see to go do in times of financial stress. This suggests thats investors are not demaniding bitcoin in the same way as more stable instruments like bonds, but might be investing in bitcoin as a hedge against any coming period of financial stress.

We can also model this relationship using an ARIMA model. Here I will observe AIC values for the optimal model, and see if the relationship holds.

##                   MA0       MA1       MA2       MA3       MA4       MA5
## <b> AR0</b> 1734.7548 1285.2859  963.2276  710.2487  539.1782  387.6956
## <b> AR1</b> -273.5431 -277.7010 -278.6026 -282.2924 -281.1007 -279.9636
## <b> AR2</b> -278.9038 -283.6768 -273.7515 -282.5685 -277.9730 -278.8079
## <b> AR3</b> -280.8303 -291.6101 -282.1711 -280.9772 -278.9136 -283.2359
## <b> AR4</b> -284.4417 -283.1151 -281.1472 -278.9603 -277.5633 -274.8508

The AIC values suggests an ARMA(3,1) model

## 
## Call:
## arima(x = log(btc$Open), order = c(3, 0, 1), xreg = log(fsi$STLFSI))
## 
## Coefficients:
##          ar1      ar2      ar3      ma1  intercept     xreg
##       1.7642  -0.7332  -0.0310  -0.6624     7.9765  -0.3725
## s.e.  0.1850   0.2458   0.0701   0.1781    66.3428   0.5418
## 
## sigma^2 estimated as 0.0273:  log likelihood = 151.66,  aic = -291.33

Now lets observe the roots to chech for invertibility and stationarity in the model.

## [1]   1.000008+0i   1.245566-0i -25.888367-0i

The roots are outside the unit circle which means we have a stationary model. Although the root 1.0000008 is really close to 1 which means the model is at the threshold of invertibility. This model also suggests a negatively correlated relationship between FSI and open prices.

Let’s assess the normality of the model.

The autocorrelation shows slight oscillations with a peak at 1, although the residuals seem to have fairly long tails.

Conclusion

The relationship between cryptocurrency and times of financial stress has broad implications for how investors behave. This new currency is steadily gaining trust and confidence, and seems to be in more demand when there are times of financial stress.

Sources

  1. Yahoo Finance Bitcoin Weekly and Monthly Data

  2. St. Louis FED Financial Stress Index

  3. Spectral Analysis of Time Series

  4. Exploring the determinants of Bitcoin’s price: an application of Bayesian Structural Time Series

  5. Past midterm projects