Optimal Stock Portfolio Selection with a Multivariate Hidden Markov Model
Reetam Majumder111University of Maryland, Baltimore County, Qing Ji222Procter & Gamble and Nagaraj K. Neerchal1

Abstract

The underlying market trends that drive stock price fluctuations are often referred to in terms of bull and bear markets. Optimal stock portfolio selection methods need to take into account these market trends; however, the bull and bear market states tend to be unobserved and can only be assigned retrospectively. We fit a linked hidden Markov model (LHMM) to relative stock price changes for S&P 500 stocks from 2011โ€“2016 based on weekly closing values. The LHMM consists of a multivariate state process whose individual components correspond to HMMs for each of the 12 sectors of the S&P 500 stocks. The state processes are linked using a Gaussian copula so that the states of the component chains are correlated at any given time point. The LHMM allows us to capture more heterogeneity in the underlying market dynamics for each sector. In this study, stock performances are evaluated in terms of capital gains using the LHMM by utilizing historical stock price data. Based on the fitted LHMM, optimal stock portfolios are constructed to maximize capital gain while balancing reward and risk. Under out-of-sample testing, the annual capital gain for the portfolios for 2016โ€“2017 are calculated. Portfolios constructed using the LHMM are able to generate returns comparable to the S&P 500 index.

Key words: Linked hidden Markov model, Multivariate Markov chain, Stochastic simulations, Portfolio allocation, Gaussian copula

1 Introduction

A stock portfolio refers to a collection of stocks selected and owned by an investor, and stock portfolio selection has been at the center of investment methodology research for many years. Depending on the investment goals, various methods have been developed by researchers for selecting stocks and allocating assets. The modern portfolio selection methodology developed by Markowitz (1952) has guided a large section of portfolio research. There are two essential components to the portfolio selection procedure, namely the evaluation of stocks, and portfolio assets allocation. A good introductory reference for topic of portfolio selection is Malkiel (2019). In this paper, we follow the groundwork laid out by Ji and Neerchal (2019) of connecting portfolio selection to the estimation of the underlying statistical model. We first build statistical models using past data on stock prices. Then, optimal stock portfolios are constructed based on the technique in Markowitz (1952) to maximize the capital gain while balancing reward and risk. The performance of the optimal portfolios are evaluated by comparing annual gains based on the portfolios against the S&P 500 gains for the same time period.

Stock markets around the world use the terms bull and bear to describe market trends. Stock prices are relatively stable and generally increasing in a bull market. A bear market, on the other hand, indicates strong market volatility with decreasing stock prices. A bull to bear market switch or vice versa is recognized after an increase/decrease of 20% or more in multiple stock indices (Kole and Dijk, 2016). While bull and bear markets cannot be directly observed, the behaviour of individual stocks point to the state of the market. The current state of a stock can be estimated by analysts, but the true state is unknown unless evaluating stocks retrospectively. Therefore, the state of a stock can be treated as an unobserved (latent) random variable, and the prices of the stock are the observed values. In addition, the market conditions can switch states at any time point. Given these characteristics, a hidden Markov model (HMM) is well suited for modeling the bull/bear trend of the market.

Refer to caption
Figure 1: A directed acyclic graph (DAG) specifying the conditional independence structure for a hidden Markov model.

An HMM is a discrete-time stochastic process that is controlled through a Markov chain with latent (hidden) states. A Markov chain (MC) is a well-known stochastic model that describes a sequence of discrete events. Let a sequence of random variables (Z1,Z2,โ€ฆ,Zn)subscript๐‘1subscript๐‘2โ€ฆsubscript๐‘๐‘›(Z_{1},Z_{2},\ldots,Z_{n})( italic_Z start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , italic_Z start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT , โ€ฆ , italic_Z start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT ) form a Markov chain. The characterizing property of a first order Markov chains states that

P(Zt=ztโˆฃZtโˆ’1=ztโˆ’1,โ€ฆ,Z1=z1)=P(Zt=ztโˆฃZtโˆ’1=ztโˆ’1).P(Z_{t}=z_{t}\mid Z_{t-1}=z_{t-1},\ldots,Z_{1}=z_{1})=P(Z_{t}=z_{t}\mid Z_{t-1% }=z_{t-1}).italic_P ( italic_Z start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT = italic_z start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT โˆฃ italic_Z start_POSTSUBSCRIPT italic_t - 1 end_POSTSUBSCRIPT = italic_z start_POSTSUBSCRIPT italic_t - 1 end_POSTSUBSCRIPT , โ€ฆ , italic_Z start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT = italic_z start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ) = italic_P ( italic_Z start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT = italic_z start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT โˆฃ italic_Z start_POSTSUBSCRIPT italic_t - 1 end_POSTSUBSCRIPT = italic_z start_POSTSUBSCRIPT italic_t - 1 end_POSTSUBSCRIPT ) . (1)

Assuming the Markov chain is stationary and has J๐ฝJitalic_J states, the transition probabilities Pโข(Zt=ztโˆฃZtโˆ’1=ztโˆ’1)๐‘ƒsubscript๐‘๐‘กconditionalsubscript๐‘ง๐‘กsubscript๐‘๐‘ก1subscript๐‘ง๐‘ก1P(Z_{t}=z_{t}\mid Z_{t-1}=z_{t-1})italic_P ( italic_Z start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT = italic_z start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT โˆฃ italic_Z start_POSTSUBSCRIPT italic_t - 1 end_POSTSUBSCRIPT = italic_z start_POSTSUBSCRIPT italic_t - 1 end_POSTSUBSCRIPT ) can be arranged into a J๐ฝJitalic_J by J๐ฝJitalic_J matrix known as the transition probability matrix,

๐šท=[ฯ€11ฯ€12โ‹ฏฯ€1โขJฯ€21ฯ€22โ‹ฏฯ€2โขJโ‹ฎโ‹ฎโ‹ฑโ‹ฎฯ€Jโข1ฯ€Jโข2โ‹ฏฯ€JโขJ],๐šทdelimited-[]subscript๐œ‹11subscript๐œ‹12โ‹ฏsubscript๐œ‹1๐ฝsubscript๐œ‹21subscript๐œ‹22โ‹ฏsubscript๐œ‹2๐ฝโ‹ฎโ‹ฎโ‹ฑโ‹ฎsubscript๐œ‹๐ฝ1subscript๐œ‹๐ฝ2โ‹ฏsubscript๐œ‹๐ฝ๐ฝ{\bf{\Pi}}=\left[{\begin{array}[]{cccc}\pi_{11}&\pi_{12}&\cdots&\pi_{1J}\\ \pi_{21}&\pi_{22}&\cdots&\pi_{2J}\\ \vdots&\vdots&\ddots&\vdots\\ \pi_{J1}&\pi_{J2}&\cdots&\pi_{JJ}\\ \end{array}}\right],bold_ฮ  = [ start_ARRAY start_ROW start_CELL italic_ฯ€ start_POSTSUBSCRIPT 11 end_POSTSUBSCRIPT end_CELL start_CELL italic_ฯ€ start_POSTSUBSCRIPT 12 end_POSTSUBSCRIPT end_CELL start_CELL โ‹ฏ end_CELL start_CELL italic_ฯ€ start_POSTSUBSCRIPT 1 italic_J end_POSTSUBSCRIPT end_CELL end_ROW start_ROW start_CELL italic_ฯ€ start_POSTSUBSCRIPT 21 end_POSTSUBSCRIPT end_CELL start_CELL italic_ฯ€ start_POSTSUBSCRIPT 22 end_POSTSUBSCRIPT end_CELL start_CELL โ‹ฏ end_CELL start_CELL italic_ฯ€ start_POSTSUBSCRIPT 2 italic_J end_POSTSUBSCRIPT end_CELL end_ROW start_ROW start_CELL โ‹ฎ end_CELL start_CELL โ‹ฎ end_CELL start_CELL โ‹ฑ end_CELL start_CELL โ‹ฎ end_CELL end_ROW start_ROW start_CELL italic_ฯ€ start_POSTSUBSCRIPT italic_J 1 end_POSTSUBSCRIPT end_CELL start_CELL italic_ฯ€ start_POSTSUBSCRIPT italic_J 2 end_POSTSUBSCRIPT end_CELL start_CELL โ‹ฏ end_CELL start_CELL italic_ฯ€ start_POSTSUBSCRIPT italic_J italic_J end_POSTSUBSCRIPT end_CELL end_ROW end_ARRAY ] ,

where ฯ€hโขj=Pโข(Zt=jโˆฃZtโˆ’1=h)subscript๐œ‹โ„Ž๐‘—๐‘ƒsubscript๐‘๐‘กconditional๐‘—subscript๐‘๐‘ก1โ„Ž\pi_{hj}=P(Z_{t}=j\mid Z_{t-1}=h)italic_ฯ€ start_POSTSUBSCRIPT italic_h italic_j end_POSTSUBSCRIPT = italic_P ( italic_Z start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT = italic_j โˆฃ italic_Z start_POSTSUBSCRIPT italic_t - 1 end_POSTSUBSCRIPT = italic_h ) is the probability of transitioning from state hโ„Žhitalic_h to state j๐‘—jitalic_j at any t๐‘กtitalic_t, and โˆ‘j=1Jฯ€hโขj=1subscriptsuperscript๐ฝ๐‘—1subscript๐œ‹โ„Ž๐‘—1\sum\limits^{J}_{j=1}\pi_{hj}=1โˆ‘ start_POSTSUPERSCRIPT italic_J end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_j = 1 end_POSTSUBSCRIPT italic_ฯ€ start_POSTSUBSCRIPT italic_h italic_j end_POSTSUBSCRIPT = 1 given any hโ„Žhitalic_h. In an HMM, observations are assumed to be drawn from one of several sub-distributions determined by the unobserved variable Ztsubscript๐‘๐‘กZ_{t}italic_Z start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT. Formally, an HMM consists of a pair of random processes {Zt,Yt}tโ‰ฅ1subscriptsubscript๐‘๐‘กsubscript๐‘Œ๐‘ก๐‘ก1\{Z_{t},Y_{t}\}_{t\geq 1}{ italic_Z start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT , italic_Y start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT } start_POSTSUBSCRIPT italic_t โ‰ฅ 1 end_POSTSUBSCRIPT, where {Zt}subscript๐‘๐‘ก\{Z_{t}\}{ italic_Z start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT } is a Markov chain with J๐ฝJitalic_J states. Conditional on {Zt}subscript๐‘๐‘ก\{Z_{t}\}{ italic_Z start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT }, {Yt}subscript๐‘Œ๐‘ก\{Y_{t}\}{ italic_Y start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT } is a sequence of independent random variables such that the distribution of Ytsubscript๐‘Œ๐‘กY_{t}italic_Y start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT depends only on Ztsubscript๐‘๐‘กZ_{t}italic_Z start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT. The conditional distribution of Ytsubscript๐‘Œ๐‘กY_{t}italic_Y start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT given Ztsubscript๐‘๐‘กZ_{t}italic_Z start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT is given by

YtโˆฃZt=jโˆผfjโข(yโˆฃ๐œฝj),ย โขj=1,โ€ฆ,J,formulae-sequenceconditionalsubscript๐‘Œ๐‘กsubscript๐‘๐‘ก๐‘—superscriptsimilar-toabsentsubscript๐‘“๐‘—conditional๐‘ฆsubscript๐œฝ๐‘—ย ๐‘—1โ€ฆ๐ฝY_{t}\mid Z_{t}=j\stackrel{{\scriptstyle}}{{\sim}}f_{j}(y\mid\boldsymbol{% \theta}_{j}),\mbox{\hskip 5.0pt}j=1,\ldots,J,italic_Y start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT โˆฃ italic_Z start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT = italic_j start_RELOP SUPERSCRIPTOP start_ARG โˆผ end_ARG start_ARG end_ARG end_RELOP italic_f start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT ( italic_y โˆฃ bold_italic_ฮธ start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT ) , italic_j = 1 , โ€ฆ , italic_J , (2)

where f1,โ€ฆ,fJsubscript๐‘“1โ€ฆsubscript๐‘“๐ฝf_{1},\ldots,f_{J}italic_f start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , โ€ฆ , italic_f start_POSTSUBSCRIPT italic_J end_POSTSUBSCRIPT are the different sub-distributions. {Zt}subscript๐‘๐‘ก\{Z_{t}\}{ italic_Z start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT } is known as the state process of the HMM, and {Yt}subscript๐‘Œ๐‘ก\{Y_{t}\}{ italic_Y start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT } is known as the emission process. Note that at any time point t๐‘กtitalic_t, Ytsubscript๐‘Œ๐‘กY_{t}italic_Y start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT could be distributed as a univariate or as a multivariate distribution. Figure 1 depicts the graphical representation of an HMM. The variables in this representation are denoted as the nodes of the graph, and the arrows connecting them are denoted as the edges and represent the dependence among the nodes.

Some previous work on predicting stock prices based on HMMs include Hassan and Nath (2005), and Nguyen (2018). Their models were trained directly using the stock closing values and were used to predict stock prices in the near future; there is however no extension to portfolio selection in their work. Hamilton (1989) combined the HMM structure with autoregressive models in order to capture the market trend, where parameters of an autoregressive model were considered to arise from an HMM. Elliott and vanย der Hoek (1997) and Elliott etย al. (2010) further extended the work of Hamilton (1989) to include a portfolio selection procedure.

Refer to caption
Figure 2: Graphical representation of 3 time slices of a linked hidden Markov model (LHMM) with 2 state processes specified as a multivariate Markov chain (MMC), where each Markov chain affects only a partition of the emission process.

Although we may largely expect the bull and bear states of the market to be consistently reflected in weekly stock price changes, it is likely that stocks in different sectors will have different underlying dynamics of the state process. This paper considers a model where each sector is driven by a different state process with its own bull and bear states. This results in a multivariate state process, whose individual components are Markov chains. The dependence between the individual Markov chains of the multivariate Markov chain (MMC) can propagate in different ways, and Majumder (2021) discusses some of the common ways an MMC has been specified in previous studies. Additonal work in the area of HMMs and correlations among the prices of different assests or markets include Ensor and Koev (2014), who investigated the correlations between different stock sectors while applying a regime-switch model to the correlation matrix, and Fiecas etย al. (2017), who address the estimation of a multivariate HMM using shrinkage estimators. More recently, Xu and Cao (2021) have incorporated a vine-coupla into an artificial neural network so that the inter-market correlations were considered while estimating the return of a portfolio. We thank one of the anonymous referees for bringing these references to our attention.

In this paper, we assume that the state processes of the MMC evolve in lockstep, i.e., the nodes of two Markov chains are connected by an edge if and only if the nodes are at the same time point. The resulting multivariate HMM is known as a linked HMM (LHMM). Figure 2 represents our approach through an example where Ztโ€ฒ=(Z1,t,Z2,t)superscriptsubscriptZ๐‘กโ€ฒsubscript๐‘1๐‘กsubscript๐‘2๐‘ก\textbf{Z}_{t}^{\prime}=(Z_{1,t},Z_{2,t})Z start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT start_POSTSUPERSCRIPT โ€ฒ end_POSTSUPERSCRIPT = ( italic_Z start_POSTSUBSCRIPT 1 , italic_t end_POSTSUBSCRIPT , italic_Z start_POSTSUBSCRIPT 2 , italic_t end_POSTSUBSCRIPT ) is a bivariate state process corresponding to bull/bear states for 2 sectors of the stock market, and Ytโ€ฒ=(Y1,t,Y2,t)superscriptsubscriptY๐‘กโ€ฒsubscriptY1๐‘กsubscriptY2๐‘ก\textbf{Y}_{t}^{\prime}=(\textbf{Y}_{1,t},\textbf{Y}_{2,t})Y start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT start_POSTSUPERSCRIPT โ€ฒ end_POSTSUPERSCRIPT = ( Y start_POSTSUBSCRIPT 1 , italic_t end_POSTSUBSCRIPT , Y start_POSTSUBSCRIPT 2 , italic_t end_POSTSUBSCRIPT ) are the stock returns for all stocks within the two sectors. This is a modification of the default LHMM specification; the state processes of the different sectors can be considered to evolve in lockstep, and each state process affects the stock price changes for that sectorโ€™s stocks. Partitioning the stocks by sector allows for more heterogeneity in the market dynamics while still using two-state latent processes with an intuitive bull/bear labeling. We can extend this idea to an LHMM with D๐ทDitalic_D clusters corresponding to D๐ทDitalic_D sectors. We specify the dependency structure for the D๐ทDitalic_D-variate LHMM using a Gaussian copula, which allows us to generate correlated states from the MMC at every time point (Majumder, 2021). To demonstrate our LHMM, we propose a stock portfolio selection method based on the work of Ji and Neerchal (2019).

The rest of this paper is structured as follows. In Sectionย 2, we describe an LHMM with its dependency structure specified using a Gaussian copula which can be used to model weekly stock price changes. Sectionย 3 introduces the methods to evaluate stocks and portfolios and explains the portfolio selection methodology. In Sectionย 4, we validate the portfolio selection method using historical S&P 500 stock data. Finally, Sectionย 5 discusses our results and proposes ways that our approach can be improved.

2 Parameter Estimation for a Linked Hidden Markov Model

