scieee AI-readable full text Open interactive document viewer

Bayesian analysis of bubbles in asset prices

Fulop, Andras,Yu, Jun

Abstract

EconStor is a publication server for scholarly economic literature, provided as a non-commercial public service by the ZBW.

Full text

Fulop, Andras; Yu, Jun Article Bayesian analysis of bubbles in asset prices Econometrics Provided in Cooperation with: MDPI – Multidisciplinary Digital Publishing Institute, Basel Suggested Citation: Fulop, Andras; Yu, Jun (2017) : Bayesian analysis of bubbles in asset prices, Econometrics, ISSN 2225-1146, MDPI, Basel, Vol. 5, Iss. 4, pp. 1-23, https://doi.org/10.3390/econometrics5040047 This Version is available at: https://hdl.handle.net/10419/195431 Standard-Nutzungsbedingungen: Die Dokumente auf EconStor dürfen zu eigenen wissenschaftlichen Zwecken und zum Privatgebrauch gespeichert und kopiert werden. Sie dürfen die Dokumente nicht für öffentliche oder kommerzielle Zwecke vervielfältigen, öffentlich ausstellen, öffentlich zugänglich machen, vertreiben oder anderweitig nutzen. Sofern die Verfasser die Dokumente unter Open-Content-Lizenzen (insbesondere CC-Lizenzen) zur Verfügung gestellt haben sollten, gelten abweichend von diesen Nutzungsbedingungen die in der dort genannten Lizenz gewährten Nutzungsrechte. Terms of use: Documents in EconStor may be saved and copied for your personal and scholarly purposes. You are not to copy documents for public or commercial purposes, to exhibit the documents publicly, to make them publicly available on the internet, or to distribute or otherwise use the documents in public. If the documents have been made available under an Open Content Licence (especially Creative Commons Licences), you may exercise further usage rights as specified in the indicated licence. https://creativecommons.org/licenses/by/4.0/ econometrics Article Bayesian Analysis of Bubbles in Asset Prices Andras Fulop 1and Jun Yu 2,* 1Finance Department, ESSEC Business School, Paris-Singapore, Cergy-Pontoise 95021, CEDEX, France; [email protected] 2School of Economics and Lee Kong Chian School of Business, Singapore Management University, 90 Stamford Road, Singapore 178903, Singapore *Correspondence: [email protected]; Tel.: +65-6828-0858 Academic Editors: Federico Bandi, Alex Maynard, Hyungsik Roger Moon and Benoit Perron Received: 14 July 2017; Accepted: 11 September 2017; Published: 23 October 2017 Abstract: We develop a new model where the dynamic structure of the asset price, after the fundamental value is removed, is subject to two different regimes. One regime reflects the normal period where the asset price divided by the dividend is assumed to follow a mean-reverting process around a stochastic long run mean. The second regime reflects the bubble period with explosive behavior. Stochastic switches between two regimes and non-constant probabilities of exit from the bubble regime are both allowed. A Bayesian learning approach is employed to jointly estimate the latent states and the model parameters in real time. An important feature of our Bayesian method is that we are able to deal with parameter uncertainty and at the same time, to learn about the states and the parameters sequentially, allowing for real time model analysis. This feature is particularly useful for market surveillance. Analysis using simulated data reveals that our method has good power properties for detecting bubbles. Empirical analysis using price-dividend ratios of S&P500 highlights the advantages of our method. Keywords: parameter learning; markov switching; MCMC; real time bubble detection JEL Classification: C11, C13, C32, G12 1. Introduction The recent global financial crisis and the European debt crisis have prompted economists and regulators to work arduously to find ways to avoid the next crisis. From a historical perspective, Ahamed (2009) argues that financial crises are often preceded by an asset market bubble. 1 Well-known bubble episodes include the Dutch tulip mania in the 17th century, the British South Sea bubble at the beginning of the 18th century, the Railway mania in the 1840s, the Roaring Twenties stock-market bubble, the Dot-com bubble at the end of the 1990s, and the US housing bubbles lasting until 2006. Bubbles are generally considered harmful to economies and the welfare of society and are thought to lead to the misallocation of resources. For example, Caballero et al. (2008) argues that the burst of an asset price bubble can lead to recession in the real economy. Consequently, approaches have been tried to detect the presence and the burst of financial bubbles and to estimate the bubble origination and collapsing dates. 1 As Federal Reserve Board former vice chairman—Donald Kohn—argues, Federal Reserve policy makers should deepen their understanding of how to combat speculative bubbles to reduce the chances of another financial crisis; see Kohn (2008). Econometrics 2017,4, 47; doi:10.3390/econometrics5040047 www.mdpi.com/journal/econometrics Econometrics 2017,4, 47 2 of 23 Broadly speaking there are two alternative models in the bubble literature. Both are motivated from the following no-arbitrage condition: Pt=1 1+REt(Pt+1+Dt+1), (1) where Pt is the asset price (such as stock price) at time t , Dt is the cash flow (such as dividend) received between t− 1 and t due to the ownership of the asset, and R is the discount rate ( R> 0). By forward substitutions, we obtains the following decomposition of the asset price Pt=Ft+Bt, (2) where Ft= ∞ ∑ i=1 (1+R)−iEt(Dt+i) is a “fundamental” component and Bt is a bubble component which satisfies Et(Bt+1) = (1+R)Bt. (3) Unless B0= 0, the bubble process is a submartingale. In an autoregressive (AR) representation, Bt+1=βBt+εB t+1with β=1+R>1 being an explosive AR root and E(εB t+1|Bt) = 0. In the bubble literature two alternative approaches co-exist. The first approach employs regime switching models while the other one is based on various structural break models. This latter approach has been advocated by Peter Phillips and his co-authors in recent years; see Phillips et al. (2011), Phillips and Yu (2011)orPhillips et al. 2015a,2015b, PSY hereafter) and attracted a great deal of attention from policy makers. Regime switching models have a long history in economics, dating back to Godfeld and Quandt (1973) and Hamilton (1989). Evans (1991) model may be regarded as a regime switching model with two regimes. One regime corresponds to bubble expansion modelled by an explosive AR model whereas the other regime corresponds to bubble collapse. This collapse is sudden, takes place within a single period and is determined by an independent Bernoulli trial. After the bubble has collapsed, a new bubble starts emerging. Another regime switching model was proposed by Funke et al. (1994) and Hall et al. (1999). In this model, two regimes have been used: one regime has a unit root and the market is efficient, whereas the other regime has a bubble and hence has an explosive root. More recently, Shi (2013) extends the model in Hall et al. (1999) to allow for heteroskedasticity. Shi and Song (2015) proposed to use an infinite hidden Markov model, which allows for an infinite number of regimes to detect, date stamp and estimate speculative bubbles. Structural break models have been extensively used to distinguish stationary models from unit root models; see for example, Kim (2000) and Busetti and Taylor (2004). Recently, Phillips et al. (2011), Phillips and Yu (2011) ,Homm and Breitung (2012), and PSY extend some of the methods to distinguish explosive models from unit root models. In all the models considered, the change point is not stochastic. Regarding statistical inference on the presence of bubbles and the date-stamping of bubble origination and termination, several methods have been proposed. The first method is based on the full sample maximum likelihood (ML) method. This includes Funke et al. (1994) and Hall et al. (1999) in the context of regime switching models. When the model is correctly specified, the ML estimator (MLE) is efficient. Probabilistic inference about the unobserved regimes can be based on the Hamilton filter by calculating either the filtered probability or the smoothed probability. These probabilities naturally depend on the unknown parameters. To estimate the probabilities, the unknown parameters are replaced by the MLE obtained from the full sample. Consequently, the inferential approach does not allow for real time analysis as there is no sequential learning about the parameters. This feature of lack of real time analysis is shared by some MCMC algorithms in the literature such as the one in Shi and Song (2015). The second method is based on recursive techniques. For example, Phillips et al. (2011) and Phillips and Yu (2011) suggest implementing the right-tailed ADF test repeatedly on a forward Econometrics 2017,4, 47 3 of 23 expanding sample sequence. To effectively deal with episodes with multiple bubbles, PSY (2015a) and PSY (2015b) vary both the initial point and the ending point of the sample in each recursive regression. Homm and Breitung (2012) modifies various recursive methods for the purpose of bubble detection and date-stamping of bubble origination and termination. Apart from its ease of implementation, a nice feature of the recursive method is that it provides real time estimate of the bubble state. In practice, however, it is possible that the chosen minimum window size is larger than the actual bubble duration. Moreover, for the test statistic to rise above the critical value, a long enough period and a strong enough signal from the explosive regime are needed. Not surprisingly, in finite samples, the method may be late to identify the bubble origination and collapsing dates. In this paper, we make several contributions to the empirical asset pricing literature. First, we propose a two-state regime switching model of bubbles that generalizes the existing literature. The underlying series that we model is a price divided by a proxy of its fundamental component. A typical example would be a stock price divided by its dividend. The rationale is that in rational asset pricing models the asset price is the discounted present value of some fundamental hence there may be a common trend between asset prices and fundamentals. However, this common trend is canceled if we divide prices with the fundamental, resulting in a stationary series. The variation in this ratio may either reflect some stationary non-fundamental factors, some unobserved fundamentals (i.e., noise in the proxy for the fundamental) or low-frequency cyclical movements in the discount rates suggested in the recent finance literature (Cochrane 2011). Here we are not trying to differentiate between these explanations, in our normal state we simply assume mean-reverting dynamics around some long-run mean. In addition, to allow for smooth permanent structural changes in asset markets, we allow this long-run mean itself to follow a random walk process. Evidently when the variance of this latter is set to zero, smooth structural change is excluded. For the duration of this normal regime we assume a standard exponential distribution that implies Markovianity of the regime changes. In addition to this normal state, we add a second state corresponding to bubble periods where the AR coefficient of the valuation ratio is larger than one. Here we depart from the extant regime-switching literature and allow for non-constant hazard rates of exit from the bubble regime corresponding to Weibull-distributed durations. Throughout we assume normally distributed innovations and allow conditional heteroskedasticity through an independent Markov switching process. Our second contribution is to implement a Bayesian learning approach for sequential joint statistical inference over latent states, model parameters, and model comparison. There are several appealing features of this new inferential method for bubble detection. Firstly, based on the regime switching method, we can avoid the need to specify the minimum duration of each regime, including the bubble regime. In PSY, the minimum duration is set to the minimum window size of regression. In the case when the minimum window size has to be specified, if the minimum window size is larger than the minimum duration of a regime, the identification of a regime will be biased. Consequently, it is reasonable to believe that our model can identify the change points more effectively and more quickly when there are quick regime shifts. Secondly, the change points are endogenously determined. Thirdly, we are able to deal with parameter uncertainty as well as learning about the states and the parameters sequentially, allowing for real time model analysis. This feature is particularly useful for market surveillance, as argued in PSY (2015a). Fourthly, our approach enables exact finite sample inference about the parameter as well as latent states and hence avoids the derivation of asymptotic distributions. As shown in PSY, the asymptotic properties can be very difficult to obtain in general and this is especially true for the estimator of the change point.2 To check the reliability of the proposed method for the model, we conduct a Monte Carlo study. The Monte Carlo results show that the method is reliable both for the estimation of parameters and 2 A very recent contribution in deriving the asymptotic distribution for the change point estimator was made in Jiang et al. (2017). Econometrics 2017,4, 47 4 of 23 more importantly for detecting bubbles. Comparing its performance to PSY we find that our Bayesian learning algorithm reacts faster and has better power to detect bubbles. In further robustness tests we find that our method is robust both to the presence of non-normal innovations and of the leverage effect in the data generating process. We also apply our method to real data, i.e., monthly S&P 500 price-dividend ratio between 1871 and 2012, as PSY did. Our empirical estimates of the timing of bubbles are broadly similar to the empirical results obtained by PSY (2015a) based on a recursive frequentist method. However, our procedure flags more bubble episodes than PSY and differentiates between bubble periods and normal periods more often. Furthermore, in line with our simulation evidence, we find that a decision maker who is averse to erroneously declaring a regime change will identify substantially fewer and longer bubble periods. The organization of the paper is as follows. Section 2introduces the model and proposes a new estimation method. Section 3presents simulation results. Section 4reports the empirical results and Section 5concludes. 2. Econometric Model and Estimation Method 2.1. The Present Value Model and PSY’s Method Let pt=log(Pt) , dt=log(Dt) , ft=log(Ft) , r=log( 1 +R) , ρ= 1 /( 1 +exp(d−p)) ∈( 0, 1 ) , with d−p being the average log dividend-price ratio, and κ=−log(ρ)−( 1 −ρ)log(1 ρ− 1 ) . A log-linear approximation of (1)–(3) yields the following present value model: pt=ft+bt, (4) ft=κ−r 1−ρ+ (1−ρ) ∞ ∑ i=0 ρiEt(dt+1+i), (5) Et(bt+1) = 1 ρbt. (6) See Campbell and Shiller (1988) and Lee and Phillips (2016) for further details about the log-linearization. Equation (6) implies the following process bt=1 ρbt−1+εb t:= (1+g)bt−1+εb t, with E(εb t|bt−1) = 0. (7) From (5), we get dt−ft=−κ−γ 1−ρ− ∞ ∑ i=0 ρiEt(∆dt+1+i). (8) If dt is an I(1) process, (8) implies that ft is also I(1) and that ft and dt are cointegrated with the cointegrating vector [ 1, − 1 ] . In addition, if there is no bubble, Equation (4) suggests that pt=ft , and hence that pt and dt are cointegrated. If there are bubbles which manifest with an explosive behavior in bt according to (7), pt will also be explosive too and so is pt−dt , the log price-dividend ratio. This is the reason why the behavior of the price-dividend ratio has been studied in the empirical literature. To test for bubbles, the PSY procedure relies on repeated calculations of the t-statistic in autoregression in a recursive manner where the end point r2 (fraction) of each sample takes a value between r0 to 1 and the starting point r1 (fraction) of the sample takes a value between 0 to r2−r0 with r0 (fraction) being the smallest sample window. Let T be the size of the full sample. So [Tr0] is the Econometrics 2017,4, 47 5 of 23 minimum window size in the calculations. PSY(2015a) proposed the GSADF statistic to be the largest ADF t-statistic in the double recursion over all possible combinations of r1and r2, namely GSADF (r0)=sup r2∈[r0,1],r1∈[0,r2−r0]ADFr2 r1, where ADFr2 r1 is the ADF t-statistic based on the sample from r1 to r2 . PSY(2015a) derived the asymptotic distribution of GSADF (r0) when the null hypothesis is a unit root process, from which the right-tailed critical values can be obtained. The intuition why the test is reasonable is that if there is a subsample of data corresponds to an explosive bubble period, the ADF t-statistic calculated from this subsample should take a large value. The proposed test is a recursive way to find such a subsample and the corresponding ADF t-statistic. After bubbles have been detected, the origination date and the conclusion date of each bubble can be estimated by ˆ re=inf r2∈[r0,1]nr2:BSADFr2(r0)>cvβT r2o, (9) ˆ rf=inf r2∈[ˆ re,1]nr2:BSADFr2(r0)<cvβT r2o, (10) where BSADFr2(r0)=sup r1∈[0,r2−r0]ADFr2 r1, and cvβT r2 is the 100 (1−βT) % critical value of the sup ADF statistic based on bTr2c observations. The intuition for the two estimators is that, ˆ re is the first time when the evidence of explosive behavior is found while ˆ rf is, given an explosive subsample of data has been found, the first time when the evidence of explosive behavior disappears. PSY studied the consistency properties of the two estimators when data are generated from the following AR model with four structural breaks, xt=xt−11{t∈N0}+δTXt−11{t∈B1∪B2}+ t ∑ k=τ1f+1 εk+x∗ τ1f 1{t∈N1} + t ∑ l=τ2f+1 εl+x∗ τ2f 1{t∈N2}+εt1{j∈N0∪B1∪B2}, (11) In Model (11), there are two periods of mildly explosive bubbles in xt , the price-dividend ratio, where δT= 1 +cT−α with c> 0 and α∈(0, 1) , εtiid ∼0, σ2 , N0= [ 1, τ1e) , N1= (τ1f , τ2e) , N2=τ2f,τi , for i= 1, 2, Bi=hτie,τi f i , x∗ τi f =xτie +x∗ i with x∗ i=Op(1) , τie =bTriec dates the origination of the ith bubble and τi f =jTri f kdates its termination. Clearly if r0is too large such that the minimum window size is larger than the minimum bubble duration, the performance of both the bubble test and the dating estimators will be adversely affected. 2.2. Model and Inferential Task Following the literature, we also model the price-dividend ratio, denoted by xt throughout the rest of the paper. We assume the presence of two regimes determining the autoregressive behavior of the series, with st= 0 the normal regime, st= 1 the bubble regime. The distribution of the duration of the normal regime is exponential with parameter λ1 . That is, if the duration of the normal spell is denoted by τn , then Pr(τn>t) = exp (−t/λ1) . As our focus is on the bubble regime, we assume Econometrics 2017,4, 47 6 of 23 that the bubble duration, τb , follows the more flexible Weibull distribution with parameters λ2 , k2 , giving rise to the survival probability Pr(τb>t) = exp −(t/λ)k2. The expected value of the bubble spell is µ2=λ2Γ( 1 + 1 /k2) and we reparameterize the model and define our prior over µ2 instead of λ2 . The shape parameter k2 determines whether the hazard rate of exit is constant, increasing or decreasing. The process in each regime follows if st=0 : xt=αt(1−β1) + β1xt−1+σtεt,β1≤1, (12) αt=αt−1+δηt, (13) if st=1 : xt=β2xt−1+σtεt,β2>1. (14) In the normal state (12), xt follows a mean-reverting process around the stochastic mean αt , where the speed of mean-reversion is β1 . To allow for gradual parameter change in the long-run mean, Equation (13) posits that αt follows a random walk whose variability is determined by δ . Obviously, when δ= 0, we are back to a constant mean reversion model. In the state with an explosive root (14), we claim that there is a bubble in the asset price. This is because xt is an asset price with the fundamental value removed. As a result, the presence of an explosive root implies the presence of bubble according to the present value model; see, for example, Diba and Grossman (1988). Following the suggestion of Phillips et al. (2011), we do not use an intercept in the explosive state for otherwise the intercept would dominate the autoregressive term asymptotically which is not empirically realistic.3 To address the concern of Shi (2013) about the sensitivity of bubble identification to the presence of heteroskedasticity, we allow σt to follow an independent 2-regime Markov switching process, with diagonal probabilities zii . In the first (low) regime the value of volatility is σt=σl while in the second (high) regime, σt=σmσlwhere σm>1. The transition matrix for volatility is Pσ="z11 1−z22 1−z11 z22 #. The fixed parameter vector describing the dynamics of the system has 10 unknown parameters θ= (λ1,k2,µ2, , z11,z22,σl,σm,δ,β1,β2)0. To monitor bubbles in real time, the user of the model needs to evaluate the probability of being in a bubble (or normal) regime at time t , given information available by time t . Even if he knows the fixed parameters θ, inference over the regimes, i.e., obtaining p(st=k|θ,x1:t) = E(1{st=k}|θ,x1:t), is not easy as the filter is not analytically available for the model. However, in what follows we describe a very efficient sequential Monte Carlo technique (a particle filter) to numerically approximate the filtering distributions. 2.3. Discrete Particle Filter The theoretical quantity that the filtering algorithm targets is the sequence of filtering distributions of the state-space system f(st , ht , σt , αt|x1:t , θ) where ht is the time elapsed since the last regime change. Throughout this section we assume a known parameter vector θ and, to simplify notation, we suppress 3 In more recent attempts, Phillips et al. (2014), Wang and Yu (2015), Fei (2017) showed the impact of the intercept term on the asymptotics in various model setups. Econometrics 2017,4, 47 7 of 23 dependence on it. The crucial thing to realize is that conditional on the path of the discrete latent states s1:t , h1:t , σ1:t the system is a linear Gaussian state space model, and hence the continuous state variable αt can be marginalized out analytically using Kalman filtering recursions. Let us denote the two filtering moments of αt (conditional on discrete latent variables) by µt , Vt , and hence the joint filtering density to track becomes f(st , ht , σt , µt , Vt|x1:t) . Given that the state space that we need to filter numerically is discrete, we can employ the discrete particle filter (DPF) of Fearnhead (1998) where all successor states are generated avoiding the use of a proposal distribution. Let us assume that at t− 1 we have N equal-weighted particles (wi t−1 , hi t−1 , σi t−1 , µi t−1 , Vi t−1) , i= 1, . . . , N with weights vi t−1=1 N representing the filtering distribution. We have the following recursion to arrive to the filtering distribution at the next time instant t. Branching out: To move the hidden state particles forward, one needs to attach st , σt to the existing particles to characterize f(st , σt , st−1 , ht−1 , σt−1 , µt−1 , Vt−1|x1:t−1) . Instead of some random proposal over the new states the DPF proposes to create all possible successor states from each existing particles. In our case we have K= 4 possible successor particles for each ancestor corresponding to all possible configurations of st , σt . This results in 4 ×N particles of the form (st=k , σt=l , si t−1 , hi t−1 , σi t−1 , µi t−1 , Vi t−1) , k= 0, 1, l=0, 1, i=1, . . . , Nwith attached weights vikl t|t−1=f(st=k,σt=l|si t−1,hi t−1,σi t−1)vi t−1. Attaching new information and computing the likelihood: Next, the particles are reweighted to include the effect of the new observation xt . The theoretical relationship between the predictive distribution and the filtering one is f(st,σt,st−1,ht−1,σt−1,µt−1,Vt−1|x1:t) ∝f(xt|st,σt,µt−1,Vt−1)f(st,σt,st−1,ht−1,σt−1,µt−1,Vt−1|x1:t−1). This can be implemented in the algorithm by reweighting to arrive to the filtering weights ˜ vikl t=f(xt| st=k,σt=l,µi t−1,Vi t−1)vikl t|t−1. The estimate of the marginal likelihood of xtcan be computed as b p(xt|x1:t−1) = 1 4N 1 ∑ k=0 1 ∑ l=0 N ∑ i=1 ˜ vikl t. Resampling: Clearly, repeating the previous steps through multiple observations would lead to an exponential growth in the number of discrete states to be maintained. Hence it is crucial to include a resampling step where N particles are sampled out of the 4 ×N existing one with probability proportional to the normalized weights vikl t=˜ vikl t ∑1 k=0∑1 l=0∑N i=1˜ vikl t . This results in an N -sample, (si t , σi t , si t−1 , hi t−1 , σi t−1 , µi t−1 , Vi t−1) , i= 1, . . . , N with equal weights vi t=1 N . The last step is to update the hidden variables (hi t , µi t , Vi t) which are simply deterministic functions of their past values, the new state variables si t,σi tand of the observation xt. The empirical distribution of the particle cloud converges to the true filtering density under weak conditions and it can be used to approximate any filtering quantity of interest. For example the filtered bubble probability can be approximated as: p(st=1|θ,x1:t)≈b p(st=1|θ,x1:t) = 1 N N ∑ i=1 1{si t=1}. 2.4. Parameter Learning Algorithm In practice, we do not know θ . A common practice in the regime switching literature is to replace θ by the ML estimates or the Bayesian estimates obtained from the full sample, ignoring the parameter Econometrics 2017,4, 47 8 of 23 uncertainty. Since the estimates of θ are constructed from the full data sample, such an analysis is not in real time. To carry out a real time analysis, the model parameters also need to be sequentially updated as new data arrive. Furthermore, ignoring parameter uncertainty can lead to an overestimation of our ability to detect regimes in real time, especially for more complex models. To tackle these issues we turn to sequential Bayesian techniques that allow us to sample from the posterior probability of the fixed parameters p(θ|x1:t) . As an example, assume that we have a weighted sample (πm t , θm t , m= 1, . . . , M) with normalized weights ∑M m=1πm t= 1 whose empirical distribution approximates p(θ|x1:t) . Further, assume that for each θm t , we have N state particles sm,i , i= 1, . . . , N approximating f(st|x1:t , θm t) obtained by running a DPF at θm t . Then the posterior probabilities that take parameter uncertainty into account can be computed as E1{st=k}|x1:t=E(E(1{st=k}|θ,x1:t)|x1:t)≈ M ∑ m=1 πm t 1 N N ∑ i=1 1{sm,i t=1}. Bayesian methods enable us to conduct the exact finite sample inference of the parameters as well as latent states. In contrast, the derivation of asymptotic properties of classical estimators can be very difficult for this class of models due to the presence of explosiveness. This difficulty is especially true for the estimator of the change point; see, for example, PSY (2015b). Sequential analysis of state-space models under parameter uncertainty is of interest in many settings. Since one of our primary interests here is real time analysis of regime detection, parameter learning is needed. To sequentially learn over the parameters, we turn to the marginalized resample-move approach of Fulop and Li (2013) and Chopin et al. (2013). For completeness, we provide a brief overview of the method in this subsection. We need a method to sequentially sample from the sequence of posteriors γt(θ) = p(θ|x1:t)∝p(x1:t|θ)p(θ) = t ∏ l=1 p(xl|x1:l−1,θ)p(θ), (15) where p(θ) is the prior over the fixed parameters and for notational convenience we suppress the dependence on the initial hidden state. While the individual conditional likelihood p(xl|x1:l−1 , θ) cannot be obtained in closed form, Fulop and Li (2013) and Chopin et al. (2013) employ instead the approximate likelihood obtained from particle filters. In particular, instead of the target in (15) they propose to work with the extended target ˜ γt(θ,u1:t)∝ t ∏ l=1b p(xl|x1:l−1,u1:l−1,θ)φ(ul|x1:l,u1:l−1)p(θ), (16) where the likelihood estimates b p(xl|x1:l−1 , u1:l−1 , θ) (denoted as b p(xt|x1:t−1) in the previous section) are obtained by running a particle filter with N particles for any given fixed parameter θ , ul contains all the random variables created at time l by the particle filter and φ(ul|x1:l , u1:l−1) is the density of these random variables. Initialization: Sample particles from the prior θm 0∼p(θ) , and attach equal weights to each particle πm 0=1 M . The resulting cloud, (πm 0 , θm 0) is trivially distributed according to p(θ) . For each θm 0 initialize a particle filter with Nstate particles and denote the random variables created by um 0. Recursion and reweighting: Assume that a weighted sample, (πm t−1 , θm t−1) , has been obtained that represents p(θ|x1:t−1) . Furthermore, for each θm t−1 we maintain a particle filter with N state particles with attached random variables um 1:l−1 and the likelihood estimates up to t− 1, b p(x1:t−1|θm t−1) . Now the task is to include the new observation into the information set and obtain a representation of the next posterior, p(θ|x1:t) . The sequential resample-move algorithm uses importance sampling for this task and the intuition that the posterior at t− 1 is typically quite close to the posterior at t . Hence, the sample from the former will provide a good proposal distribution for the latter. Then the Econometrics 2017,4, 47 15 of 23 1860 1880 1900 1920 1940 1960 1980 2000 2020 0 10 20 30 40 50 60 70 80 90 100 Figure 2. S&P 500 Price-Dividend Ratio. This figure shows the monthly real S&P 500 price-dividend data between January 1871 to June 2012. Table 3presents the full sample posterior estimates obtained from our learning routine and Figure 3shows the histograms of the priors (in red) alongside the full-sample posteriors (in blue). We can observe that while there is a large amount of uncertainty remaining about the parameters driving the regime changes, the data does tell us something about these parameters. First, the posteriors of both λ1 and µ2 put relatively more weight onto lower values, suggesting somewhat more frequent regime changes compared to our priors. Second, the posterior over the shape parameter of the bubble duration k2 seems to have a density separated away from 1 providing evidence against a simple exponential bubble duration distribution (case of k2= 1). This evidence points towards an increasing hazard function of exit from the bubble state, i.e., the probability of a crash tends to increase as bubbles mature. This is in contrast to a standard homogenous continuous time Markov-Switching model that gives rise to exponentially distributed durations. Further, the presence of stochastic volatility is clear in the data. The volatility in the high volatility regime is almost three time as large as that in the low volatility regime but is markedly less persistent. As in the Monte Carlo simulations, the data does not reveal too much about δ , the volatility of the long-run mean, but the posterior seems separated from zero. In contrast, the mean-reversion coefficient in the normal regime β1 seems well identified with a mode that is close to but separate from unity and a posterior mean of 0.99. To translate this parameter to a more intuitive scale, we compute the posterior mean of the half-life of the process during the normal regime. If βi 1 , i= 1, . . . , M , are the posterior draws of the parameter, the posterior mean half-life is computed as d HLnormal =1 M∑M i=1ln 0.5 ln βi 1 . In our data set this results in an estimate of Econometrics 2017,4, 47 16 of 23 d HLnormal = 130, i.e., 10.8 years. Last, the autoregressive coefficient during explosive regimes is tightly identified and symmetrically distributed around a posterior mean estimate of b β2=1.015. Table 3. Full Sample Posterior Parameter Estimates for S&P 500. Parameters Posterior Mean Posterior 5th Prctile Posterior 95 Prctile λ1147 123.5 183.1 k21.795 1.152 2.589 µ230.74 25.25 38.31 z11 0.9842 0.9754 0.9907 z22 0.9412 0.9128 0.963 σl0.6694 0.6367 0.7017 σm2.895 2.708 3.1 δ0.3117 0.09392 0.6485 β10.99 0.9784 0.9982 β21.015 1.01 1.018 This table reports the full sample posterior estimates of the full model on monthly S&P 500 price-dividend data between January 1871 to June 2012. 100 200 300 400 500 0 2000 4000 λ1 1 2 3 4 5 0 1000 2000 k2 20 40 60 80 100 0 2000 4000 µ2 0 0.2 0.4 0.6 0.8 1 0 1 2x 104z11 0 0.2 0.4 0.6 0.8 1 0 5000 10000 z22 0246 0 1 2x 104σl 1 2 3 4 5 6 0 5000 10000 σm 0 0.5 1 1.5 0 1000 2000 δ 0.97 0.98 0.99 1 1.01 0 1000 2000 β1 1 1.005 1.01 1.015 1.02 1.025 0 1000 2000 β2 Figure 3. Histogram of parameter priors and posteriors. This figure reports the histogram of the priors (in blue) and the full-sample posteriors (in red). The sample is monthly S&P 500 price-dividend data between January 1871 to June 2012. Our main object of interest is not the parameter estimates per se but the ability to detect bubbles in real time using the filtered bubble probabilities. Table 4reports some summary statistics on Econometrics 2017,4, 47 17 of 23 bubble-stamping both from PSY (2015a) (row 1) and from our algorithm with different values of ζ . The first thing to note is that in accordance with the simulation results, both PSY (2015a) and the regime switching model with ζ= 1 seems to detect lots of short bubbles with the average bubble spell around 4 months in both cases. Further, increasing the date stamping parameter to ζ> 1 seems to lead to an increase in the average length of the detected bubble spells while decreasing the number of bubble periods. Overall, allowing for aversion to change in the bubble stamps leads to more intuitive results at least for this data set. Second, the results are not too different across ζ= 2 and ζ= 3. Hence, the results seem reasonably robust to the exact choice of the loss function. Last, the regime switching labels more periods as bubbles compared to PSY. Figure 4shows the results from a real time bubble classifier with ζ= 2 together with the filtered bubble regime probabilities. Here we label a given month a bubble (shaded in grey) if the bubble regime has the highest filtered probability. For comparison, we also implement the real time bubble indicator using the BSADF statistics from PSY in Figure 5. It is reassuring to observe that there are quite a few periods where the incidence of bubbles is preponderant according to both methods. In particular, around 1880, the years before 1920, before the great depression in 1929, the internet bubble before 2000 and last, the rebound after the recent 2008 financial crisis. Table 4. Bubble Detection Statistics for S&P 500. Methods Number of Bubble Spells Total Bubble Length/T Avg Bubble Duration in Months PSY 22 0.056 4.27 RS, ζ=1 58 0.16 4.5 RS, ζ=2 24 0.14 9.7 RS, ζ=3 20 0.125 10.4 This table reports summary statistics on the different bubble-stamping procedures for monthly S&P 500 price-dividend data between January 1871 to June 2012. The first row reports the results from the PSY (2015a) procedure while rows 2–4 report the results from our regime switching model at different values of the bubble stamping parameter ζ. To better understand the behavior of the various bubble indicators, we take a microscopic view around well-known historical events. Here we focus on five events: The banking crisis in October 1907, the great market crash in September 1929, the Black Monday crash in October 1987, the DotCom mania peaking in March 2000 and the sub-prime crisis exploding in September 2008. Figures 6and 7report both the PSY’s BSADF statistic (row 1), the filtered bubble probabilities from our regime-switching model (row 2) in the two years preceding and following these events. For reference row 3 depicts the original data series (price-dividend ratios) in the same periods. There are a few interesting patterns emerging from these graphs. First, both methods seem to indicate the presence of bubbles before the 1929 and 1987 crashes and during the DotCom bubble before 2000. A slight difference is that the regime-switching model seems to give more indication to the consecutive arrival of several shorter explosive periods, especially during the DotCom Mania. Second, the PSY method seems to have a difficulty in differentiating bubbles from collapses, a feature also noted in PSY (2015a). For instance, the BSADF statistic takes large positive values during the market collapse before October 1907 or in the months right after the Lehman bankruptcy in 2008. In contrast in the regime switching model the bubble regime probabilities stay low during these times. Third, the two methods interpret very differently when the market rallies after collapsing. For example, in months after October 1907 crash, after the 2000 crash, and the 2008 crash, the BSADF statistic actually decreases while the regime switching model sees explosive bubble periods. Econometrics 2017,4, 47 18 of 23 1880 1890 1900 1910 1920 1930 1940 0 0.2 0.4 0.6 0.8 1 1950 1960 1970 1980 1990 2000 2010 0 0.2 0.4 0.6 0.8 1 Figure 4. Bubble Regimes from Bayesian Learning. This figure reports the real-time bubble regimes indicated by our regime switching model together with the filtered bubble regime probability. A given month is classified as belonging to the bubble regime if this latter is the regime with the highest filtered probability. The plot corresponds to the bubble stamping parameter ζ= 2. Bubble regimes are the shaded grey areas. The sample is monthly S&P 500 price-dividend data between January 1871 to June 2012. Econometrics 2017,4, 47 19 of 23 1880 1890 1900 1910 1920 1930 1940 −1 0 1 2 3 4 1950 1960 1970 1980 1990 2000 2010 −1 0 1 2 3 4 Figure 5. Bubble Regimes from recursive regressions as in PSY (2015a). This figure reports the real-time bubble regimes indicated the backward sup ADF (BSADF) statistics from PSY (2015a). A given month is deemed to belong to a bubble regime if the value of the BSADF statistic exceeds QBSADF(0.95) + log(t)/100 where QBSADF( 0.95 ) is the 95% critical value of the test statistic. Bubble regimes are the shaded grey areas while the solid line depicts the BSADF sequence. The sample is monthly S&P 500 price-dividend data between January 1871 to June 2012. Econometrics 2017,4, 47 20 of 23 1905 1910 0 1 21907 Oct Banking Crisis BADF 1905 1910 0.2 0.4 0.6 1907 Oct Banking Crisis Bubble Pr 1905 1910 15 20 25 1907 Oct Banking Crisis P/D ratio 1927 1930 1932 −1 0 1 2 1929 Sept Crash BADF 1927 1930 1932 0.2 0.4 0.6 0.8 1929 Sept Crash Bubble Pr 1927 1930 1932 15 20 25 30 1929 Sept Crash P/D ratio 1985 1990 0 1 2 1987 Oct Black Monday BADF 1985 1990 0.2 0.4 0.6 0.8 1987 Oct Black Monday Bubble Pr 1985 1990 25 30 35 1987 Oct Black Monday P/D ratio Figure 6. Behavior of bubble detectors around historical events: I. This figure reports the behavior of both the PSY and our regime-switching bubble indicators around some well-known historical events. The event itself is always shown by a vertical dashed line. Each time we report two years before and two years after the event. The first row reports the PSY BSADF statistic together with QBSADF( 0.95 ) + log(t)/ 100 in dashed red. The second row reports the filtered bubble probabilities from our regime-switching model. The last row shows the data, the real S&P 500 price-dividend ratio. Econometrics 2017,4, 47 21 of 23 1997 2000 2002 1 2 3 4 2000 March, Dotcom Bubble BADF 1997 2000 2002 0.2 0.4 0.6 0.8 2000 March, Dotcom Bubble Bubble Pr 1997 2000 2002 70 80 90 2000 March, Dotcom Bubble P/D ratio 2006 2008 2010 2012 0 1 2 2008 Sept, Subprime Crisis BADF 2006 2008 2010 2012 0.2 0.4 0.6 2008 Sept, Subprime Crisis Bubble Pr 2006 2008 2010 2012 30 40 50 2008 Sept, Subprime Crisis P/D ratio Figure 7. Behavior of bubble detectors around historical events: II. This figure reports the behavior of both the PSY and our regime-switching bubble indicators around some well-known historical events. The event itself is always shown by a vertical dashed line. Each time we report two years before and two years after the event. The first row reports the PSY BSADF statistic together with the 95% critical values in dashed red. The second row reports the filtered bubble probabilities from our regime-switching model. The last row shows the data, the real S&P 500 price-dividend ratio. 5. Conclusions In this paper, we propose a new regime switching model with two regimes, a normal regime and a bubble regime. To estimate the model we use a sequential Bayesian simulation method that allows for real time detection of bubble origination and conclusion. A particular feature of our framework is that it sequentially tracks the joint posterior distribution of the fixed parameters and of the hidden states. Hence, it properly allows for real time parameter uncertainty. The Monte Carlo evidence suggests that our method is reliable and robust to the presence of outliers and compares favorably to existing online methods in detection power. We carry out empirical study using real monthly S&P 500 price-dividend data. While some similar results have been obtained by PSY(2015a) in a classical setup and by our method, we find some differences in the two sets of empirical results. In particular, our method detects more bubble periods and can better discriminate between bubbles and collapses. Acknowledgments: This article is dedicated to Peter C.B. Phillips, a giant in econometrics. We wish to thank the co-editors and two referees for helpful comments. Yu acknowledges support from the Singapore Ministry of Education for Academic Research Fund under grant number MOE2011-T2-2-096. Author Contributions: Both authors contribute in setting up the model and the structure of the paper. Jun Yu is responsible for Section 1 and Section 2.1 and Andras Fulop for Section 2.2–2.5, Section 3 and Section 4. Conflicts of Interest: The authors declare no conflict of interest. Econometrics 2017,4, 47 22 of 23 References Ahamed, Liaquat. 2009. Lords of Finance: The Bankers Who Broke the World. New York: Penguin Press. Andrieu, Christophe, Arnaud Doucet, and Roman Holenstein. 2010. Particle Markov Chain Monte Carlo. Journal of Royal Statistical Society B 72: 1–33. Busetti, Fabio, and A. M. Robert Taylor. 2004. Tests of stationarity against a change in persistence. Journal of Econometrics 123: 33–66. Caballero, Ricardo J., Emmanuel Farhi, and Pierre-Olivier Gourinchas. 2008. Financial Crash, Commodity Prices and Global Imbalances. Brookings Papers on Economic Activity 2: 1–55. Campbell, John Y., and Robert J. Shiller. 1988. The dividend-price ratio and expectations of future dividends and discount factors. Review of Financial Studies 1: 195–227. Chopin, Nicolas, Pierre E. Jacob, and Omiros Papaspiliopoulos. 2013. SMC 2 : An efficient algorithm for sequential analysis of state space models. Journal of the Royal Statistical Society B 75: 397–426. Cochrane, John H. 2011. Presidential Address: Discount Rates. Journal of Finance 66: 1047–108. Diba, Behzad T., and Herschel I. Grossman. 1988. Explosive rational bubbles in stock prices? The American Economic Review 78: 520–30. Evans, George W. Evans. 1991. Pitfalls in testing for explosive bubbles in asset prices. The American Economic Review 81: 922–30. Fearnhead, Paul. 1998. Sequential Monte Carlo methods in Filter Theory. Ph.D. thesis, University of Oxford, Oxford, UK. Fei, Y. 2017. Limit Theory for Mildly Integrated Process with Intercept. Working Paper, Singapore Management University, Singapore. Fulop, Andras, and Junye Li. 2013. Efficient learning via simulation: A marginalized resample-move approach. Journal of Econometrics 176: 146–61. Godfeld, Stephen, and Richard Quandt. 1973. The Estimation of Structural Shifts by Switching Regressions. Annals of Economic and Social Measurement 2: 473–83. Funke, Michael, Stephen Hall, and Martin Sola. 1994. Rational bubbles during Poland’s hyperinflation: Implications and empirical evidence. European Economic Review 38: 1257–76. Hall, Stephen G., Zacharias Psaradakis, and Martin Sola. 1999. Detecting Periodically Collapsing Bubbles: A Markov-Switching Unit Root Test. Journal of Applied Econometrics 14: 143–54. Hamilton, James D. 1989. A new approach to the economic analysis of nonstationary time series and the business cycle. Econometrica 57: 357–84. Homm, Ulrich, and Jörg Breitung. 2012. Testing for Speculative Bubbles in Stock Markets: A Comparison of Alternative Methods. Journal of Financial Econometrics 10: 198–231. Jiang, Liang, Xiao hu, Wang, and Jun Yu. 2017. In-Fill Asymptotic Theory for Structural Break Point in Autoregression: A Unified Theory. Working paper, Singapore Management University, Singapore. Kim, Jae-Young. 2000. Detection of change in persistence of a linear time series. Journal of Econometrics 95: 97–116. Kohn, Donald L. 2008. Monetary Policy and Asset Prices Revisited. Paper presented at the Cato Institute’s 26th Annual Monetary Policy Conference, Washington, DC, USA, November 19 . Lee, Ji Hyung, and Peter C. B. Phillips. 2016. Asset pricing withfinancial bubble risk. Journal of Empirical Finance 38: 590–622. Phillips, Peter C. B., and Jun Yu. 2011. Dating the Timeline of Financial Bubbles During the Subprime Crisis. Quantitative Economics 2: 455–91. Phillips, Peter C. B., Shu ping Shi, and Jun Yu. 2014. Specification Sensitivity in Right-Tailed Unit Root Testing for Explosive Behavior. Oxford Bulletin of Economics and Statistics 76: 315–33. Phillips, Peter C. B., Shu ping Shi, and Jun Yu. 2015a. Testing for Multiple Bubbles: Historical Episodes of Exuberance and Collapse in the S&P500. International Economic Review 56: 1043–78. Phillips, Peter C. B., Shu ping Shi, and Jun Yu. 2015b. Testing for Multiple Bubbles: Limit Theory of Real Time Detector. International Economic Review 56: 1079–134. Phillips, Peter C. B., Yang Ru Wu, and Jun Yu. 2011. Explosive behavior in the 1990s Nasdaq: When did exuberance escalate asset values? International Economic Review 52: 201–26. Shi, Shu Ping. 2013. Specification Sensitivities in the Markov-Switching Unit Root Test for Bubbles. Empirical Economics 45: 697–713. Econometrics 2017,4, 47 23 of 23 Shi, Shu Ping, and Yong Song. 2015. Identifying Speculative Bubbles with an Infinite Hidden Markov Model. Journal of Financial Econometrics 14: 159–84. Wang, Xiao hu, and Jun Yu. 2015. Limit Theory for an Explosive Autoregressive Process. Economic Letters 126: 176–80. Yiu, Matthew S., Jun Yu, and Lu Jin. 2013. Detecting Bubbles in Hong Kong Residential Property Market. Journal of Asian Economics 28: 115–24. c 2017 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).