# Do Cryptocurrency Prices Camouflage Latent Economic Effects? A Bayesian Hidden Markov Approach +
## 2 Methodology
### The Non-Homogeneous Polya-Gamma Hidden Markov Model  
Given a time horizon \(T\geq 0\) and discrete observation times \(t=1,2,\ldots,T\), we consider an observed random process \(\{Y_{t}\}_{t\leq T}\) and a hidden underlying process \(\{Z_{t}\}_{t\leq T}\). The hidden process \(\{Z_{t}\}\) is assumed to be a two-state non-homogeneous discrete-time Markov chain, \(s=1,2\), that determines the states of the observed process. In our setting, the observed process is either the BTC or the ETH logarithmic prices series. The description of the hidden states is not pre-determined and is subject to the interpretation of the results. Let \(y_{t}\) and \(z_{t}\) be the realizations of the random processes \(\{Y_{t}\}\) and \(\{Z_{t}\}\), respectively. We assume that at time \(t,\;t=1,\ldots,T,y_{t}\) depends on the current state \(z_{t}\) and not on the previous states. Consider also the set of predictors \(\{X_{t}\}\) of Section 2.1. A subset of the predictors \(X_{t}^{(1)}\subseteq\{X_{t}\}\) of length \(r_{1}-1\) affects the cryptocurrency linearly. In addition, a subset \(X_{t}^{(2)}\subseteq\{X_{t}\}\) of length \(r_{2}-1\) is used to describe the dynamics of the time-varying transition probabilities, i.e., the probabilities of moving from hidden state \(s=1\) to the hidden state \(s=2\) and vice versa. Thus, we allow the predictors to affect the series \(\{Y_{t}\}\) linearly and non-linearly. Given the above, the cryptocurrency price series \(\{Y_{t}\}\) can be modeled as  
\[Y_{t}\mid Z_{t}=s\sim\mathcal{N}(x_{t-1}^{(1)}B_{s},\sigma_{s}^{2}),\;s=1,2, \tag{8}\]  
where \(B_{s}=(b_{0s},b_{1s},\ldots,b_{r_{1}-1s})^{\prime}\) are the regression coefficients and \(\mathcal{N}(\mu,\sigma^{2})\) denotes the normal distribution with mean \(\mu\) and variance \(\sigma^{2}\). The dependence of the observed process on the unobserved states, allows the model to capture the non-stationarities, non-linearities and the changes in the volatility, i.e., heteroskedasticity of the cryptocurrency series. The dynamics of the unobserved process \(\{Z_{t}\}\) can be described by the time-varying (non-homogeneous) transition probabilities, which depend on the predictors \(X_{t}^{(2)}\) and are given by the following relationship  
\[P(Z_{t+1}=j\mid Z_{t}=i)=p_{ij}^{(t)}=\frac{\exp(x_{t}^{(2)}\beta_{ij})}{\sum_ {j=1}^{2}\exp(x_{t}^{(2)}\beta_{ij})},\;i,j=1,2, \tag{9}\]where \(\beta_{ij}=(\beta_{0,ij},\beta_{1,ij},\ldots,\beta_{r_{2}-1,ij})^{\prime}\) is the vector of the logistic regression coefficients to be estimated. Please note that for identifiability reasons, we adopt the convention of setting, for each row of the transition matrix, one of the \(\beta_{ij}\) to be a vector of zeros. Without loss of generality, we set \(\beta_{ij}=\beta_{ji}=\mathbf{0}\) for \(i,j=1,2,i\
eq j\). Hence, for \(\beta_{i}:=\beta_{ii},\ i=1,2\), the probabilities can be written in a simpler form  
\[p_{ii}^{(t)}=\frac{\exp(x_{t}^{(2)}\beta_{i})}{1+\exp(x_{t}^{(2)}\beta_{i})} \text{ and }p_{ij}^{(t)}=1-p_{ii}^{(t)},\ i,j=1,2,\ i\
eq j. \tag{10}\]  
Summing up, the unknown quantities of the NHPG are \(\left\{\theta_{s}=\left(B_{s},\sigma_{s}^{2}\right),\beta_{s},s=1,2\right\}\), i.e., the parameters in the mean predictive regression equation and the parameters in the logistic regression equation for the transition probabilities of the unobserved process \(\left\{Z_{t}\right\}\), \(t=1,...,T\). We follow the Bayesian methodology of [24], for joint inference on model specification, model parameters and predictions. Specifically, the authors in [24] use conditional conjugate analysis for the parameters in the mean predictive regression equation, i.e. \[\sigma_{s}^{2}\sim\mathcal{IG}(p,q),\,B_{s}\mid,\sigma_{s}^{2}\sim\mathcal{N} (L_{0},\sigma_{s}^{2}V_{0}),\ s=1,2, \tag{11}\]  
where \(\mathcal{IG}\) denotes the Inverted-Gamma distribution.