2.1 Parameterizing an LHMM using a Gaussian copula

Suppose a stock portfolio consists of K๐พKitalic_K stocks. For the k๐‘˜kitalic_kth stock, k=1,2,โ€ฆ,K๐‘˜12โ€ฆ๐พk=1,2,\ldots,Kitalic_k = 1 , 2 , โ€ฆ , italic_K, let Xk,tsubscript๐‘‹๐‘˜๐‘กX_{k,t}italic_X start_POSTSUBSCRIPT italic_k , italic_t end_POSTSUBSCRIPT be the closing price at the end of the t๐‘กtitalic_tth week, t=1,2,โ€ฆ,n๐‘ก12โ€ฆ๐‘›t=1,2,\ldots,nitalic_t = 1 , 2 , โ€ฆ , italic_n. The price changes in percentage are given by

Yk,t=Xk,tโˆ’Xk,tโˆ’1Xk,tโˆ’1.subscript๐‘Œ๐‘˜๐‘กsubscript๐‘‹๐‘˜๐‘กsubscript๐‘‹๐‘˜๐‘ก1subscript๐‘‹๐‘˜๐‘ก1Y_{k,t}=\frac{X_{k,t}-X_{k,t-1}}{X_{k,t-1}}.italic_Y start_POSTSUBSCRIPT italic_k , italic_t end_POSTSUBSCRIPT = divide start_ARG italic_X start_POSTSUBSCRIPT italic_k , italic_t end_POSTSUBSCRIPT - italic_X start_POSTSUBSCRIPT italic_k , italic_t - 1 end_POSTSUBSCRIPT end_ARG start_ARG italic_X start_POSTSUBSCRIPT italic_k , italic_t - 1 end_POSTSUBSCRIPT end_ARG .

Let Yt=(Y1,t,โ€ฆ,YK,t)subscriptY๐‘กsubscript๐‘Œ1๐‘กโ€ฆsubscript๐‘Œ๐พ๐‘ก\textbf{Y}_{t}=(Y_{1,t},\ldots,Y_{K,t})Y start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT = ( italic_Y start_POSTSUBSCRIPT 1 , italic_t end_POSTSUBSCRIPT , โ€ฆ , italic_Y start_POSTSUBSCRIPT italic_K , italic_t end_POSTSUBSCRIPT ) be the vector of stock price changes at the end of the t๐‘กtitalic_tth week, and Ztsubscript๐‘๐‘กZ_{t}italic_Z start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT be the binary latent state at that time point. The HMM for the stock price changes is given by

YtโˆฃZt=jโˆผโˆk=1KNโข(ฮผk,j,ฯƒk,j2),ย โขj=1,2,formulae-sequenceconditionalsubscriptY๐‘กsubscript๐‘๐‘ก๐‘—superscriptsimilar-toabsentsuperscriptsubscriptproduct๐‘˜1๐พ๐‘subscript๐œ‡๐‘˜๐‘—subscriptsuperscript๐œŽ2๐‘˜๐‘—ย ๐‘—12\textbf{Y}_{t}\mid Z_{t}=j\stackrel{{\scriptstyle}}{{\sim}}\prod_{k=1}^{K}N(% \mu_{k,j},\sigma^{2}_{k,j}),\mbox{\hskip 5.0pt}j=1,2,Y start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT โˆฃ italic_Z start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT = italic_j start_RELOP SUPERSCRIPTOP start_ARG โˆผ end_ARG start_ARG end_ARG end_RELOP โˆ start_POSTSUBSCRIPT italic_k = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_K end_POSTSUPERSCRIPT italic_N ( italic_ฮผ start_POSTSUBSCRIPT italic_k , italic_j end_POSTSUBSCRIPT , italic_ฯƒ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_k , italic_j end_POSTSUBSCRIPT ) , italic_j = 1 , 2 , (3)

where (Z1,โ€ฆ,Zn)subscript๐‘1โ€ฆsubscript๐‘๐‘›(Z_{1},\ldots,Z_{n})( italic_Z start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , โ€ฆ , italic_Z start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT ) is a Markov chain with initial distribution ๐œถ๐œถ\boldsymbol{\alpha}bold_italic_ฮฑ and a 2ร—2222\times 22 ร— 2 transition matrix ๐šท๐šท{\bf{\Pi}}bold_ฮ . The latent states represent the bull or bear state of the market, which is observed in the emission process as the buy or sell trend for each of the stocks. The emission distribution assumes a conditional independence structure at each time point, i.e., the price changes of any stock is independent of the remaining stocks conditional on the state. Following notation established in (2), we use ๐œฝ๐œฝ\boldsymbol{\theta}bold_italic_ฮธ to denote all the parameters of the emission distribution. Parameter estimation for an HMM of this form is carried out using the Baum-Welch (B-W) algorithm (Baum and Petrie, 1966), which is a special case of the expectation-maximization (EM) algorithm (Dempster etย al., 1977). A comprehensive tutorial of parameter estimation in HMMs is provided by Rabiner (1989).

Now, let us consider the case where the K๐พKitalic_K stocks belong to D๐ทDitalic_D different sectors. If we assign each sector its own underlying state process, we can denote the state of LHMM at the end of the t๐‘กtitalic_tth week as Zt=(Z1,t,โ€ฆ,ZD,t)subscriptZ๐‘กsubscript๐‘1๐‘กโ€ฆsubscript๐‘๐ท๐‘ก\textbf{Z}_{t}=(Z_{1,t},\ldots,Z_{D,t})Z start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT = ( italic_Z start_POSTSUBSCRIPT 1 , italic_t end_POSTSUBSCRIPT , โ€ฆ , italic_Z start_POSTSUBSCRIPT italic_D , italic_t end_POSTSUBSCRIPT ). If the d๐‘‘ditalic_dth sector consists of ndsubscript๐‘›๐‘‘n_{d}italic_n start_POSTSUBSCRIPT italic_d end_POSTSUBSCRIPT stocks, the HMM for price changes in the d๐‘‘ditalic_dth sector is given by,

๐˜d,t|Zd,t=jโˆผโˆkd=1ndNโข(ฮผkd,j,ฯƒkd,j2),ย โขj=1,2,formulae-sequenceconditionalsubscript๐˜๐‘‘๐‘กsubscript๐‘๐‘‘๐‘ก๐‘—similar-tosuperscriptsubscriptproductsubscript๐‘˜๐‘‘1subscript๐‘›๐‘‘๐‘subscript๐œ‡subscript๐‘˜๐‘‘๐‘—subscriptsuperscript๐œŽ2subscript๐‘˜๐‘‘๐‘—ย ๐‘—12\displaystyle\mathbf{Y}_{d,t}|Z_{d,t}=j\sim\prod_{k_{d}=1}^{n_{d}}N(\mu_{k_{d}% ,j},\sigma^{2}_{k_{d},j}),\mbox{\hskip 5.0pt}j=1,2,bold_Y start_POSTSUBSCRIPT italic_d , italic_t end_POSTSUBSCRIPT | italic_Z start_POSTSUBSCRIPT italic_d , italic_t end_POSTSUBSCRIPT = italic_j โˆผ โˆ start_POSTSUBSCRIPT italic_k start_POSTSUBSCRIPT italic_d end_POSTSUBSCRIPT = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_n start_POSTSUBSCRIPT italic_d end_POSTSUBSCRIPT end_POSTSUPERSCRIPT italic_N ( italic_ฮผ start_POSTSUBSCRIPT italic_k start_POSTSUBSCRIPT italic_d end_POSTSUBSCRIPT , italic_j end_POSTSUBSCRIPT , italic_ฯƒ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_k start_POSTSUBSCRIPT italic_d end_POSTSUBSCRIPT , italic_j end_POSTSUBSCRIPT ) , italic_j = 1 , 2 , (4)

with โˆ‘d=1Dnd=Ksuperscriptsubscript๐‘‘1๐ทsubscript๐‘›๐‘‘๐พ\sum_{d=1}^{D}n_{d}=Kโˆ‘ start_POSTSUBSCRIPT italic_d = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_D end_POSTSUPERSCRIPT italic_n start_POSTSUBSCRIPT italic_d end_POSTSUBSCRIPT = italic_K. As before, Zdโ€ฒ=(Zd,1,โ€ฆ,Zd,n)superscriptsubscript๐‘๐‘‘โ€ฒsubscript๐‘๐‘‘1โ€ฆsubscript๐‘๐‘‘๐‘›Z_{d}^{\prime}=(Z_{d,1},\ldots,Z_{d,n})italic_Z start_POSTSUBSCRIPT italic_d end_POSTSUBSCRIPT start_POSTSUPERSCRIPT โ€ฒ end_POSTSUPERSCRIPT = ( italic_Z start_POSTSUBSCRIPT italic_d , 1 end_POSTSUBSCRIPT , โ€ฆ , italic_Z start_POSTSUBSCRIPT italic_d , italic_n end_POSTSUBSCRIPT ) is the latent state process. The HMM for sector d๐‘‘ditalic_d is parameterized by the initial distribution ๐œถdsubscript๐œถ๐‘‘\boldsymbol{\alpha}_{d}bold_italic_ฮฑ start_POSTSUBSCRIPT italic_d end_POSTSUBSCRIPT, transition matrix ๐šทdsubscript๐šท๐‘‘\mathbf{\Pi}_{d}bold_ฮ  start_POSTSUBSCRIPT italic_d end_POSTSUBSCRIPT, and emission distribution parameters ๐œฝdsubscript๐œฝ๐‘‘\boldsymbol{\theta}_{d}bold_italic_ฮธ start_POSTSUBSCRIPT italic_d end_POSTSUBSCRIPT. Furthermore, {Z1,โ€ฆ,ZD}subscript๐‘1โ€ฆsubscript๐‘๐ท\{Z_{1},\ldots,Z_{D}\}{ italic_Z start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , โ€ฆ , italic_Z start_POSTSUBSCRIPT italic_D end_POSTSUBSCRIPT } is a D๐ทDitalic_D-component MMC, and Yd,tsubscript๐‘Œ๐‘‘๐‘กY_{d,t}italic_Y start_POSTSUBSCRIPT italic_d , italic_t end_POSTSUBSCRIPT given Zd,tsubscript๐‘๐‘‘๐‘กZ_{d,t}italic_Z start_POSTSUBSCRIPT italic_d , italic_t end_POSTSUBSCRIPT is independent to Ydโ€ฒ,tโ€ฒsubscript๐‘Œsuperscript๐‘‘โ€ฒsuperscript๐‘กโ€ฒY_{d^{\prime},t^{\prime}}italic_Y start_POSTSUBSCRIPT italic_d start_POSTSUPERSCRIPT โ€ฒ end_POSTSUPERSCRIPT , italic_t start_POSTSUPERSCRIPT โ€ฒ end_POSTSUPERSCRIPT end_POSTSUBSCRIPT and Zdโ€ฒ,tโ€ฒsubscript๐‘superscript๐‘‘โ€ฒsuperscript๐‘กโ€ฒZ_{d^{\prime},t^{\prime}}italic_Z start_POSTSUBSCRIPT italic_d start_POSTSUPERSCRIPT โ€ฒ end_POSTSUPERSCRIPT , italic_t start_POSTSUPERSCRIPT โ€ฒ end_POSTSUPERSCRIPT end_POSTSUBSCRIPT for any dโ€ฒโ‰ dsuperscript๐‘‘โ€ฒ๐‘‘d^{\prime}\neq ditalic_d start_POSTSUPERSCRIPT โ€ฒ end_POSTSUPERSCRIPT โ‰  italic_d. The full likelihood of the LHMM at time t can be written as,

fโข(๐˜1,t,โ€ฆ,๐˜D,t,Z1,t,โ€ฆ,ZD,t)=fโข(Z1,t,โ€ฆ,ZD,t)โขโˆd=1Dfโข(๐˜d,t|Zd,t),๐‘“subscript๐˜1๐‘กโ€ฆsubscript๐˜๐ท๐‘กsubscript๐‘1๐‘กโ€ฆsubscript๐‘๐ท๐‘ก๐‘“subscript๐‘1๐‘กโ€ฆsubscript๐‘๐ท๐‘กsuperscriptsubscriptproduct๐‘‘1๐ท๐‘“conditionalsubscript๐˜๐‘‘๐‘กsubscript๐‘๐‘‘๐‘ก\displaystyle f(\mathbf{Y}_{1,t},\ldots,\mathbf{Y}_{D,t},Z_{1,t},\ldots,Z_{D,t% })=f(Z_{1,t},\ldots,Z_{D,t})\prod_{d=1}^{D}f(\mathbf{Y}_{d,t}|Z_{d,t}),italic_f ( bold_Y start_POSTSUBSCRIPT 1 , italic_t end_POSTSUBSCRIPT , โ€ฆ , bold_Y start_POSTSUBSCRIPT italic_D , italic_t end_POSTSUBSCRIPT , italic_Z start_POSTSUBSCRIPT 1 , italic_t end_POSTSUBSCRIPT , โ€ฆ , italic_Z start_POSTSUBSCRIPT italic_D , italic_t end_POSTSUBSCRIPT ) = italic_f ( italic_Z start_POSTSUBSCRIPT 1 , italic_t end_POSTSUBSCRIPT , โ€ฆ , italic_Z start_POSTSUBSCRIPT italic_D , italic_t end_POSTSUBSCRIPT ) โˆ start_POSTSUBSCRIPT italic_d = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_D end_POSTSUPERSCRIPT italic_f ( bold_Y start_POSTSUBSCRIPT italic_d , italic_t end_POSTSUBSCRIPT | italic_Z start_POSTSUBSCRIPT italic_d , italic_t end_POSTSUBSCRIPT ) , (5)

where the parameter dependencies have been suppressed for convenience. We want to parametererize the association between the component Markov chains of the MMC at every time point, and our approach to that end is to construct a Gaussian copula for the state processes. Let F๐นFitalic_F be the D-dimensional joint CDF of {Z1,โ€ฆ,ZD}subscript๐‘1โ€ฆsubscript๐‘๐ท\{Z_{1},\ldots,Z_{D}\}{ italic_Z start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , โ€ฆ , italic_Z start_POSTSUBSCRIPT italic_D end_POSTSUBSCRIPT }, and let F1,โ€ฆ,FDsubscript๐น1โ€ฆsubscript๐น๐ทF_{1},\ldots,F_{D}italic_F start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , โ€ฆ , italic_F start_POSTSUBSCRIPT italic_D end_POSTSUBSCRIPT be the marginal CDFs of Z1,โ€ฆ,ZDsubscript๐‘1โ€ฆsubscript๐‘๐ทZ_{1},\ldots,Z_{D}italic_Z start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , โ€ฆ , italic_Z start_POSTSUBSCRIPT italic_D end_POSTSUBSCRIPT respectively. We define a Gaussian copula over the state processes as:

Fโข(Z1,โ€ฆ,ZD)๐นsubscript๐‘1โ€ฆsubscript๐‘๐ท\displaystyle F(Z_{1},\ldots,Z_{D})italic_F ( italic_Z start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , โ€ฆ , italic_Z start_POSTSUBSCRIPT italic_D end_POSTSUBSCRIPT ) =๐’žโข(F1โข(Z1;๐œถ1,๐šท1),โ€ฆ,FDโข(ZD;๐œถD,๐šทD))absent๐’žsubscript๐น1subscript๐‘1subscript๐œถ1subscript๐šท1โ€ฆsubscript๐น๐ทsubscript๐‘๐ทsubscript๐œถ๐ทsubscript๐šท๐ท\displaystyle=\mathcal{C}\bigl{(}F_{1}(Z_{1};\boldsymbol{\alpha}_{1},\mathbf{% \Pi}_{1}),\ldots,F_{D}(Z_{D};\boldsymbol{\alpha}_{D},\mathbf{\Pi}_{D})\bigr{)}= caligraphic_C ( italic_F start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ( italic_Z start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ; bold_italic_ฮฑ start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , bold_ฮ  start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ) , โ€ฆ , italic_F start_POSTSUBSCRIPT italic_D end_POSTSUBSCRIPT ( italic_Z start_POSTSUBSCRIPT italic_D end_POSTSUBSCRIPT ; bold_italic_ฮฑ start_POSTSUBSCRIPT italic_D end_POSTSUBSCRIPT , bold_ฮ  start_POSTSUBSCRIPT italic_D end_POSTSUBSCRIPT ) )
=ฮฆDโข(ฮฆโˆ’1โข(U1),โ€ฆ,ฮฆโˆ’1โข(UD);ฮฃ)absentsubscriptฮฆ๐ทsuperscriptฮฆ1subscript๐‘ˆ1โ€ฆsuperscriptฮฆ1subscript๐‘ˆ๐ทฮฃ\displaystyle={\Phi}_{D}\bigl{(}\Phi^{-1}(U_{1}),\ldots,\Phi^{-1}(U_{D});% \Sigma\bigr{)}= roman_ฮฆ start_POSTSUBSCRIPT italic_D end_POSTSUBSCRIPT ( roman_ฮฆ start_POSTSUPERSCRIPT - 1 end_POSTSUPERSCRIPT ( italic_U start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ) , โ€ฆ , roman_ฮฆ start_POSTSUPERSCRIPT - 1 end_POSTSUPERSCRIPT ( italic_U start_POSTSUBSCRIPT italic_D end_POSTSUBSCRIPT ) ; roman_ฮฃ )
=ฮฆDโข(W1,โ€ฆ,WD;ฮฃ),absentsubscriptฮฆ๐ทsubscript๐‘Š1โ€ฆsubscript๐‘Š๐ทฮฃ\displaystyle={\Phi}_{D}\bigl{(}W_{1},\ldots,W_{D};\Sigma\bigr{)},= roman_ฮฆ start_POSTSUBSCRIPT italic_D end_POSTSUBSCRIPT ( italic_W start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , โ€ฆ , italic_W start_POSTSUBSCRIPT italic_D end_POSTSUBSCRIPT ; roman_ฮฃ ) , (6)

where U1,โ€ฆ,UDsubscript๐‘ˆ1โ€ฆsubscript๐‘ˆ๐ทU_{1},\ldots,U_{D}italic_U start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , โ€ฆ , italic_U start_POSTSUBSCRIPT italic_D end_POSTSUBSCRIPT are Uโขnโขiโขfโขoโขrโขmโข(0,1)๐‘ˆ๐‘›๐‘–๐‘“๐‘œ๐‘Ÿ๐‘š01Uniform(0,1)italic_U italic_n italic_i italic_f italic_o italic_r italic_m ( 0 , 1 ) variates and W1,โ€ฆโขWDsubscript๐‘Š1โ€ฆsubscript๐‘Š๐ทW_{1},\ldots W_{D}italic_W start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , โ€ฆ italic_W start_POSTSUBSCRIPT italic_D end_POSTSUBSCRIPT are standard Normal variates. ฮฆDsubscriptฮฆ๐ท{\Phi}_{D}roman_ฮฆ start_POSTSUBSCRIPT italic_D end_POSTSUBSCRIPT is a D๐ทDitalic_D-dimensional multivariate Normal CDF with correlation matrix ฮฃฮฃ\Sigmaroman_ฮฃ, while ฮฆโˆ’1superscriptฮฆ1\Phi^{-1}roman_ฮฆ start_POSTSUPERSCRIPT - 1 end_POSTSUPERSCRIPT is the inverse CDF of a univariate standard Normal distribution. Note that Wd=ฮฆโˆ’1โข(Fdโข(Zd;๐œถd,๐šทd))subscript๐‘Š๐‘‘superscriptฮฆ1subscript๐น๐‘‘subscript๐‘๐‘‘subscript๐œถ๐‘‘subscript๐šท๐‘‘W_{d}=\Phi^{-1}\bigl{(}F_{d}(Z_{d};\boldsymbol{\alpha}_{d},\mathbf{\Pi}_{d})% \bigr{)}italic_W start_POSTSUBSCRIPT italic_d end_POSTSUBSCRIPT = roman_ฮฆ start_POSTSUPERSCRIPT - 1 end_POSTSUPERSCRIPT ( italic_F start_POSTSUBSCRIPT italic_d end_POSTSUBSCRIPT ( italic_Z start_POSTSUBSCRIPT italic_d end_POSTSUBSCRIPT ; bold_italic_ฮฑ start_POSTSUBSCRIPT italic_d end_POSTSUBSCRIPT , bold_ฮ  start_POSTSUBSCRIPT italic_d end_POSTSUBSCRIPT ) ), and therefore the joint distribution of the state processes can be obtained by using the chain rule as,

fโข(Z1,โ€ฆ,ZD)๐‘“subscript๐‘1โ€ฆsubscript๐‘๐ท\displaystyle f(Z_{1},\ldots,Z_{D})italic_f ( italic_Z start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , โ€ฆ , italic_Z start_POSTSUBSCRIPT italic_D end_POSTSUBSCRIPT ) =ฯ•Dโข(W1,โ€ฆ,WD;ฮฃ)ฯ•โข(W1)ร—โ€ฆร—ฯ•โข(WD)โขโˆd=1Dfdโข(Zd)absentsubscriptitalic-ฯ•๐ทsubscript๐‘Š1โ€ฆsubscript๐‘Š๐ทฮฃitalic-ฯ•subscript๐‘Š1โ€ฆitalic-ฯ•subscript๐‘Š๐ทsuperscriptsubscriptproduct๐‘‘1๐ทsubscript๐‘“๐‘‘subscript๐‘๐‘‘\displaystyle=\frac{{\phi}_{D}\bigl{(}W_{1},\ldots,W_{D};\Sigma\bigr{)}}{\phi(% W_{1})\times\ldots\times\phi(W_{D})}\prod_{d=1}^{D}f_{d}(Z_{d})= divide start_ARG italic_ฯ• start_POSTSUBSCRIPT italic_D end_POSTSUBSCRIPT ( italic_W start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , โ€ฆ , italic_W start_POSTSUBSCRIPT italic_D end_POSTSUBSCRIPT ; roman_ฮฃ ) end_ARG start_ARG italic_ฯ• ( italic_W start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ) ร— โ€ฆ ร— italic_ฯ• ( italic_W start_POSTSUBSCRIPT italic_D end_POSTSUBSCRIPT ) end_ARG โˆ start_POSTSUBSCRIPT italic_d = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_D end_POSTSUPERSCRIPT italic_f start_POSTSUBSCRIPT italic_d end_POSTSUBSCRIPT ( italic_Z start_POSTSUBSCRIPT italic_d end_POSTSUBSCRIPT )
=cโข(Z1,โ€ฆ,ZD;ฮฃ)โขโˆd=1Dfdโข(Zd),absent๐‘subscript๐‘1โ€ฆsubscript๐‘๐ทฮฃsuperscriptsubscriptproduct๐‘‘1๐ทsubscript๐‘“๐‘‘subscript๐‘๐‘‘\displaystyle=c(Z_{1},\ldots,Z_{D};\Sigma)\prod_{d=1}^{D}f_{d}(Z_{d}),= italic_c ( italic_Z start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , โ€ฆ , italic_Z start_POSTSUBSCRIPT italic_D end_POSTSUBSCRIPT ; roman_ฮฃ ) โˆ start_POSTSUBSCRIPT italic_d = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_D end_POSTSUPERSCRIPT italic_f start_POSTSUBSCRIPT italic_d end_POSTSUBSCRIPT ( italic_Z start_POSTSUBSCRIPT italic_d end_POSTSUBSCRIPT ) , (7)

where ฯ•Dsubscriptitalic-ฯ•๐ท\phi_{D}italic_ฯ• start_POSTSUBSCRIPT italic_D end_POSTSUBSCRIPT and ฯ•italic-ฯ•\phiitalic_ฯ• are the density functions corresponding to ฮฆDsubscriptฮฆ๐ท\Phi_{D}roman_ฮฆ start_POSTSUBSCRIPT italic_D end_POSTSUBSCRIPT and ฮฆฮฆ\Phiroman_ฮฆ, fdโข(โ‹…)subscript๐‘“๐‘‘โ‹…f_{d}(\cdot)italic_f start_POSTSUBSCRIPT italic_d end_POSTSUBSCRIPT ( โ‹… ) denotes the distribution of Zdsubscript๐‘๐‘‘Z_{d}italic_Z start_POSTSUBSCRIPT italic_d end_POSTSUBSCRIPT, and cโข(โ‹…)๐‘โ‹…c(\cdot)italic_c ( โ‹… ) denotes the copula density. The likelihood in (5) can thus be simplified to

fโข(๐˜1,t,โ€ฆ,๐˜D,t,Z1,t,โ€ฆ,ZD,t)๐‘“subscript๐˜1๐‘กโ€ฆsubscript๐˜๐ท๐‘กsubscript๐‘1๐‘กโ€ฆsubscript๐‘๐ท๐‘ก\displaystyle f(\mathbf{Y}_{1,t},\ldots,\mathbf{Y}_{D,t},Z_{1,t},\ldots,Z_{D,t})italic_f ( bold_Y start_POSTSUBSCRIPT 1 , italic_t end_POSTSUBSCRIPT , โ€ฆ , bold_Y start_POSTSUBSCRIPT italic_D , italic_t end_POSTSUBSCRIPT , italic_Z start_POSTSUBSCRIPT 1 , italic_t end_POSTSUBSCRIPT , โ€ฆ , italic_Z start_POSTSUBSCRIPT italic_D , italic_t end_POSTSUBSCRIPT ) =cโข(Z1,t,โ€ฆ,ZD,t)โขโˆd=1Dfโข(๐˜d,t|Zd,t)โขfdโข(Zd,t)absent๐‘subscript๐‘1๐‘กโ€ฆsubscript๐‘๐ท๐‘กsuperscriptsubscriptproduct๐‘‘1๐ท๐‘“conditionalsubscript๐˜๐‘‘๐‘กsubscript๐‘๐‘‘๐‘กsubscript๐‘“๐‘‘subscript๐‘๐‘‘๐‘ก\displaystyle=c(Z_{1,t},\ldots,Z_{D,t})\prod_{d=1}^{D}f(\mathbf{Y}_{d,t}|Z_{d,% t})f_{d}(Z_{d,t})= italic_c ( italic_Z start_POSTSUBSCRIPT 1 , italic_t end_POSTSUBSCRIPT , โ€ฆ , italic_Z start_POSTSUBSCRIPT italic_D , italic_t end_POSTSUBSCRIPT ) โˆ start_POSTSUBSCRIPT italic_d = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_D end_POSTSUPERSCRIPT italic_f ( bold_Y start_POSTSUBSCRIPT italic_d , italic_t end_POSTSUBSCRIPT | italic_Z start_POSTSUBSCRIPT italic_d , italic_t end_POSTSUBSCRIPT ) italic_f start_POSTSUBSCRIPT italic_d end_POSTSUBSCRIPT ( italic_Z start_POSTSUBSCRIPT italic_d , italic_t end_POSTSUBSCRIPT )
=cโข(Z1,t,โ€ฆ,ZD,t)โขโˆd=1Dfโข(๐˜d,t,Zd,t).absent๐‘subscript๐‘1๐‘กโ€ฆsubscript๐‘๐ท๐‘กsuperscriptsubscriptproduct๐‘‘1๐ท๐‘“subscript๐˜๐‘‘๐‘กsubscript๐‘๐‘‘๐‘ก\displaystyle=c(Z_{1,t},\ldots,Z_{D,t})\prod_{d=1}^{D}f(\mathbf{Y}_{d,t},Z_{d,% t}).= italic_c ( italic_Z start_POSTSUBSCRIPT 1 , italic_t end_POSTSUBSCRIPT , โ€ฆ , italic_Z start_POSTSUBSCRIPT italic_D , italic_t end_POSTSUBSCRIPT ) โˆ start_POSTSUBSCRIPT italic_d = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_D end_POSTSUPERSCRIPT italic_f ( bold_Y start_POSTSUBSCRIPT italic_d , italic_t end_POSTSUBSCRIPT , italic_Z start_POSTSUBSCRIPT italic_d , italic_t end_POSTSUBSCRIPT ) . (8)

The copula augmented model has an LHMM structure similar to Figure 2. A discussion of the fundamentals and theoretical properties of copulas can be found in Nelsen (2006). Copulas of continuous variables are well defined and have been extensively studied, but constructing a copula for discrete variables is not as straightforward. Since a Markov chain is either a nominal or an ordinal random variable, finding an appropriate measure of association between latent state processes to construct a copula can be challenging. To address this, we will take advantage of a unique relationship which exists between the Spearman and Pearson correlations of a bivariate Normal distribution. Since the Spearman correlation can be used as a measure of association for ordinal data, we choose a Gaussian copula parameterized by a correlation matrix ฮฃฮฃ\Sigmaroman_ฮฃ. We assume that the state processes evolve in lockstep, and correlated D๐ทDitalic_D-vectors from ฮฆD(โ‹…โˆฃฮฃ)\Phi_{D}(\cdot\mid\Sigma)roman_ฮฆ start_POSTSUBSCRIPT italic_D end_POSTSUBSCRIPT ( โ‹… โˆฃ roman_ฮฃ ) can be linked to an MMC with correlated Markov chains by means of an appropriate transformation. One such method is described below.

2.2 Constructing an MMC from Uniform random variates

Since the copula is a D๐ทDitalic_D-dimensional CDF with Uniform marginals, we discuss a method to generate an MMC from a Gaussian copula in this section. This will be relevant to our method of estimating the copula parameters.

Let us first review a method to generate a univariate Markov chain; Serfozo (2009) describes how to construct a Markov chain from a Uniform variable. Suppose that the desired Markov chain has the initial distribution vector ๐œถ๐œถ\boldsymbol{\alpha}bold_italic_ฮฑ and the transition probability matrix ๐šท๐šท{\bf\Pi}bold_ฮ . Let hโข(u)โ„Ž๐‘ขh(u)italic_h ( italic_u ) and fโข(j,u)๐‘“๐‘—๐‘ขf(j,u)italic_f ( italic_j , italic_u ) be functions transforming continuous values into categorical values ๐’ฅ={1,2,โ€ฆ,J}๐’ฅ12โ€ฆ๐ฝ\mathcal{J}=\{1,2,\ldots,J\}caligraphic_J = { 1 , 2 , โ€ฆ , italic_J }. They are given by

hโข(u)=jโขย ifย โขuโˆˆIjโขย for someย โขjโˆˆ๐’ฅ,โ„Ž๐‘ข๐‘—ย ifย ๐‘ขsubscript๐ผ๐‘—ย for someย ๐‘—๐’ฅh(u)=j\text{ if }u\in I_{j}\text{ for some }j\in\mathcal{J},italic_h ( italic_u ) = italic_j if italic_u โˆˆ italic_I start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT for some italic_j โˆˆ caligraphic_J , (9)

where I1=[0,ฮฑ1)subscript๐ผ10subscript๐›ผ1I_{1}=\left[0,\alpha_{1}\right)italic_I start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT = [ 0 , italic_ฮฑ start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ) and Ij=[โˆ‘l=1jโˆ’1ฮฑl,โˆ‘l=1jฮฑl)subscript๐ผ๐‘—subscriptsuperscript๐‘—1๐‘™1subscript๐›ผ๐‘™subscriptsuperscript๐‘—๐‘™1subscript๐›ผ๐‘™I_{j}=\left[\sum^{j-1}_{l=1}\alpha_{l},\sum^{j}_{l=1}\alpha_{l}\right)italic_I start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT = [ โˆ‘ start_POSTSUPERSCRIPT italic_j - 1 end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_l = 1 end_POSTSUBSCRIPT italic_ฮฑ start_POSTSUBSCRIPT italic_l end_POSTSUBSCRIPT , โˆ‘ start_POSTSUPERSCRIPT italic_j end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_l = 1 end_POSTSUBSCRIPT italic_ฮฑ start_POSTSUBSCRIPT italic_l end_POSTSUBSCRIPT ) for any j>1๐‘—1j>1italic_j > 1, and

fโข(i,u)=jโขย ifย โขuโˆˆIiโขjโขย for someย โขjโˆˆ๐’ฅ,๐‘“๐‘–๐‘ข๐‘—ย ifย ๐‘ขsubscript๐ผ๐‘–๐‘—ย for someย ๐‘—๐’ฅf(i,u)=j\text{ if }u\in I_{ij}\text{ for some }j\in\mathcal{J},italic_f ( italic_i , italic_u ) = italic_j if italic_u โˆˆ italic_I start_POSTSUBSCRIPT italic_i italic_j end_POSTSUBSCRIPT for some italic_j โˆˆ caligraphic_J , (10)

where Iiโข1=[0,ฯ€iโข1)subscript๐ผ๐‘–10subscript๐œ‹๐‘–1I_{i1}=\left[0,\pi_{i1}\right)italic_I start_POSTSUBSCRIPT italic_i 1 end_POSTSUBSCRIPT = [ 0 , italic_ฯ€ start_POSTSUBSCRIPT italic_i 1 end_POSTSUBSCRIPT ) and Ii,j=[โˆ‘l=1jโˆ’1ฯ€iโขl,โˆ‘l=1jฯ€iโขl)subscript๐ผ๐‘–๐‘—subscriptsuperscript๐‘—1๐‘™1subscript๐œ‹๐‘–๐‘™subscriptsuperscript๐‘—๐‘™1subscript๐œ‹๐‘–๐‘™I_{i,j}=\left[\sum^{j-1}_{l=1}\pi_{il},\sum^{j}_{l=1}\pi_{il}\right)italic_I start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT = [ โˆ‘ start_POSTSUPERSCRIPT italic_j - 1 end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_l = 1 end_POSTSUBSCRIPT italic_ฯ€ start_POSTSUBSCRIPT italic_i italic_l end_POSTSUBSCRIPT , โˆ‘ start_POSTSUPERSCRIPT italic_j end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_l = 1 end_POSTSUBSCRIPT italic_ฯ€ start_POSTSUBSCRIPT italic_i italic_l end_POSTSUBSCRIPT ) for any j>1๐‘—1j>1italic_j > 1.

Let ๐”=(U1,U2,โ€ฆ,Un)๐”subscript๐‘ˆ1subscript๐‘ˆ2โ€ฆsubscript๐‘ˆ๐‘›{\bf U}=(U_{1},U_{2},\ldots,U_{n})bold_U = ( italic_U start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , italic_U start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT , โ€ฆ , italic_U start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT ) be a vector of independent random variables where Utsubscript๐‘ˆ๐‘กU_{t}italic_U start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT has an uniform distribution on [0,1]01[0,1][ 0 , 1 ]. We will denote hโข(U1)โ„Žsubscript๐‘ˆ1h(U_{1})italic_h ( italic_U start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ) as Z1subscript๐‘1Z_{1}italic_Z start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT and fโข(Ztโˆ’1,Ut)๐‘“subscript๐‘๐‘ก1subscript๐‘ˆ๐‘กf(Z_{t-1},U_{t})italic_f ( italic_Z start_POSTSUBSCRIPT italic_t - 1 end_POSTSUBSCRIPT , italic_U start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT ) as Ztsubscript๐‘๐‘กZ_{t}italic_Z start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT for any t>1๐‘ก1t>1italic_t > 1. Serfozo (2009) showed that (Z1,Z2,โ€ฆ,Zn)subscript๐‘1subscript๐‘2โ€ฆsubscript๐‘๐‘›(Z_{1},Z_{2},\ldots,Z_{n})( italic_Z start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , italic_Z start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT , โ€ฆ , italic_Z start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT ) is a Markov chain with the initial distribution ๐œถ๐œถ\boldsymbol{\alpha}bold_italic_ฮฑ and the transition probability matrix ๐šท๐šท{\bf\Pi}bold_ฮ . Ji (2019) modified this method in order to generate correlated Markov chains. In a univariate Markov chain, the random value at t๐‘กtitalic_tth time point, Ztsubscript๐‘๐‘กZ_{t}italic_Z start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT, is generated from a single random variable Utsubscript๐‘ˆ๐‘กU_{t}italic_U start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT. To create an MMC with D๐ทDitalic_D Markov chains, we need a vector of possibly correlated random variables (U1,t,โ€ฆ,UD,t)subscript๐‘ˆ1๐‘กโ€ฆsubscript๐‘ˆ๐ท๐‘ก(U_{1,t},\ldots,U_{D,t})( italic_U start_POSTSUBSCRIPT 1 , italic_t end_POSTSUBSCRIPT , โ€ฆ , italic_U start_POSTSUBSCRIPT italic_D , italic_t end_POSTSUBSCRIPT ) at each time point t๐‘กtitalic_t. Therefore, we will use a D๐ทDitalic_D-dimensional Normal distribution to generate correlated random values. Suppose that an MMC has a length of n๐‘›nitalic_n with D๐ทDitalic_D sequences. Let the stationary distribution and the transition probability matrix of the d๐‘‘ditalic_dth sequence be ๐œผdsubscript๐œผ๐‘‘\boldsymbol{\eta}_{d}bold_italic_ฮท start_POSTSUBSCRIPT italic_d end_POSTSUBSCRIPT and ๐šทdsubscript๐šท๐‘‘{\bf\Pi}_{d}bold_ฮ  start_POSTSUBSCRIPT italic_d end_POSTSUBSCRIPT respectively. We use the inverse transform method to create Uniform variables from Normal variables (Rizzo, 2019). For the t๐‘กtitalic_tth time step, 1โ‰คtโ‰คn1๐‘ก๐‘›1\leq t\leq n1 โ‰ค italic_t โ‰ค italic_n, let ๐–t=(W1,t,โ€ฆ,WD,t)subscript๐–๐‘กsubscript๐‘Š1๐‘กโ€ฆsubscript๐‘Š๐ท๐‘ก{\bf W}_{t}=(W_{1,t},\ldots,W_{D,t})bold_W start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT = ( italic_W start_POSTSUBSCRIPT 1 , italic_t end_POSTSUBSCRIPT , โ€ฆ , italic_W start_POSTSUBSCRIPT italic_D , italic_t end_POSTSUBSCRIPT ) and ๐–tโขโˆผi.i.dโขMVNโข(๐ŸŽ,ฮฃ)subscript๐–๐‘กi.i.dsimilar-toMVN0ฮฃ{\bf W}_{t}\overset{\text{i.i.d}}{\sim}\text{MVN}(\boldsymbol{0},{\Sigma})bold_W start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT overi.i.d start_ARG โˆผ end_ARG MVN ( bold_0 , roman_ฮฃ ) where ฮฃฮฃ{\Sigma}roman_ฮฃ is a correlation matrix. For each d=1,โ€ฆ,D๐‘‘1โ€ฆ๐ทd=1,\ldots,Ditalic_d = 1 , โ€ฆ , italic_D and t=1,โ€ฆ,n๐‘ก1โ€ฆ๐‘›t=1,\ldots,nitalic_t = 1 , โ€ฆ , italic_n, a Uniform random variable is created using the inverse transform method, namely Ud,t=ฮฆโข(Wd,t)subscript๐‘ˆ๐‘‘๐‘กฮฆsubscript๐‘Š๐‘‘๐‘กU_{d,t}=\Phi(W_{d,t})italic_U start_POSTSUBSCRIPT italic_d , italic_t end_POSTSUBSCRIPT = roman_ฮฆ ( italic_W start_POSTSUBSCRIPT italic_d , italic_t end_POSTSUBSCRIPT ). Each Ud,tsubscript๐‘ˆ๐‘‘๐‘กU_{d,t}italic_U start_POSTSUBSCRIPT italic_d , italic_t end_POSTSUBSCRIPT is thus uniformly distributed on [0,1]01[0,1][ 0 , 1 ]. The correlations among U1,t,โ€ฆ,UD,tsubscript๐‘ˆ1๐‘กโ€ฆsubscript๐‘ˆ๐ท๐‘กU_{1,t},\ldots,U_{D,t}italic_U start_POSTSUBSCRIPT 1 , italic_t end_POSTSUBSCRIPT , โ€ฆ , italic_U start_POSTSUBSCRIPT italic_D , italic_t end_POSTSUBSCRIPT stem from the correlations among W1,t,โ€ฆ,WD,tsubscript๐‘Š1๐‘กโ€ฆsubscript๐‘Š๐ท๐‘กW_{1,t},\ldots,W_{D,t}italic_W start_POSTSUBSCRIPT 1 , italic_t end_POSTSUBSCRIPT , โ€ฆ , italic_W start_POSTSUBSCRIPT italic_D , italic_t end_POSTSUBSCRIPT.

Now let us apply (9) and (10) to Ud,tsubscript๐‘ˆ๐‘‘๐‘กU_{d,t}italic_U start_POSTSUBSCRIPT italic_d , italic_t end_POSTSUBSCRIPT. A random variable Zd,tsubscript๐‘๐‘‘๐‘กZ_{d,t}italic_Z start_POSTSUBSCRIPT italic_d , italic_t end_POSTSUBSCRIPT is created for each (d,t)๐‘‘๐‘ก(d,t)( italic_d , italic_t ) pair where Zd,1=hโข(Ud,1)subscript๐‘๐‘‘1โ„Žsubscript๐‘ˆ๐‘‘1Z_{d,1}=h(U_{d,1})italic_Z start_POSTSUBSCRIPT italic_d , 1 end_POSTSUBSCRIPT = italic_h ( italic_U start_POSTSUBSCRIPT italic_d , 1 end_POSTSUBSCRIPT ) and Zd,t=fโข(Zd,tโˆ’1,Ud,t)subscript๐‘๐‘‘๐‘ก๐‘“subscript๐‘๐‘‘๐‘ก1subscript๐‘ˆ๐‘‘๐‘กZ_{d,t}=f(Z_{d,t-1},U_{d,t})italic_Z start_POSTSUBSCRIPT italic_d , italic_t end_POSTSUBSCRIPT = italic_f ( italic_Z start_POSTSUBSCRIPT italic_d , italic_t - 1 end_POSTSUBSCRIPT , italic_U start_POSTSUBSCRIPT italic_d , italic_t end_POSTSUBSCRIPT ). Thus, we have an MMC {๐™1,โ€ฆ,๐™n}subscript๐™1โ€ฆsubscript๐™๐‘›\{{\bf Z}_{1},\ldots,{\bf Z}_{n}\}{ bold_Z start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , โ€ฆ , bold_Z start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT } where ๐™t=(Z1,t,Z2,t,โ€ฆ,ZD,t)subscript๐™๐‘กsubscript๐‘1๐‘กsubscript๐‘2๐‘กโ€ฆsubscript๐‘๐ท๐‘ก{\bf Z}_{t}=(Z_{1,t},Z_{2,t},\ldots,Z_{D,t})bold_Z start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT = ( italic_Z start_POSTSUBSCRIPT 1 , italic_t end_POSTSUBSCRIPT , italic_Z start_POSTSUBSCRIPT 2 , italic_t end_POSTSUBSCRIPT , โ€ฆ , italic_Z start_POSTSUBSCRIPT italic_D , italic_t end_POSTSUBSCRIPT ) and {Zd,1,Zd,2,โ€ฆ,Zd,n}subscript๐‘๐‘‘1subscript๐‘๐‘‘2โ€ฆsubscript๐‘๐‘‘๐‘›\{Z_{d,1},Z_{d,2},\ldots,Z_{d,n}\}{ italic_Z start_POSTSUBSCRIPT italic_d , 1 end_POSTSUBSCRIPT , italic_Z start_POSTSUBSCRIPT italic_d , 2 end_POSTSUBSCRIPT , โ€ฆ , italic_Z start_POSTSUBSCRIPT italic_d , italic_n end_POSTSUBSCRIPT } is a Markov chain marginally. In addition, Z1,t,โ€ฆ,ZD,tsubscript๐‘1๐‘กโ€ฆsubscript๐‘๐ท๐‘กZ_{1,t},\ldots,Z_{D,t}italic_Z start_POSTSUBSCRIPT 1 , italic_t end_POSTSUBSCRIPT , โ€ฆ , italic_Z start_POSTSUBSCRIPT italic_D , italic_t end_POSTSUBSCRIPT are correlated at the t๐‘กtitalic_tth time step. The functions in (9) and (10) are collectively referred to as gโข(โ‹…)๐‘”โ‹…g(\cdot)italic_g ( โ‹… ) going forward, and describes the overall process of transforming marginally Uniform random vectors into an MMC.

2.3 Two-stage parameter estimation for the LHMM

The construction of a copula for the state processes requires knowledge of the states that give rise to the data. This is usually obtained as the most likely sequence of states using the Viterbi Algorithm (Viterbi, 1967). The Viterbi Algorithm is applied after the model parameters have been estimated - this means that we need to resort to a two-stage estimation process. In the first stage, the parameters for each sectorโ€™s HMMs are estimated independently using the B-W algorithm. The Viterbi Algorithm then provides us the most likely sequence of states to have generated the data, which is used to estimate the copula correlation matrix ฮฃฮฃ\Sigmaroman_ฮฃ. Afterwards, the marginal parameters can be re-estimated conditioned on the correlation structure.

Estimating ฮฃฮฃ\Sigmaroman_ฮฃ in (6) is challenging using conventional approaches like the inversion method (Nelsen, 2006) or the inference functions for margins method (Joe and Xu, 1996), since neither the CDF Fdโข(Zd)subscript๐น๐‘‘subscript๐‘๐‘‘F_{d}(Z_{d})italic_F start_POSTSUBSCRIPT italic_d end_POSTSUBSCRIPT ( italic_Z start_POSTSUBSCRIPT italic_d end_POSTSUBSCRIPT ) nor its associated probability mass function that appear in (6) and (7) can be evaluated easily. Instead, we choose ฮฃฮฃ\Sigmaroman_ฮฃ in a manner such that states generated from the Gaussian copula using the methodology discussed in Section 2.2 can be used to reproduce a desired measure of association for the MMC. For each stock, we assumed that the HMM has two hidden states, the bear state and the bull state. However, the B-W algorithm produces two states, State 1 and State 2 without labels identifying them as bear/bull. So without loss of generality, we relabel the states for the d๐‘‘ditalic_dth Markov chain such that for State 1,

โˆ‘kd=1ndฮผkd,1ฯƒkd,1>โˆ‘kd=1ndฮผkd,2ฯƒkd,2,superscriptsubscriptsubscript๐‘˜๐‘‘1subscript๐‘›๐‘‘subscript๐œ‡subscript๐‘˜๐‘‘1subscript๐œŽsubscript๐‘˜๐‘‘1superscriptsubscriptsubscript๐‘˜๐‘‘1subscript๐‘›๐‘‘subscript๐œ‡subscript๐‘˜๐‘‘2subscript๐œŽsubscript๐‘˜๐‘‘2\displaystyle\sum_{k_{d}=1}^{n_{d}}\dfrac{\mu_{k_{d},1}}{\sigma_{k_{d},1}}>% \sum_{k_{d}=1}^{n_{d}}\dfrac{\mu_{k_{d},2}}{\sigma_{k_{d},2}},โˆ‘ start_POSTSUBSCRIPT italic_k start_POSTSUBSCRIPT italic_d end_POSTSUBSCRIPT = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_n start_POSTSUBSCRIPT italic_d end_POSTSUBSCRIPT end_POSTSUPERSCRIPT divide start_ARG italic_ฮผ start_POSTSUBSCRIPT italic_k start_POSTSUBSCRIPT italic_d end_POSTSUBSCRIPT , 1 end_POSTSUBSCRIPT end_ARG start_ARG italic_ฯƒ start_POSTSUBSCRIPT italic_k start_POSTSUBSCRIPT italic_d end_POSTSUBSCRIPT , 1 end_POSTSUBSCRIPT end_ARG > โˆ‘ start_POSTSUBSCRIPT italic_k start_POSTSUBSCRIPT italic_d end_POSTSUBSCRIPT = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_n start_POSTSUBSCRIPT italic_d end_POSTSUBSCRIPT end_POSTSUPERSCRIPT divide start_ARG italic_ฮผ start_POSTSUBSCRIPT italic_k start_POSTSUBSCRIPT italic_d end_POSTSUBSCRIPT , 2 end_POSTSUBSCRIPT end_ARG start_ARG italic_ฯƒ start_POSTSUBSCRIPT italic_k start_POSTSUBSCRIPT italic_d end_POSTSUBSCRIPT , 2 end_POSTSUBSCRIPT end_ARG ,

where ฮผkd,1,ฮผkd,2,ฯƒkd,1,ย andย โขฯƒkd,1subscript๐œ‡subscript๐‘˜๐‘‘1subscript๐œ‡subscript๐‘˜๐‘‘2subscript๐œŽsubscript๐‘˜๐‘‘1ย andย subscript๐œŽsubscript๐‘˜๐‘‘1\mu_{k_{d},1},\mu_{k_{d},2},\sigma_{k_{d},1},\mbox{ and }\sigma_{k_{d},1}italic_ฮผ start_POSTSUBSCRIPT italic_k start_POSTSUBSCRIPT italic_d end_POSTSUBSCRIPT , 1 end_POSTSUBSCRIPT , italic_ฮผ start_POSTSUBSCRIPT italic_k start_POSTSUBSCRIPT italic_d end_POSTSUBSCRIPT , 2 end_POSTSUBSCRIPT , italic_ฯƒ start_POSTSUBSCRIPT italic_k start_POSTSUBSCRIPT italic_d end_POSTSUBSCRIPT , 1 end_POSTSUBSCRIPT , and italic_ฯƒ start_POSTSUBSCRIPT italic_k start_POSTSUBSCRIPT italic_d end_POSTSUBSCRIPT , 1 end_POSTSUBSCRIPT are as defined in (4). State 1 has a higher return to volatility ratio and can be considered a good stock to buy (Nguyen and Nguyen, 2015). It would thus correspond to a bull market, and State 2 can be considered to be bear market states. Since the states are now ordinal in nature, the pairwise Spearman correlation for Markov chains in the MMC is chosen as the desired measure of association. However, there is no obvious way to estimate a Dร—D๐ท๐ทD\times Ditalic_D ร— italic_D matrix ฮฃฮฃ\Sigmaroman_ฮฃ whose pairwise correlations are functions of the Spearman correlations between the Markov chains. We make a simplifying assumption for the copula and rewrite (6) as:

ฮฆDโข(W1,โ€ฆ,WD;ฮฃ)โ‰ˆโˆd1=1Dโˆ’1โˆd2=d1+1Dฮฆ2โข(Wd1,Wd2;ฯd1โขd2),subscriptฮฆ๐ทsubscript๐‘Š1โ€ฆsubscript๐‘Š๐ทฮฃsuperscriptsubscriptproductsubscript๐‘‘11๐ท1superscriptsubscriptproductsubscript๐‘‘2subscript๐‘‘11๐ทsubscriptฮฆ2subscript๐‘Šsubscript๐‘‘1subscript๐‘Šsubscript๐‘‘2subscript๐œŒsubscript๐‘‘1subscript๐‘‘2\displaystyle{\Phi}_{D}\bigl{(}W_{1},\ldots,W_{D};\Sigma\bigr{)}\approx\prod_{% d_{1}=1}^{D-1}\prod_{d_{2}=d_{1}+1}^{D}{\Phi}_{2}(W_{d_{1}},W_{d_{2}};\rho_{d_% {1}d_{2}}),roman_ฮฆ start_POSTSUBSCRIPT italic_D end_POSTSUBSCRIPT ( italic_W start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , โ€ฆ , italic_W start_POSTSUBSCRIPT italic_D end_POSTSUBSCRIPT ; roman_ฮฃ ) โ‰ˆ โˆ start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_D - 1 end_POSTSUPERSCRIPT โˆ start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT = italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT + 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_D end_POSTSUPERSCRIPT roman_ฮฆ start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_W start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT , italic_W start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT ; italic_ฯ start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT ) , (11)

where ฯd1โขd2subscript๐œŒsubscript๐‘‘1subscript๐‘‘2\rho_{d_{1}d_{2}}italic_ฯ start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT denotes the Pearson correlation between Wd1subscript๐‘Šsubscript๐‘‘1W_{d_{1}}italic_W start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT and Wd2subscript๐‘Šsubscript๐‘‘2W_{d_{2}}italic_W start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT, and corresponds to the (d1,d2)subscript๐‘‘1subscript๐‘‘2(d_{1},d_{2})( italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT )th element of ฮฃฮฃ\Sigmaroman_ฮฃ. This formulation can be interpreted in a manner similar to a pairwise simplified regular vine (R-vine) copula (Brechmann etย al., 2012), with all pair-copula terms involving a conditioning set replaced by bivariate Gaussian copulas. We refer to this as the pair-copula approximation, and it consists of Dโข(Dโˆ’1)/2๐ท๐ท12D(D-1)/2italic_D ( italic_D - 1 ) / 2 terms. The copula density associated with (11) can also be interpreted as a composite likelihood (Varin etย al., 2011). In practice, this will allow us to estimate the individual elements ฯd1โขd2subscript๐œŒsubscript๐‘‘1subscript๐‘‘2\rho_{d_{1}d_{2}}italic_ฯ start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT of ฮฃฮฃ\Sigmaroman_ฮฃ using the right hand side of (11), but simulate data from the copula using the left hand side of (11), as long as we can ensure that ฮฃฮฃ\Sigmaroman_ฮฃ is a positive-definite matrix. Kruskal (1958) provided a relationship between the Pearson correlation ฯ๐œŒ\rhoitalic_ฯ and the Spearman correlation ฯโˆ—superscript๐œŒ\rho^{*}italic_ฯ start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT for bivariate Normal variables (W1,W2)subscript๐‘Š1subscript๐‘Š2(W_{1},W_{2})( italic_W start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , italic_W start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ) that we will use to estimate ฯd1โขd2subscript๐œŒsubscript๐‘‘1subscript๐‘‘2\rho_{d_{1}d_{2}}italic_ฯ start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT:

ฯ=2โขsinโก[ฯ€โขฯโˆ—6].๐œŒ2๐œ‹superscript๐œŒ6\rho=2\sin\biggl{[}\pi\frac{\rho^{*}}{6}\biggr{]}.italic_ฯ = 2 roman_sin [ italic_ฯ€ divide start_ARG italic_ฯ start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT end_ARG start_ARG 6 end_ARG ] . (12)

Note that ฯโˆ—โข(Wd1,Wd2)=ฯโˆ—โข(Ud1,Ud2)superscript๐œŒsubscript๐‘Šsubscript๐‘‘1subscript๐‘Šsubscript๐‘‘2superscript๐œŒsubscript๐‘ˆsubscript๐‘‘1subscript๐‘ˆsubscript๐‘‘2\rho^{*}(W_{d_{1}},W_{d_{2}})=\rho^{*}(U_{d_{1}},U_{d_{2}})italic_ฯ start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT ( italic_W start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT , italic_W start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT ) = italic_ฯ start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT ( italic_U start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT , italic_U start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT ) since the Spearman correlation coefficient is invariant under monotone transforms. Recall that we defined gโข(โ‹…)๐‘”โ‹…g(\cdot)italic_g ( โ‹… ) in Section 2.2 as the function which transforms Uniform variates into a Markov chain. Let g1โข(โ‹…)subscript๐‘”1โ‹…g_{1}(\cdot)italic_g start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ( โ‹… ) and g2โข(โ‹…)subscript๐‘”2โ‹…g_{2}(\cdot)italic_g start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( โ‹… ) be similar functions such that g1โข(Ud1)=Zd1subscript๐‘”1subscript๐‘ˆsubscript๐‘‘1subscript๐‘subscript๐‘‘1g_{1}(U_{d_{1}})=Z_{d_{1}}italic_g start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ( italic_U start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT ) = italic_Z start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT and g2โข(Ud2)=Zd2subscript๐‘”2subscript๐‘ˆsubscript๐‘‘2subscript๐‘subscript๐‘‘2g_{2}(U_{d_{2}})=Z_{d_{2}}italic_g start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_U start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT ) = italic_Z start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT, with g1โข(โ‹…)โ‰ g2โข(โ‹…)subscript๐‘”1โ‹…subscript๐‘”2โ‹…g_{1}(\cdot)\neq g_{2}(\cdot)italic_g start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ( โ‹… ) โ‰  italic_g start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( โ‹… ) if d1โ‰ d2subscript๐‘‘1subscript๐‘‘2d_{1}\neq d_{2}italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT โ‰  italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT. The relationship in (12) and the assumption made in (11) together means that it is sufficient to estimate ฯd1โขd2โˆ—=ฯโˆ—โข(Ud1,Ud2)subscriptsuperscript๐œŒsubscript๐‘‘1subscript๐‘‘2superscript๐œŒsubscript๐‘ˆsubscript๐‘‘1subscript๐‘ˆsubscript๐‘‘2\rho^{*}_{d_{1}d_{2}}=\rho^{*}(U_{d_{1}},U_{d_{2}})italic_ฯ start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT = italic_ฯ start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT ( italic_U start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT , italic_U start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT ) to obtain an estimate of ฯd1โขd2=ฯโข(Wd1,Wd2)subscript๐œŒsubscript๐‘‘1subscript๐‘‘2๐œŒsubscript๐‘Šsubscript๐‘‘1subscript๐‘Šsubscript๐‘‘2\rho_{d_{1}d_{2}}=\rho(W_{d_{1}},W_{d_{2}})italic_ฯ start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT = italic_ฯ ( italic_W start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT , italic_W start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT ). If we denote the corresponding estimators as ฯ^d1โขd2โˆ—subscriptsuperscript^๐œŒsubscript๐‘‘1subscript๐‘‘2\hat{\rho}^{*}_{d_{1}d_{2}}over^ start_ARG italic_ฯ end_ARG start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT and ฯ^d1โขd2subscript^๐œŒsubscript๐‘‘1subscript๐‘‘2\hat{\rho}_{d_{1}d_{2}}over^ start_ARG italic_ฯ end_ARG start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT respectively, the estimate ฯ^d1โขd2โˆ—subscriptsuperscript^๐œŒsubscript๐‘‘1subscript๐‘‘2\hat{\rho}^{*}_{d_{1}d_{2}}over^ start_ARG italic_ฯ end_ARG start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT can be obtained as the numerical solution to

rd1โขd2subscript๐‘Ÿsubscript๐‘‘1subscript๐‘‘2\displaystyle r_{d_{1}d_{2}}italic_r start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT =ฯโˆ—โข(g1โข(Ud1),g2โข(Ud2);ฯd1โขd2โˆ—)absentsuperscript๐œŒsubscript๐‘”1subscript๐‘ˆsubscript๐‘‘1subscript๐‘”2subscript๐‘ˆsubscript๐‘‘2subscriptsuperscript๐œŒsubscript๐‘‘1subscript๐‘‘2\displaystyle=\rho^{*}(g_{1}(U_{d_{1}}),g_{2}(U_{d_{2}});\rho^{*}_{d_{1}d_{2}})= italic_ฯ start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT ( italic_g start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ( italic_U start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT ) , italic_g start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_U start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT ) ; italic_ฯ start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT ) (13)
=ฯโˆ—โข(Zd1,Zd2;ฯd1โขd2โˆ—),absentsuperscript๐œŒsubscript๐‘subscript๐‘‘1subscript๐‘subscript๐‘‘2subscriptsuperscript๐œŒsubscript๐‘‘1subscript๐‘‘2\displaystyle=\rho^{*}(Z_{d_{1}},Z_{d_{2}};\rho^{*}_{d_{1}d_{2}}),= italic_ฯ start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT ( italic_Z start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT , italic_Z start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT ; italic_ฯ start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT ) ,

where rd1โขd2subscript๐‘Ÿsubscript๐‘‘1subscript๐‘‘2r_{d_{1}d_{2}}italic_r start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT is the sample Spearman correlation between states of the LHMM which is fixed given the data, and ฯโˆ—โข(Zd1,Zd2;ฯd1โขd2โˆ—)superscript๐œŒsubscript๐‘subscript๐‘‘1subscript๐‘subscript๐‘‘2subscriptsuperscript๐œŒsubscript๐‘‘1subscript๐‘‘2\rho^{*}(Z_{d_{1}},Z_{d_{2}};\rho^{*}_{d_{1}d_{2}})italic_ฯ start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT ( italic_Z start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT , italic_Z start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT ; italic_ฯ start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT ) is its population version. Note that it is not possible to invert the relationship in (13) and obtain an analytical expression for ฯ^d1โขd2โˆ—subscriptsuperscript^๐œŒsubscript๐‘‘1subscript๐‘‘2\hat{\rho}^{*}_{d_{1}d_{2}}over^ start_ARG italic_ฯ end_ARG start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT as one perhaps would in a method of moments approach. However, given any value of ฯd1โขd2โˆ—subscriptsuperscript๐œŒsubscript๐‘‘1subscript๐‘‘2\rho^{*}_{d_{1}d_{2}}italic_ฯ start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT it is straightforward to generate data from the MMC and obtain a large sample estimate rd1โขd2โˆ—subscriptsuperscript๐‘Ÿsubscript๐‘‘1subscript๐‘‘2r^{*}_{d_{1}d_{2}}italic_r start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT of ฯโˆ—โข(Zd1,Zd2;ฯd1โขd2โˆ—)superscript๐œŒsubscript๐‘subscript๐‘‘1subscript๐‘subscript๐‘‘2subscriptsuperscript๐œŒsubscript๐‘‘1subscript๐‘‘2\rho^{*}(Z_{d_{1}},Z_{d_{2}};\rho^{*}_{d_{1}d_{2}})italic_ฯ start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT ( italic_Z start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT , italic_Z start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT ; italic_ฯ start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT ). The Spearman correlation is not preserved by this transformation and ฯโˆ—โข(g1โข(Ud1),g2โข(Ud2))โ‰ ฯโˆ—โข(Ud1,Ud2)superscript๐œŒsubscript๐‘”1subscript๐‘ˆsubscript๐‘‘1subscript๐‘”2subscript๐‘ˆsubscript๐‘‘2superscript๐œŒsubscript๐‘ˆsubscript๐‘‘1subscript๐‘ˆsubscript๐‘‘2\rho^{*}(g_{1}(U_{d_{1}}),g_{2}(U_{d_{2}}))\neq\rho^{*}(U_{d_{1}},U_{d_{2}})italic_ฯ start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT ( italic_g start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ( italic_U start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT ) , italic_g start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_U start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT ) ) โ‰  italic_ฯ start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT ( italic_U start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT , italic_U start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT ) except in trivial cases. Majumder (2021) has empirically shown that a monotonically increasing relationship exists between ฯโˆ—โข(g1โข(Ud1),g2โข(Ud2))โขย andย โขฯโˆ—โข(Ud1,Ud2)superscript๐œŒsubscript๐‘”1subscript๐‘ˆsubscript๐‘‘1subscript๐‘”2subscript๐‘ˆsubscript๐‘‘2ย andย superscript๐œŒsubscript๐‘ˆsubscript๐‘‘1subscript๐‘ˆsubscript๐‘‘2\rho^{*}(g_{1}(U_{d_{1}}),g_{2}(U_{d_{2}}))\mbox{ and }\rho^{*}(U_{d_{1}},U_{d% _{2}})italic_ฯ start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT ( italic_g start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ( italic_U start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT ) , italic_g start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_U start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT ) ) and italic_ฯ start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT ( italic_U start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT , italic_U start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT ), and that ฯโˆ—โข(g1โข(Ud1),g2โข(Ud2))<ฯโˆ—โข(Ud1,Ud2)superscript๐œŒsubscript๐‘”1subscript๐‘ˆsubscript๐‘‘1subscript๐‘”2subscript๐‘ˆsubscript๐‘‘2superscript๐œŒsubscript๐‘ˆsubscript๐‘‘1subscript๐‘ˆsubscript๐‘‘2\rho^{*}(g_{1}(U_{d_{1}}),g_{2}(U_{d_{2}}))<\rho^{*}(U_{d_{1}},U_{d_{2}})italic_ฯ start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT ( italic_g start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ( italic_U start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT ) , italic_g start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_U start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT ) ) < italic_ฯ start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT ( italic_U start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT , italic_U start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT ). The inequality is a consequence of g1โข(โ‹…)subscript๐‘”1โ‹…g_{1}(\cdot)italic_g start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ( โ‹… ) and g2โข(โ‹…)subscript๐‘”2โ‹…g_{2}(\cdot)italic_g start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( โ‹… ) discretizing continuous variables Ud1subscript๐‘ˆsubscript๐‘‘1U_{d_{1}}italic_U start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT and Ud2subscript๐‘ˆsubscript๐‘‘2U_{d_{2}}italic_U start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT into Zd1subscript๐‘subscript๐‘‘1Z_{d_{1}}italic_Z start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT and Zd2subscript๐‘subscript๐‘‘2Z_{d_{2}}italic_Z start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT which are ordinal variables with 2 levels and possible ties. This attenuates the maximum and minimum values that the Spearman correlation between the 2 state processes can take. Mhanna and Bauwens (2012) have also demonstrated similar behaviour using empirical studies when Uniform variables are discretized to Bernoulli variables. The monotone relationship between ฯโˆ—โข(g1โข(Ud1),g2โข(Ud2))โขย andย โขฯโˆ—โข(Ud1,Ud2)superscript๐œŒsubscript๐‘”1subscript๐‘ˆsubscript๐‘‘1subscript๐‘”2subscript๐‘ˆsubscript๐‘‘2ย andย superscript๐œŒsubscript๐‘ˆsubscript๐‘‘1subscript๐‘ˆsubscript๐‘‘2\rho^{*}(g_{1}(U_{d_{1}}),g_{2}(U_{d_{2}}))\mbox{ and }\rho^{*}(U_{d_{1}},U_{d% _{2}})italic_ฯ start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT ( italic_g start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ( italic_U start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT ) , italic_g start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_U start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT ) ) and italic_ฯ start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT ( italic_U start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT , italic_U start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT ) means that for a given target value of rd1โขd2subscript๐‘Ÿsubscript๐‘‘1subscript๐‘‘2r_{d_{1}d_{2}}italic_r start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT, it is possible to use a line search to identify the value of ฯd1โขd2โˆ—subscriptsuperscript๐œŒsubscript๐‘‘1subscript๐‘‘2\rho^{*}_{d_{1}d_{2}}italic_ฯ start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT which generates states with a sample Spearman correlation of rd1โขd2โˆ—subscriptsuperscript๐‘Ÿsubscript๐‘‘1subscript๐‘‘2r^{*}_{d_{1}d_{2}}italic_r start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT arbitrarily close to rd1โขd2subscript๐‘Ÿsubscript๐‘‘1subscript๐‘‘2r_{d_{1}d_{2}}italic_r start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT. The Dโข(Dโˆ’1)/2๐ท๐ท12D(D-1)/2italic_D ( italic_D - 1 ) / 2 unique elements of ฮฃฮฃ\Sigmaroman_ฮฃ can thus be estimated using pairs of state sequences.

2.4 Algorithm to estimate Gaussian copula parameters

Recall that for the LHMM, The states for each sectorโ€™s HMM are obtained using the Viterbi algorithm once the marginal parameters have been estimated. Let {rd1โขd2}subscript๐‘Ÿsubscript๐‘‘1subscript๐‘‘2\{r_{d_{1}d_{2}}\}{ italic_r start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT } denote the observed Spearman correlations between the states of each (d1,d2)โˆˆ๐’Ÿ2subscript๐‘‘1subscript๐‘‘2superscript๐’Ÿ2(d_{1},d_{2})\in\mathcal{D}^{2}( italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ) โˆˆ caligraphic_D start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT pair of the D๐ทDitalic_D component HMMs. This value is fixed given the marginal models and the data. Given the nร—D๐‘›๐ทn\times Ditalic_n ร— italic_D matrix of states, the initial distribution ๐œถdsubscript๐œถ๐‘‘\boldsymbol{\alpha}_{d}bold_italic_ฮฑ start_POSTSUBSCRIPT italic_d end_POSTSUBSCRIPT, and the transition matrix ๐šทdsubscript๐šท๐‘‘\mathbf{\Pi}_{d}bold_ฮ  start_POSTSUBSCRIPT italic_d end_POSTSUBSCRIPT for each Zdsubscript๐‘๐‘‘Z_{d}italic_Z start_POSTSUBSCRIPT italic_d end_POSTSUBSCRIPT, we want to construct a Gaussian copula that can generate an MMC with pairwise Spearman correlations rd1โขd2โˆ—subscriptsuperscript๐‘Ÿsubscript๐‘‘1subscript๐‘‘2r^{*}_{d_{1}d_{2}}italic_r start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT coinciding with {rd1โขd2}subscript๐‘Ÿsubscript๐‘‘1subscript๐‘‘2\{r_{d_{1}d_{2}}\}{ italic_r start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT }. Let ฯ^d1โขd2subscript^๐œŒsubscript๐‘‘1subscript๐‘‘2\hat{\rho}_{d_{1}d_{2}}over^ start_ARG italic_ฯ end_ARG start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT be the estimate of the copula correlation in (11) between (Wd1,Wd2)subscript๐‘Šsubscript๐‘‘1subscript๐‘Šsubscript๐‘‘2(W_{d_{1}},W_{d_{2}})( italic_W start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT , italic_W start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT ), and let ฯ^d1โขd2โˆ—superscriptsubscript^๐œŒsubscript๐‘‘1subscript๐‘‘2\hat{\rho}_{d_{1}d_{2}}^{*}over^ start_ARG italic_ฯ end_ARG start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT be the corresponding estimate of the Spearman correlation using (12). Since (13) cannot be rewritten as a function of ฯd1โขd2โˆ—subscriptsuperscript๐œŒsubscript๐‘‘1subscript๐‘‘2\rho^{*}_{d_{1}d_{2}}italic_ฯ start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT, we resort to a simulation approach to compute ฯ^d1โขd2โˆ—superscriptsubscript^๐œŒsubscript๐‘‘1subscript๐‘‘2\hat{\rho}_{d_{1}d_{2}}^{*}over^ start_ARG italic_ฯ end_ARG start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT and ฯ^d1โขd2subscript^๐œŒsubscript๐‘‘1subscript๐‘‘2\hat{\rho}_{d_{1}d_{2}}over^ start_ARG italic_ฯ end_ARG start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT. We initialize ฯ^d1โขd2โˆ—superscriptsubscript^๐œŒsubscript๐‘‘1subscript๐‘‘2\hat{\rho}_{d_{1}d_{2}}^{*}over^ start_ARG italic_ฯ end_ARG start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT with rd1โขd2subscript๐‘Ÿsubscript๐‘‘1subscript๐‘‘2r_{d_{1}d_{2}}italic_r start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT for each pair of Markov chains (Zd1,Zd2)subscript๐‘subscript๐‘‘1subscript๐‘subscript๐‘‘2(Z_{d_{1}},Z_{d_{2}})( italic_Z start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT , italic_Z start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT ) and simulate an MMC from the Gaussian copula. We compute the pairwise Spearman correlations between the Markov chains in the MMC and denote them by rd1โขd2โˆ—superscriptsubscript๐‘Ÿsubscript๐‘‘1subscript๐‘‘2r_{d_{1}d_{2}}^{*}italic_r start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT. If rd1โขd2โˆ—<rd1โขd2superscriptsubscript๐‘Ÿsubscript๐‘‘1subscript๐‘‘2subscript๐‘Ÿsubscript๐‘‘1subscript๐‘‘2r_{d_{1}d_{2}}^{*}<r_{d_{1}d_{2}}italic_r start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT < italic_r start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT, we increment ฯ^d1โขd2โˆ—superscriptsubscript^๐œŒsubscript๐‘‘1subscript๐‘‘2\hat{\rho}_{d_{1}d_{2}}^{*}over^ start_ARG italic_ฯ end_ARG start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT by a step size ฯ„๐œ\tauitalic_ฯ„ and repeat the process. We stop when |rd1โขd2โˆ—โˆ’rd1โขd2|โ‰คฯตsuperscriptsubscript๐‘Ÿsubscript๐‘‘1subscript๐‘‘2subscript๐‘Ÿsubscript๐‘‘1subscript๐‘‘2italic-ฯต|r_{d_{1}d_{2}}^{*}-r_{d_{1}d_{2}}|\leq\epsilon| italic_r start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT - italic_r start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT | โ‰ค italic_ฯต, for some predefined tolerance ฯตitalic-ฯต\epsilonitalic_ฯต. The procedure is formalized in Algorithm 1 below.

Segment y1:Ksubscript๐‘ฆ:1๐พy_{1:K}italic_y start_POSTSUBSCRIPT 1 : italic_K end_POSTSUBSCRIPT into its D๐ทDitalic_D sectors according to S&P 500
Estimate marginal HMM parameters ๐œถdsubscript๐œถ๐‘‘\boldsymbol{\alpha}_{d}bold_italic_ฮฑ start_POSTSUBSCRIPT italic_d end_POSTSUBSCRIPT, ๐šทdsubscript๐šท๐‘‘\mathbf{\Pi}_{d}bold_ฮ  start_POSTSUBSCRIPT italic_d end_POSTSUBSCRIPT, and ๐œฝdsubscript๐œฝ๐‘‘\boldsymbol{\theta}_{d}bold_italic_ฮธ start_POSTSUBSCRIPT italic_d end_POSTSUBSCRIPT for sectors d=1,โ€ฆ,D๐‘‘1โ€ฆ๐ทd=1,\ldots,Ditalic_d = 1 , โ€ฆ , italic_D using the Baum-Welch algorithm
Estimate Zd,1,โ€ฆโขZd,nsubscript๐‘๐‘‘1โ€ฆsubscript๐‘๐‘‘๐‘›Z_{d,1},\ldots Z_{d,n}italic_Z start_POSTSUBSCRIPT italic_d , 1 end_POSTSUBSCRIPT , โ€ฆ italic_Z start_POSTSUBSCRIPT italic_d , italic_n end_POSTSUBSCRIPT using the Viterbi algorithm for sectors d=1,โ€ฆ,D๐‘‘1โ€ฆ๐ทd=1,\ldots,Ditalic_d = 1 , โ€ฆ , italic_D
Set step size ฯ„๐œ\tauitalic_ฯ„ and tolerance ฯตitalic-ฯต\epsilonitalic_ฯต
forย sectors (d1,d2)โˆ‹d1=1,โ€ฆ,Dโˆ’1formulae-sequencecontainssubscript๐‘‘1subscript๐‘‘2subscript๐‘‘11โ€ฆ๐ท1(d_{1},d_{2})\ni d_{1}=1,\ldots,D-1( italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ) โˆ‹ italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT = 1 , โ€ฆ , italic_D - 1 and d2=d1+1,โ€ฆ,Dsubscript๐‘‘2subscript๐‘‘11โ€ฆ๐ทd_{2}=d_{1}+1,\ldots,Ditalic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT = italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT + 1 , โ€ฆ , italic_D ย do
ย ย ย ย ย ย  Compute the observed Spearman correlation rd1โขd2subscript๐‘Ÿsubscript๐‘‘1subscript๐‘‘2r_{d_{1}d_{2}}italic_r start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT as in (13)
ย ย ย ย ย ย  Initialize ฯ^d1โขd2โˆ—=rd1โขd2superscriptsubscript^๐œŒsubscript๐‘‘1subscript๐‘‘2subscript๐‘Ÿsubscript๐‘‘1subscript๐‘‘2\hat{\rho}_{d_{1}d_{2}}^{*}=r_{d_{1}d_{2}}over^ start_ARG italic_ฯ end_ARG start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT = italic_r start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT
ย ย ย ย ย ย  Initialize rd1โขd2โˆ—=0superscriptsubscript๐‘Ÿsubscript๐‘‘1subscript๐‘‘20r_{d_{1}d_{2}}^{*}=0italic_r start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT = 0
ย ย ย ย ย ย  whileย  |rd1โขd2โˆ—โˆ’rd1โขd2|>ฯต,superscriptsubscript๐‘Ÿsubscript๐‘‘1subscript๐‘‘2subscript๐‘Ÿsubscript๐‘‘1subscript๐‘‘2italic-ฯต|r_{d_{1}d_{2}}^{*}-r_{d_{1}d_{2}}|>\epsilon,| italic_r start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT - italic_r start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT | > italic_ฯต ,ย do
ย ย ย ย ย ย ย ย ย ย ย ย  Increment ฯ^d1โขd2โˆ—superscriptsubscript^๐œŒsubscript๐‘‘1subscript๐‘‘2\hat{\rho}_{d_{1}d_{2}}^{*}over^ start_ARG italic_ฯ end_ARG start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT by ฯ„๐œ\tauitalic_ฯ„
ย ย ย ย ย ย ย ย ย ย ย ย  Compute Pearson correlation ฯ^d1โขd2subscript^๐œŒsubscript๐‘‘1subscript๐‘‘2\hat{\rho}_{d_{1}d_{2}}over^ start_ARG italic_ฯ end_ARG start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT from ฯ^d1โขd2โˆ—superscriptsubscript^๐œŒsubscript๐‘‘1subscript๐‘‘2\hat{\rho}_{d_{1}d_{2}}^{*}over^ start_ARG italic_ฯ end_ARG start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT using (12)
ย ย ย ย ย ย ย ย ย ย ย ย  Generate correlated bivariate sequence from N2โข((00),(1ฯ^d1โขd2ฯ^d1โขd21))subscript๐‘2matrix00matrix1subscript^๐œŒsubscript๐‘‘1subscript๐‘‘2subscript^๐œŒsubscript๐‘‘1subscript๐‘‘21N_{2}\biggl{(}\begin{pmatrix}0\\ 0\end{pmatrix},\begin{pmatrix}1&\hat{\rho}_{d_{1}d_{2}}\\ \hat{\rho}_{d_{1}d_{2}}&1\end{pmatrix}\biggr{)}italic_N start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( ( start_ARG start_ROW start_CELL 0 end_CELL end_ROW start_ROW start_CELL 0 end_CELL end_ROW end_ARG ) , ( start_ARG start_ROW start_CELL 1 end_CELL start_CELL over^ start_ARG italic_ฯ end_ARG start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT end_CELL end_ROW start_ROW start_CELL over^ start_ARG italic_ฯ end_ARG start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT end_CELL start_CELL 1 end_CELL end_ROW end_ARG ) )
ย ย ย ย ย ย ย ย ย ย ย ย  Use estimates of ๐œถd2subscript๐œถsubscript๐‘‘2\boldsymbol{\alpha}_{d_{2}}bold_italic_ฮฑ start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT, ๐œถd2subscript๐œถsubscript๐‘‘2\boldsymbol{\alpha}_{d_{2}}bold_italic_ฮฑ start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT, ๐šทd1subscript๐šทsubscript๐‘‘1\mathbf{\Pi}_{d_{1}}bold_ฮ  start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT, ๐šทd2subscript๐šทsubscript๐‘‘2\mathbf{\Pi}_{d_{2}}bold_ฮ  start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT, and the correlated sequences to generate synthetic states
ย ย ย ย ย ย ย ย ย ย ย ย  Calculate Spearman correlation rd1โขd2โˆ—superscriptsubscript๐‘Ÿsubscript๐‘‘1subscript๐‘‘2r_{d_{1}d_{2}}^{*}italic_r start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT of the synthetic states as an estimate of ฯโˆ—โข(Zd1,Zd2;ฯd1โขd2โˆ—)superscript๐œŒsubscript๐‘subscript๐‘‘1subscript๐‘subscript๐‘‘2subscriptsuperscript๐œŒsubscript๐‘‘1subscript๐‘‘2\rho^{*}(Z_{d_{1}},Z_{d_{2}};\rho^{*}_{d_{1}d_{2}})italic_ฯ start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT ( italic_Z start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT , italic_Z start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT ; italic_ฯ start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT ) as in (13)
ย ย ย ย ย ย  end while
ย ย ย ย ย ย 
end for
Construct correlation matrix ฮฃ^^ฮฃ\hat{\Sigma}over^ start_ARG roman_ฮฃ end_ARG with off-diagonals ฯ^d1โขd2subscript^๐œŒsubscript๐‘‘1subscript๐‘‘2\hat{\rho}_{d_{1}d_{2}}over^ start_ARG italic_ฯ end_ARG start_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT italic_d start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT and diagonals set to 1
ifย ฮฃ^^ฮฃ\hat{\Sigma}over^ start_ARG roman_ฮฃ end_ARG is not positive definiteย then
ย ย ย ย ย ย  Eigendecompose ฮฃ^^ฮฃ\hat{\Sigma}over^ start_ARG roman_ฮฃ end_ARG as ฮฃ^=VโขRโขVT^ฮฃ๐‘‰๐‘…superscript๐‘‰๐‘‡\hat{\Sigma}=VRV^{T}over^ start_ARG roman_ฮฃ end_ARG = italic_V italic_R italic_V start_POSTSUPERSCRIPT italic_T end_POSTSUPERSCRIPT
ย ย ย ย ย ย  Replace negative and zero eigenvalues in R๐‘…Ritalic_R with 10โˆ’6superscript10610^{-6}10 start_POSTSUPERSCRIPT - 6 end_POSTSUPERSCRIPT; call new matrix Rโˆ—superscript๐‘…R^{*}italic_R start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT
ย ย ย ย ย ย  Recalculate ฮฃ^=VโขRโˆ—โขVT^ฮฃ๐‘‰superscript๐‘…superscript๐‘‰๐‘‡\hat{\Sigma}=VR^{*}V^{T}over^ start_ARG roman_ฮฃ end_ARG = italic_V italic_R start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT italic_V start_POSTSUPERSCRIPT italic_T end_POSTSUPERSCRIPT
end if
Algorithmย 1 Algorithm to construct a Gaussian copula for an LHMM.

Since the entries of ฮฃ^^ฮฃ\hat{\Sigma}over^ start_ARG roman_ฮฃ end_ARG are constructed independently, the resultant matrix is not guaranteed to be positive definite. The final steps of our algorithm ensures the positive-definiteness of ฮฃ^^ฮฃ\hat{\Sigma}over^ start_ARG roman_ฮฃ end_ARG. An alternative approach suggested by one of the anonymous referees is to add a similar small positive quantity to all diagonal elements of ฮฃฮฃ\Sigmaroman_ฮฃ. In cases when ฮฃฮฃ\Sigmaroman_ฮฃ is high-dimensional and the eigendecomposition is computationally expensive, this would be a much faster way of ensuring the positive definiteness of ฮฃฮฃ\Sigmaroman_ฮฃ.

After ฮฃฮฃ\Sigmaroman_ฮฃ has been estimated, we can use the correlation structure to re-estimate the marginal parameters ๐œถdsubscript๐œถ๐‘‘\boldsymbol{\alpha}_{d}bold_italic_ฮฑ start_POSTSUBSCRIPT italic_d end_POSTSUBSCRIPT, ๐šทdsubscript๐šท๐‘‘\mathbf{\Pi}_{d}bold_ฮ  start_POSTSUBSCRIPT italic_d end_POSTSUBSCRIPT, and ๐œฝdsubscript๐œฝ๐‘‘\boldsymbol{\theta}_{d}bold_italic_ฮธ start_POSTSUBSCRIPT italic_d end_POSTSUBSCRIPT. One way of doing so is generating a sequence of states from the MMC and use the states as initial values in the Baum-Welch algorithm. Alternatively, we can re-estimate ๐œถdsubscript๐œถ๐‘‘\boldsymbol{\alpha}_{d}bold_italic_ฮฑ start_POSTSUBSCRIPT italic_d end_POSTSUBSCRIPT and ๐šทdsubscript๐šท๐‘‘\mathbf{\Pi}_{d}bold_ฮ  start_POSTSUBSCRIPT italic_d end_POSTSUBSCRIPT for all sectors from synthetic states generated from the MMC, and use the estimates as the initial distributions in the Baum-Welch algorithm to restimate all marginal parameters. For this study, we have followed the second approach.

3 Stock Portfolio Selection using an LHMM

The return of the k๐‘˜kitalic_kth stock over n๐‘›nitalic_n weeks is defined as follows,

Rk=โˆt=1n(1+Yk,t).subscript๐‘…๐‘˜subscriptsuperscriptproduct๐‘›๐‘ก11subscript๐‘Œ๐‘˜๐‘กR_{k}=\prod^{n}_{t=1}(1+Y_{k,t}).italic_R start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT = โˆ start_POSTSUPERSCRIPT italic_n end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_t = 1 end_POSTSUBSCRIPT ( 1 + italic_Y start_POSTSUBSCRIPT italic_k , italic_t end_POSTSUBSCRIPT ) . (14)

Our desired portfolio generates a high return with a low risk over a period of time, so we seek stocks with these characteristics as well. To evaluate each of the stocks, we use the random variable Rksubscript๐‘…๐‘˜R_{k}italic_R start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT. Given a portfolio of K๐พKitalic_K stocks with allocations ๐’˜=(w1,โ€ฆ,wK)๐’˜subscript๐‘ค1โ€ฆsubscript๐‘ค๐พ\boldsymbol{w}=(w_{1},\ldots,w_{K})bold_italic_w = ( italic_w start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , โ€ฆ , italic_w start_POSTSUBSCRIPT italic_K end_POSTSUBSCRIPT ), its return over n๐‘›nitalic_n weeks is defined as,

Rโข(w1,w2,โ€ฆ,wK)=โˆ‘k=1KwkโขRk,๐‘…subscript๐‘ค1subscript๐‘ค2โ€ฆsubscript๐‘ค๐พsubscriptsuperscript๐พ๐‘˜1subscript๐‘ค๐‘˜subscript๐‘…๐‘˜R(w_{1},w_{2},\ldots,w_{K})=\sum^{K}_{k=1}w_{k}R_{k},italic_R ( italic_w start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , italic_w start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT , โ€ฆ , italic_w start_POSTSUBSCRIPT italic_K end_POSTSUBSCRIPT ) = โˆ‘ start_POSTSUPERSCRIPT italic_K end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_k = 1 end_POSTSUBSCRIPT italic_w start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT italic_R start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT , (15)

where the weight wksubscript๐‘ค๐‘˜w_{k}italic_w start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT represents the proportion of the portfolio wealth invested in the k๐‘˜kitalic_kth stock. Thus, the expected return of a portfolio is given by

Eโข(R)=โˆ‘k=1KwkโขEโข(Rk).๐ธ๐‘…subscriptsuperscript๐พ๐‘˜1subscript๐‘ค๐‘˜๐ธsubscript๐‘…๐‘˜E(R)=\sum^{K}_{k=1}w_{k}E(R_{k}).italic_E ( italic_R ) = โˆ‘ start_POSTSUPERSCRIPT italic_K end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_k = 1 end_POSTSUBSCRIPT italic_w start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT italic_E ( italic_R start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT ) . (16)

The variance of return is given by,

Vโข(R)=โˆ‘k=1Kwk2โขVarโข(Rk)+โˆ‘k=1Kโˆ‘lโ‰ kKwkโขwlโขCovโข(Rk,Rl)๐‘‰๐‘…subscriptsuperscript๐พ๐‘˜1superscriptsubscript๐‘ค๐‘˜2Varsubscript๐‘…๐‘˜subscriptsuperscript๐พ๐‘˜1subscriptsuperscript๐พ๐‘™๐‘˜subscript๐‘ค๐‘˜subscript๐‘ค๐‘™Covsubscript๐‘…๐‘˜subscript๐‘…๐‘™V(R)=\sum^{K}_{k=1}w_{k}^{2}\mathrm{Var}(R_{k})+\sum^{K}_{k=1}\sum^{K}_{l\neq k% }w_{k}w_{l}\mathrm{Cov}(R_{k},R_{l})italic_V ( italic_R ) = โˆ‘ start_POSTSUPERSCRIPT italic_K end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_k = 1 end_POSTSUBSCRIPT italic_w start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT roman_Var ( italic_R start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT ) + โˆ‘ start_POSTSUPERSCRIPT italic_K end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_k = 1 end_POSTSUBSCRIPT โˆ‘ start_POSTSUPERSCRIPT italic_K end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_l โ‰  italic_k end_POSTSUBSCRIPT italic_w start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT italic_w start_POSTSUBSCRIPT italic_l end_POSTSUBSCRIPT roman_Cov ( italic_R start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT , italic_R start_POSTSUBSCRIPT italic_l end_POSTSUBSCRIPT ) (17)

The goal of portfolio selection in this paper is to find the optimal allocation ๐’˜=(w1,โ€ฆ,wk)๐’˜subscript๐‘ค1โ€ฆsubscript๐‘ค๐‘˜\boldsymbol{w}=(w_{1},\ldots,w_{k})bold_italic_w = ( italic_w start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , โ€ฆ , italic_w start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT ) with high reward Eโข(R)๐ธ๐‘…E(R)italic_E ( italic_R ) and relatively low risk Vโข(R)๐‘‰๐‘…V(R)italic_V ( italic_R ) based on the results above. The optimal ๐’˜๐’˜\boldsymbol{w}bold_italic_w would maximize Eโข(R)๐ธ๐‘…E(R)italic_E ( italic_R ) while minimizing Vโข(R)๐‘‰๐‘…V(R)italic_V ( italic_R ). However, empirical evidence suggests that there exists a trade-off between Eโข(R)๐ธ๐‘…E(R)italic_E ( italic_R ) and Vโข(R)๐‘‰๐‘…V(R)italic_V ( italic_R ) (Malkiel, 2019, p.ย 200). The most conservative approach would be to choose ๐’˜๐’˜\boldsymbol{w}bold_italic_w such that Vโข(R)๐‘‰๐‘…V(R)italic_V ( italic_R ) is minimized, i.e.,

๐’˜v=argโกmin๐’˜โกVโข(R)โข, subject toย โขEโข(R)>0โขย andย โขโˆ‘k=1Kwk=1.subscript๐’˜๐‘ฃsubscript๐’˜๐‘‰๐‘…, subject toย ๐ธ๐‘…0ย andย subscriptsuperscript๐พ๐‘˜1subscript๐‘ค๐‘˜1\displaystyle\boldsymbol{w}_{v}=\arg\min_{\boldsymbol{w}}V(R)\text{, subject % to }E(R)>0\text{ and }\sum^{K}_{k=1}w_{k}=1.bold_italic_w start_POSTSUBSCRIPT italic_v end_POSTSUBSCRIPT = roman_arg roman_min start_POSTSUBSCRIPT bold_italic_w end_POSTSUBSCRIPT italic_V ( italic_R ) , subject to italic_E ( italic_R ) > 0 and โˆ‘ start_POSTSUPERSCRIPT italic_K end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_k = 1 end_POSTSUBSCRIPT italic_w start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT = 1 . (18)

Alternatively, Malkiel (2019) suggested that an optimal weight vector ๐’˜โˆ—superscript๐’˜\boldsymbol{w}^{*}bold_italic_w start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT should maximizes Eโข(R)๐ธ๐‘…E(R)italic_E ( italic_R ) while Vโข(R)=v๐‘‰๐‘…๐‘ฃV(R)=vitalic_V ( italic_R ) = italic_v,

๐’˜โˆ—โข(v)=argโกmax๐’˜โกEโข(R)โข, subject toย โขVโข(R)=vโขย andย โขโˆ‘k=1Kwk=1.superscript๐’˜๐‘ฃsubscript๐’˜๐ธ๐‘…, subject toย ๐‘‰๐‘…๐‘ฃย andย subscriptsuperscript๐พ๐‘˜1subscript๐‘ค๐‘˜1\boldsymbol{w}^{*}(v)=\arg\max_{\boldsymbol{w}}E(R)\text{, subject to }V(R)=v% \text{ and }\sum^{K}_{k=1}w_{k}=1.bold_italic_w start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT ( italic_v ) = roman_arg roman_max start_POSTSUBSCRIPT bold_italic_w end_POSTSUBSCRIPT italic_E ( italic_R ) , subject to italic_V ( italic_R ) = italic_v and โˆ‘ start_POSTSUPERSCRIPT italic_K end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_k = 1 end_POSTSUBSCRIPT italic_w start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT = 1 .

The Lagrange multiplier method is used to find optimal allocations. The pairs of Eโข{Rโข(๐’˜โˆ—โข(v))}๐ธ๐‘…superscript๐’˜๐‘ฃE\{R\left(\boldsymbol{w}^{*}(v)\right)\}italic_E { italic_R ( bold_italic_w start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT ( italic_v ) ) } and v๐‘ฃvitalic_v are referred to as the efficient (R๐‘…Ritalic_R, V๐‘‰Vitalic_V) combinations by Markowitz (1952). He claimed that a portfolio created based on an efficient combination is efficient, but did not suggest a specific combination to balance the reward and the risk. Ji and Neerchal (2019) suggested the following approach to find a vector of weights ๐’˜bsubscript๐’˜๐‘\boldsymbol{w}_{b}bold_italic_w start_POSTSUBSCRIPT italic_b end_POSTSUBSCRIPT for a balanced portfolio,

๐’˜b=argโกmax๐’˜โกEโข(R)โˆ’qโขVโข(R)โข, subject toย โขโˆ‘k=1Kwk=1.subscript๐’˜๐‘subscript๐’˜๐ธ๐‘…๐‘ž๐‘‰๐‘…, subject toย subscriptsuperscript๐พ๐‘˜1subscript๐‘ค๐‘˜1\boldsymbol{w}_{b}=\arg\max_{\boldsymbol{w}}E(R)-q\sqrt{V(R)}\text{, subject % to }\sum^{K}_{k=1}w_{k}=1.bold_italic_w start_POSTSUBSCRIPT italic_b end_POSTSUBSCRIPT = roman_arg roman_max start_POSTSUBSCRIPT bold_italic_w end_POSTSUBSCRIPT italic_E ( italic_R ) - italic_q square-root start_ARG italic_V ( italic_R ) end_ARG , subject to โˆ‘ start_POSTSUPERSCRIPT italic_K end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_k = 1 end_POSTSUBSCRIPT italic_w start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT = 1 .

In this expression, q๐‘žqitalic_q functions as a tuning parameter which controls the trade-off between reward and risk. A similar technique was also implemented in Elliott and vanย der Hoek (1997). Assuming R๐‘…Ritalic_R is approximately Normal, this technique maximizes the lower bound of a 95%percent9595\%95 % confidence interval of the return of a portfolio. As q๐‘žqitalic_q gets higher in value, the resulting portfolio would accept less risk and prioritize more stable stocks. As q๐‘žqitalic_q gets lower in value (qโ‰ฅ0๐‘ž0q\geq 0italic_q โ‰ฅ 0), the portfolio would select stocks with higher return despite their higher volatility. The choice of q๐‘žqitalic_q is based on an investorโ€™s willingness to take risk. For the rest of the paper, we will assume q=2๐‘ž2q=2italic_q = 2.

In practice, the stocks Yksubscript๐‘Œ๐‘˜Y_{k}italic_Y start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT, for k=1,โ€ฆ,K๐‘˜1โ€ฆ๐พk=1,\ldots,Kitalic_k = 1 , โ€ฆ , italic_K will not be Normally distributed. We can transform them to Normal variates Ykโˆ—subscriptsuperscript๐‘Œ๐‘˜Y^{*}_{k}italic_Y start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT using the Yeo-Johnson power transformation (Yeo and Johnson, 2000), and fit HMMs on the transformed variables Ykโˆ—superscriptsubscript๐‘Œ๐‘˜Y_{k}^{*}italic_Y start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT. While analytical expressions analogous to Eโข(R)๐ธ๐‘…E(R)italic_E ( italic_R ) and Vโข(R)๐‘‰๐‘…V(R)italic_V ( italic_R ) can be constructed based on Ykโˆ—superscriptsubscript๐‘Œ๐‘˜Y_{k}^{*}italic_Y start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT, the quantities Eโข(Rโˆ—)๐ธsuperscript๐‘…E(R^{*})italic_E ( italic_R start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT ) and Vโข(Rโˆ—)๐‘‰superscript๐‘…V(R^{*})italic_V ( italic_R start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT ) do not have any meaningful interpretations. However, since we can generate data from the fitted LHMM, a simulation based approach allows us to recover data in the original scale.

Consider an LHMM fitted to the transformed stock returns ๐˜โˆ—=(Y1โˆ—,โ€ฆ,YKโˆ—)superscript๐˜superscriptsubscript๐‘Œ1โ€ฆsuperscriptsubscript๐‘Œ๐พ\mathbf{Y}^{*}=(Y_{1}^{*},\ldots,Y_{K}^{*})bold_Y start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT = ( italic_Y start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT , โ€ฆ , italic_Y start_POSTSUBSCRIPT italic_K end_POSTSUBSCRIPT start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT ) using the methodology described in Algorithm 1. We can simulate data from this model - let us denote this simulated data by ๐˜^โˆ—=(Y^1โˆ—,โ€ฆ,Y^Kโˆ—)superscript^๐˜superscriptsubscript^๐‘Œ1โ€ฆsuperscriptsubscript^๐‘Œ๐พ\widehat{\mathbf{Y}}^{*}=(\widehat{Y}_{1}^{*},\ldots,\widehat{Y}_{K}^{*})over^ start_ARG bold_Y end_ARG start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT = ( over^ start_ARG italic_Y end_ARG start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT , โ€ฆ , over^ start_ARG italic_Y end_ARG start_POSTSUBSCRIPT italic_K end_POSTSUBSCRIPT start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT ). Since Y^kโˆ—superscriptsubscript^๐‘Œ๐‘˜\widehat{Y}_{k}^{*}over^ start_ARG italic_Y end_ARG start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT has the same distribution as Ykโˆ—superscriptsubscript๐‘Œ๐‘˜Y_{k}^{*}italic_Y start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT, we use the inverse of the Yeo-Johnson transform to recover Y^ksubscript^๐‘Œ๐‘˜\hat{Y}_{k}over^ start_ARG italic_Y end_ARG start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT for k=1,โ€ฆ,K๐‘˜1โ€ฆ๐พk=1,\ldots,Kitalic_k = 1 , โ€ฆ , italic_K. Y^ksubscript^๐‘Œ๐‘˜\widehat{Y}_{k}over^ start_ARG italic_Y end_ARG start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT are simulated stock price changes, and thus we can estimate R^ksubscript^๐‘…๐‘˜\hat{R}_{k}over^ start_ARG italic_R end_ARG start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT from this data using (14). If we simulate a large number of independent datasets from the fitted model, say N๐‘Nitalic_N, we have for the k๐‘˜kitalic_kth stock N๐‘Nitalic_N independent annual return samples Rk1,โ€ฆ,RkNsuperscriptsubscript๐‘…๐‘˜1โ€ฆsuperscriptsubscript๐‘…๐‘˜๐‘R_{k}^{1},\ldots,R_{k}^{N}italic_R start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT start_POSTSUPERSCRIPT 1 end_POSTSUPERSCRIPT , โ€ฆ , italic_R start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_N end_POSTSUPERSCRIPT. The vector of expectations Eโข(R)๐ธ๐‘…E(R)italic_E ( italic_R ) and the covariance matrix Vโข(R)๐‘‰๐‘…V(R)italic_V ( italic_R ) can be computed from this data, and can be used for portfolio optimization.

4 Building a Portfolio for 2016โ€“17 from S&P 500 Data

Table 1: S&P 500 stocks per sector used to fit an LHMM using data from 2011-10-01 to 2016-09-30.
Sector Number of Stocks
Communication Services 8
Consumer Discretionary 69
Consumer Staples 32
Energy 28
Financials 67
Health Care 43
Industrials 69
Information Technology 45
Materials 40
Real Estate 10
Telecommunications 7
Utilities 29
Total 447

We fit an LHMM to historical S&P 500 data to create a portfolio for 2016โ€“17 and evaluate its performance against the S&P 500 index changes. As described in Section 3, the parameters of the LHMM are used to identify efficient (R,V)๐‘…๐‘‰(R,V)( italic_R , italic_V ) combinations and use the associated weights to create a portfolio. Historical data for S&P 500 stocks from 2011-10-01 to 2016-09-30 is used to build an LHMM with 12 Markov chains corresponding to the 12 sectors represented in the data. Stocks with records of fewer than 5 years are ignored; this leaves us with 447 stocks for the study, i.e., K=447๐พ447K=447italic_K = 447.

Table 1 shows the number of stocks available per sector that were used to fit the LHMM. The weekly stock price changes ๐˜๐˜\mathbf{Y}bold_Y were made to undergo the Yeo-Johnson power transformation; the resulting variable ๐˜โˆ—superscript๐˜\mathbf{Y}^{*}bold_Y start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT is Normally distributed and thus meets the distributional assumptions for the LHMM. The HMMs were fitted using the packages depmixS4 (Visser and Speekenbrink, 2010) and hmmr (Visser and Speekenbrink, 2019) on R 4.0.x. For each sector, the B-W algorithm was restarted 20 times with random starting values. Parameter estimates from each of the 20 random restarts were compared on the basis of their Bayesian information criterion (BIC), with lower BIC values corresponding to higher likelihoods. The model which provided the lowest BIC values was chosen as the final model for each sector.

Once HMMs have been fitted to each sectorโ€™s data, the most likely sequence of states was obtained using the Viterbi algorithm. The states were labeled such that State 1 is the bear state for each HMM and State 2 is the bull state, and the target Spearman correlation matrix was computed based on each pair of state processes. Next, a Gaussian copula which can generate synthetic states with the same Spearman correlation was constructed using Algorithmย 1. Synthetic state sequences from the copula as used to re-estimate ๐œถdsubscript๐œถ๐‘‘\boldsymbol{\alpha}_{d}bold_italic_ฮฑ start_POSTSUBSCRIPT italic_d end_POSTSUBSCRIPT, ๐šทdsubscript๐šท๐‘‘\mathbf{\Pi}_{d}bold_ฮ  start_POSTSUBSCRIPT italic_d end_POSTSUBSCRIPT, and ๐œฝ๐’…subscript๐œฝ๐’…\boldsymbol{\theta_{d}}bold_italic_ฮธ start_POSTSUBSCRIPT bold_italic_d end_POSTSUBSCRIPT for d=1,โ€ฆ,D๐‘‘1โ€ฆ๐ทd=1,\ldots,Ditalic_d = 1 , โ€ฆ , italic_D; these estimates now take into account the correlation structure between Z1,โ€ฆ,ZDsubscript๐‘1โ€ฆsubscript๐‘๐ทZ_{1},\ldots,Z_{D}italic_Z start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , โ€ฆ , italic_Z start_POSTSUBSCRIPT italic_D end_POSTSUBSCRIPT.

Once all LHMM parameters have been estimated, 10000 datasets of 5 years (n=260๐‘›260n=260italic_n = 260 weeks) each were simulated from this fitted model, and the emissions ๐˜^โˆ—superscript^๐˜\hat{\mathbf{Y}}^{*}over^ start_ARG bold_Y end_ARG start_POSTSUPERSCRIPT โˆ— end_POSTSUPERSCRIPT of the simulated data were transformed back to their original scale ๐˜^^๐˜\hat{\mathbf{Y}}over^ start_ARG bold_Y end_ARG using the inverse of the Yeo-Johnson transformation. The gains Rkisuperscriptsubscript๐‘…๐‘˜๐‘–R_{k}^{i}italic_R start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT are computed for the k=1,โ€ฆ,447๐‘˜1โ€ฆ447k=1,\ldots,447italic_k = 1 , โ€ฆ , 447 stocks for the i=1,โ€ฆ,10000๐‘–1โ€ฆ10000i=1,\ldots,10000italic_i = 1 , โ€ฆ , 10000 datasets. This gives us a 10000ร—4471000044710000\times 44710000 ร— 447 matrix of Rkisuperscriptsubscript๐‘…๐‘˜๐‘–R_{k}^{i}italic_R start_POSTSUBSCRIPT italic_k end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT values; Eโข(R)๐ธ๐‘…E(R)italic_E ( italic_R ) and Vโข(R)๐‘‰๐‘…V(R)italic_V ( italic_R ) can be computed from this matrix. These simulated values of Eโข(R)๐ธ๐‘…E(R)italic_E ( italic_R ) and Vโข(R)๐‘‰๐‘…V(R)italic_V ( italic_R ) were used for constrained optimization to obtain the optimum weight vector ๐’˜vsubscript๐’˜๐‘ฃ\boldsymbol{w}_{v}bold_italic_w start_POSTSUBSCRIPT italic_v end_POSTSUBSCRIPT which minimizes Vโข(R)๐‘‰๐‘…V(R)italic_V ( italic_R ) subject to Eโข(R)>0๐ธ๐‘…0E(R)>0italic_E ( italic_R ) > 0, and ๐’˜bsubscript๐’˜๐‘\boldsymbol{w}_{b}bold_italic_w start_POSTSUBSCRIPT italic_b end_POSTSUBSCRIPT which maximizes Eโข(R)โˆ’2โขVโข(R)๐ธ๐‘…2๐‘‰๐‘…E(R)-2\sqrt{V(R)}italic_E ( italic_R ) - 2 square-root start_ARG italic_V ( italic_R ) end_ARG. We denote the latter as a balanced portfolio assignment since it balances the expected return with the uncertainty surrounding it, and portfolios for the period 2016-10-01 to 2017-09-30 can be built based on ๐’˜bsubscript๐’˜๐‘\boldsymbol{w}_{b}bold_italic_w start_POSTSUBSCRIPT italic_b end_POSTSUBSCRIPT and ๐’˜vsubscript๐’˜๐‘ฃ\boldsymbol{w}_{v}bold_italic_w start_POSTSUBSCRIPT italic_v end_POSTSUBSCRIPT. We repeated this entire process 100 times, to get 100 estimates of the weights, ๐’˜b(1),โ€ฆ,๐’˜b(100)superscriptsubscript๐’˜๐‘1โ€ฆsuperscriptsubscript๐’˜๐‘100\boldsymbol{w}_{b}^{(1)},\ldots,\boldsymbol{w}_{b}^{(100)}bold_italic_w start_POSTSUBSCRIPT italic_b end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT , โ€ฆ , bold_italic_w start_POSTSUBSCRIPT italic_b end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 100 ) end_POSTSUPERSCRIPT and ๐’˜v(1),โ€ฆ,๐’˜v(100)superscriptsubscript๐’˜๐‘ฃ1โ€ฆsuperscriptsubscript๐’˜๐‘ฃ100\boldsymbol{w}_{v}^{(1)},\ldots,\boldsymbol{w}_{v}^{(100)}bold_italic_w start_POSTSUBSCRIPT italic_v end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT , โ€ฆ , bold_italic_w start_POSTSUBSCRIPT italic_v end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 100 ) end_POSTSUPERSCRIPT. These are used to construct confidence intervals for the %percent\%%-age gains based on our method, and we evaluated their performance against the capital gains from 2016-10-01 to 2017-09-30.

Table 2: Actual gains in %-age in the one-year period from 2016-10-01 to 2017-09-30 based on four different portfolios. 95% bootstrap confidence intervals are provided in parantheses. The corresponding S&P 500 gains for this time period is 18%.
Sector % gain from HMMs % gains from LHMM
Min V(R) Balanced Min V(R) Balanced
Communication Services
- 0.10
(-0.17,-0.03)
0
(0,0)
0
(0,0)
0
(0,0)
Consumer Discretionary
1.52
(1.37,1.67)
0.19
(0.14,0.23)
1.05
(1.83,1.28)
0.34
(0.27,0.48)
Consumer Staples
0.38
(0.27,0.50)
0.60
(0.21,0.97)
0.07
(0,0.12)
1.96
(1.56,2.33)
Energy
0.58
(0.47,0.70)
0
(0,0)
0.70
(0.51,0.90)
0
(0,0)
Financials
0.70
(0.49,0.88)
3.63
(3.25,4.08)
0.27
(0.18,0.45)
2.03
(1.55,2.56)
Health Care
2.52
(2.26,2.73)
-0.33
(-0.49,-0.13)
4.48
(4.04,4.93)
-0.99
(-1.27,-0.68)
Industrials
0.33
(0.18,0.50)
0.38
(0.34,0.44)
0.43
(0.22,0.57)
0.16
(0.09,0.23)
Information Technology
0.69
(0.57,0.78)
7.18
(6.59,7.87)
0.35
(0.26,0.44)
9.29
(8.54,9.95)
Materials
1.21
(1.06,1.39)
0
(0,0)
0.37
(0.20,0.55)
0
(0,0)
Real Estate
0.07
(-0.03,0.17)
0
(0,0)
0.16
(-0.03,0.37)
0
(0,0)
Telecommunications
0.54
(0.45,0.65)
0
(0,0)
0.40
(0.20,0.49)
0
(0,0)
Utilities
0.51
(0.39,0.66)
0.49
(0.41,0.58)
-0.12
(-0.21,0)
-0.06
(-0.09,-0.05)
Total
8.97
(8.58,9.31)
12.14
(11.29,13.23)
8.11
(7.57,8.67)
12.72
(11.60,13.58)

A second model was also considered, where we had the 12 marginal HMMs but did not have the Gaussian copula to specify an LHMM. While we also wanted to consider a baseline model where all 447 stocks were modeled using a single state process, numerical issues prevented the model from converging consistently when using random restarts. Table 2 shows the performance of the two portfolios each for the HMMs and the LHMM compared with the S&Pย 500 capital gains. For each sector, the first row provides the mean %-age gains during the one year test period, and the second row provides the corresponding 95% bootstrap confidence interval. If our aim is to just minimize risk, the LHMM does not provide better returns compared to individual HMMs. This approach results in a diversified portfolio for both models, where nearly every sector contributes to the annual gains. On the other hand, trying to balance expected return and risk leads to portfolios concentrated around a few sectors. In particular, Information Technology stocks were the single largest contributer to the annual gains for both the HMMs and the LHMM in our study. The balanced portfolios have higher annual gains compared to the portfolio which minimizes the variance, and the one based on the LHMM has the highest gain among all portfolios constructed, with a mean of 12.72% with a confidence interval of (11.60%, 13.58%). If our primary goal is to balance return and risk, the LHMM which better encapsulates market dynamics by allowing the different state processes to evolve jointly, provides better overall returns.

Table 3: Mean and standard deviation (SD) of the number of transactions for each type of portfolio based on 100 independent estimates of portfolio weights.
Number of transactions
for HMM portfolios
Number of transactions
for LHMM portfolios
Min V(R) Balanced Min V(R) Balanced
Mean 134.45 37.47 48.84 33.43
SD 3.44 1.00 1.56 1.03

Since we are demonstrating portfolio construction for a single year (2016โ€“2017), the number of non-zero weights in our allocations correspond to the number of transactions for the entire year. This is another important metric to consider when comparing algorithms for portfolifo construction. The 100 different sets of weights in our case study thus correspond to 100 estimates of the number of transactions for each of the 4 approaches to portfolio selection considered here. Table 3 lists the mean and standard deviation for the number of transactions. We note that the LHMM based portfolios require fewer transactions than corresponding portfolios constructed from independent HMMs. In particular, for the portfolio which minimizes risk, the LHMM portfolio requires fewer than half the number of transactions as the independent HMMs portfolio. If we are constrained by the number of allowed transactions, the LHMM portfolio is more likely to produce higher returns based on our empirical studies with S&P 500 data.

5 Discussion

One of the key numerical challenges for fitting HMMs to large datasets using the B-W algorithm is that they often have trouble converging even under repeated random restarts. Using an LHMM allowed us to sidestep this issue to a large extent, since we went from trying to fit a 447-dimensional emission process to at most a 69-dimensional emission process. The LHMM also allows the market dynamics for each sector to evolve in a dependent manner without needing every stock to be in the same state at every time point. A similar form of heterogeneity can also be induced if we increase the number of states, but interpreting a larger number of states can be difficult. Increasing the number of states also increases the number of emission distribution parameters significantly. Extending to a multivariate state process, however, does not result in an increase in the number of emission distribution parameters and a relatively modest increase in the number of state process parameters.

One of the assumptions that is made in this paper is that the stock price changes for different stocks within a sector are distributed as independent Normal variables given the state, as shown in (4). This rarely holds in practice, and something akin to a power transform is necessary to meet the assumption. However, even if the emission distribution of each stockโ€™s price changes is individually Normal, it still fails to adequately capture the correlation within the emission process. Ideally, we would want to model the emissions for each sector (either in its original scale of measurement or in a power-transformed scale so as to ensure Normality) as a multivariate Normal distribution, which would allow us to explicitly parameterize the correlation between the weekly gains for different stocks. We were actually able to do this for sectors with a small number of stocks, but faced computational issues for some of the larger sectors. It might be possible to estimate multivariate Normal parameters for the larger sectors if our data is extended to be longer than 260 weeks. However, the market dynamics do change over time and extending the length of the data might have other negative consequences. This is one aspect that we want to address in future work. In particular, a variational Bayes approach (McGrory and Titterington, 2009) where we can assign priors could potentially alleviate many of the numerical issues associated with B-W parameter estimation.

Acknowledgements

The hardware used in the computational studies is part of the UMBC High Performance Computing Facility (HPCF). The facility is supported by the U.S. National Science Foundation through the MRI program (grant nos.ย CNSโ€“0821258, CNSโ€“1228778, and OACโ€“1726023) and the SCREMS program (grant no.ย DMSโ€“0821311), with additional substantial support from the University of Maryland, Baltimore County (UMBC). See hpcf.umbc.edu for more information on HPCF and the projects using its resources. Reetam Majumder was supported by the Joint Center for Earth Systems Technology and by the HPCF as a Research Assistant.

References

  • Baum and Petrie (1966) Baum, L.ย E. and Petrie, T. (1966) Statistical inference for probabilistic functions of finite state Markov chains. The Annals of Mathematical Statistics, 37(6), 1554โ€“1563.
  • Brechmann etย al. (2012) Brechmann, E.ย C., Czado, C. and Aas, K. (2012) Truncated regular vines in high dimensions with application to financial data. Canadian Journal of Statistics, 40, 68โ€“85.
  • Dempster etย al. (1977) Dempster, A.ย P., Laird, N.ย M. and Rubin, D.ย B. (1977) Maximum likelihood from incomplete data via the EM algorithm. Journal of the Royal Statistical Society, 39.
  • Elliott and vanย der Hoek (1997) Elliott, R. and vanย der Hoek, J. (1997) An application of hidden Markov models to asset allocation problems (*). Finance and Stochastics, 1, 229โ€“238.
  • Elliott etย al. (2010) Elliott, R., Siu, T.ย K. and Alex, B. (2010) On mean-variance portfolio selection under a hidden Markovian regime-switching model. Economic Modelling, 27, 678โ€“686.
  • Ensor and Koev (2014) Ensor, K.ย B. and Koev, G.ย M. (2014) Computational finance: correlation, volatility, and markets. WIREs Computational Statistics, 6, 326โ€“340. URLhttps://doi:10.1002/wics.1323.
  • Fiecas etย al. (2017) Fiecas, M., Franke, J., von Sachs, R. and Tadjuidje, J. (2017) Shrinkage estimation for multivariate hidden Markov models. Journal of the American Statistical Association, 112, 326โ€“340. URLhttps://doi.org/10.1080/01621459.2016.1148608.
  • Hamilton (1989) Hamilton, J.ย D. (1989) A new approach to the economic analysis of nonstationary time series and the business cycle. Econometrica, 57, 357โ€“384.
  • Hassan and Nath (2005) Hassan, M.ย R. and Nath, B. (2005) Stock market forecasting using hidden Markov model: a new approach. Proceedings of the IEEE fifth International Conference on Intelligent Systems Design and Applications, 192โ€“96.
  • Ji (2019) Ji, Q. (2019) Computational methods for hidden Markov models with applications. Ph.D.ย Thesis, Department of Mathematics and Statistics, University of Maryland, Baltimore County.
  • Ji and Neerchal (2019) Ji, Q. and Neerchal, N.ย K. (2019) Creating stock portfolios using hidden Markov models. In JSM Proceedings, Business and Economic Statistics Section, 2105โ€“2118.
  • Joe and Xu (1996) Joe, H. and Xu, J.ย J. (1996) The estimation method of inference functions for margins for multivariate models. Tech. Rep. No. 166, Department of Statistics, University of British Columbia, Vancouver.
  • Kole and Dijk (2016) Kole, E. and Dijk, v.ย D. (2016) How to identify and forecast bull and bear markets? Journal of Applied Econometrics, 32.
  • Kruskal (1958) Kruskal, W.ย H. (1958) Ordinal measures of association. Journal of the American Statistical Association, 53, 814โ€“861.
  • Majumder (2021) Majumder, R. (2021) Hidden Markov models for high dimensional data with geostatistical applications. Ph.D. Thesis, Department of Mathematics and Statistics, University of Maryland, Baltimore County.
  • Malkiel (2019) Malkiel, B.ย G. (2019) A Random Walk Down Wall Street: Including A Life-Cycle Guide To Personal Investing. W.W. Norton & Company, 12th edn.
  • Markowitz (1952) Markowitz, H. (1952) Portfolio selection. The Journal of Finance, 7, 77โ€“91.
  • McGrory and Titterington (2009) McGrory, C.ย A. and Titterington, D.ย M. (2009) Variational Bayesian analysis for hidden Markov models. Australian and New Zealand Journal of Statistics, 51, 227โ€“244.
  • Mhanna and Bauwens (2012) Mhanna, M. and Bauwens, W. (2012) A stochastic space-time model for the generation of daily rainfall in the Gaza Strip. International Journal of Climatology, 32, 1098โ€“1112.
  • Nelsen (2006) Nelsen, R.ย B. (2006) An Introduction to Copulas. Springer, 2 edn.
  • Nguyen (2018) Nguyen, N. (2018) Hidden Markov model for stock trading. International Journal of Financial Studies, 36, 192โ€“96.
  • Nguyen and Nguyen (2015) Nguyen, N. and Nguyen, D. (2015) Hidden Markov model for stock selection. Risks, 3, 455โ€“473.
  • Rabiner (1989) Rabiner, L.ย R. (1989) A tutorial on hidden Markov models and selected applications in speech recognition. Proceedings of the IEEE, 77.
  • Rizzo (2019) Rizzo, M.ย L. (2019) Statistical Computing with R. Chapman & Hall/CRC, 2 edn.
  • Serfozo (2009) Serfozo, R. (2009) Basics of Applied Stochastic Processes. Springer.
  • Varin etย al. (2011) Varin, C., Reid, N. and Firth, D. (2011) An overview of composite likelihood methods. Statistica Sinica, 21, 5โ€“42.
  • Visser and Speekenbrink (2010) Visser, I. and Speekenbrink, M. (2010) depmixS4: An R package for hidden Markov models. Journal of Statistical Software, 36, 1โ€“21. URLhttp://www.jstatsoft.org/v36/i07/.
  • Visser and Speekenbrink (2019) โ€” (2019) Hidden Markov Models with R. Springer.
  • Viterbi (1967) Viterbi, A. (1967) Error bounds for convolutional codes and an asymptotically optimum decoding algorithm. IEEE Transactions on Information Theory, 13, 260โ€“269.
  • Xu and Cao (2021) Xu, J. and Cao, L. (2021) High-dimensional cross-market dependence modeling and portfolio forecasting by copula variational LSTM. Available at SSRN:. URLhttps://dx.doi.org/10.2139/ssrn.3881474.
  • Yeo and Johnson (2000) Yeo, I.-K. and Johnson, R.ย A. (2000) A new family of power transformations to improve normality or symmetry. Biometrika, 87, 954โ€“959.