Forecasting Financial Crashes: Revisit to Log-Periodic Power Law

,


Introduction
Financial crises that follow asset price bubbles have been observed in various markets throughout history.Bubbles refer to asset prices that exceed the fundamental values based on supply and demand.Skewed asset prices fail to reflect the fundamentals well; thus, in turn, they may have an important effect on resource allocations [1].Moreover, the bursting of a bubble, for example, a dramatic collapse of the stock market, may bring the economy into an even worse situation, such as the great recession, and dysfunction in the financial system, which proves the importance of understanding asset price bubbles.
Recently, a lot of attempts have been made to introduce bubbles into asset pricing models.Predominantly, two streams of theoretical frameworks shed light on this issue, that is, rational models and behavioural models.The rational models optimise the behaviour of a representative agent with complete processing of information; however, bubbles may still exist due to market imperfection like information asymmetry and short sale constraints [2].The behavioural models, a different view, are characterised by a framework of heterogenous agents in which at least some agents in the economy are bounded as rational and others as irrational.In behavioural models, bubbles arise due to either limited arbitrage or heterogeneous beliefs [3].Although empirical evidence supports the validation of these models, none of them provides the space for predicting the critical time of financial bubbles with a substantial significance.
As an alternative to explaining bubbles, a framework called the log-periodic power law (LPPL) model has gained a lot of attention with the many successful predictions it made [4][5][6].Johansen et al. [4] proposed the LPPL model, which assumes that there exist two types of agents in the market: a group of traders with rational expectations and a group of noise traders with herding behaviour.The noise traders are organised into networks, and they tend to imitate others.At the macrolevel, all the agents will continue investing where arbitrage is limited because rational traders lack the knowledge about the time of crash and are assumed to be risk-neutral.It is still rational for them to invest on speculative assets because the risk of a crash is compensated for by the profits.As a consequence, rational traders will self-limit their arbitrage behaviour.The herding behaviour of noise traders is the origin of the positive feedback process; that is, given a high price, the imitation among noise traders leads to increased demand, which pushes the price further up.
The empirical literature has employed a variety of approaches to estimate the LPPL model.Johansen et al. [4] first used the so-called Tabu search and the Levenberg-Marquardt algorithm (LMA) to deduce an evolution law for stock prices before the crashes in the United States and Hong Kong.Johansen and Sornette [7] identified and analysed 21 significant bubbles followed by large crashes or severe collapses and found that the LPPL adequately describes speculative bubbles in emerging markets.Liberatore [8] introduced a price gyration method combined with the LMA to predict the critical time of financial bubbles for the Dow Jones Industrial Average (DJIA) and the Standard & Poor's 500 Index (S&P 500).Pele [9] proposed an extension of the approach of Liberatore [8] using time series peak detection and predicted the Bucharest Exchange Trading-Investment Fund (BET-FI) crash in 2007.Kurz-Kim [10] applied the LPPL to detect the stock market crash in Germany, which demonstrated that the LPPL could be used for constructing an early warning indicator for financial crashes.Geraskin and Fantazzini [11] presented alternative methodologies for diagnostic tests and graphical tools to investigate the gold bubble in 2009.Korzeniowski and Kuropka [12] used a genetic algorithm (GA) to fit the LPPL based on the DJIA and WIG20 (the WIG20 is a stock market index of the 20 largest joint-stock companies listed on the Warsaw Stock Exchange) time series and found it to be useful as a forecasting tool for financial crashes.
However, the research still has encountered problems when forecasting the critical time of financial bubbles with LPPL.First, prediction results are sensitive to the initial values because the optimisation algorithms based on derivatives, for example, gradient and curvature, can easily be trapped in local minima.Second, although the problem of local minima can be overcome by using a nonlinear optimisation algorithm, for example, GA, which requires no information about solution surface, we still do not have a proper way of providing a reasonable initial population.Finally, there has been neither sufficient diagnostic analysis for the LPPL model nor a thorough assessment of its goodness-of-fit.
Our study improves the estimation method for the LPPL model.To the best of our knowledge, we are the first to generate an initial population for GA using information from historical data.The method to create an initial population is called improved price gyration, which consists of three steps.First, detect peaks which are local maxima within a window (a periodic cycle).In this paper, the window size is not fixed, which allows for the possibilities of different lengths of the cycle.Second, select three consecutive peaks that were detected in the previous step.The more recent the peak, the greater the probability it will be selected, which we call a distance-based weighting approach.Third, given the fact that consecutive peaks are also consecutive in angle with an interval of 2π, we can derive three parameters for the LPPL model (see Section 3 for details).
Our extensive approach avoids being trapped in local minima and provides a good and robust forecast, with the imposition of constraints on LPPL parameters.The results show that our algorithm outperforms with regard to capturing financial crashes.Our predictions of critical times are highly concentrated around the actual times when crashes took place.Using diagnostic analysis, we also show relatively small and stationary residuals.
The remainder of this paper is organised as follows: Section 2 summarises the underlying mechanism of the LPPL model.Section 3 explains the methodology and data that we use to fit the LPPL parameters.Section 4 presents the prediction results, diagnostic tests, and model comparisons.In the final section, we provide a conclusion and discuss future research.

Theoretical Framework
There are two groups of traders, a group of rational traders who are identical in their preferences and characteristics and a group of noise traders whose herding behaviour leads to bubbles.The rational traders, however, do not likely eliminate mispricing through arbitrage but continue investing as noise traders do because the time of a crash is unknown and the risk of a crash is compensated for by a higher return generated by bubbles.Therefore, the no-arbitrage condition resulting from the rational expectation theory is more than a useful idealisation, as it describes a self-adaptive dynamic state of the market [4].
The dynamics of the asset price p t before a crash is given by the following stochastic differential equation where μ t is the drift, j is the jump process whose value is zero before the crash and one after the crash, and κ is the jump size.We assume no arbitrage in the market so that the price process satisfies the martingale condition E t dp t = μ t p t dt − κp t h t dt = 0, where h t denotes the hazard rate (hazard rate is the probability that if the bubble survives to a certain point, it will crash during the next unit of time).Then, we have This indicates that rational traders are willing to accept the crash risk only if they are rendered by high profits, which is a risk-return trade-off.Substituting (2) into (1), we obtain the differential equation before the crash given by d ln p t = κh t dt, whose solution is The macrolevel hazard rate can be explained in terms of the microlevel behaviour of noise traders.A large amount of simultaneous sell-off, which triggers a crash, is attributed to the noise traders' tendency to imitate their nearest neighbours.Besides the tendency to herd as one force that tends to create order, an idiosyncratic signal is received as the other force to influence noise traders' decisions, which causes disorder to fight with imitation.A crash happens when order wins, while disorder dominates before the critical time.

Complexity
Johansen et al. [4] introduced a dynamic stochastic model for microlevel behaviour in which each trader i (for i = 1, … , n) can either buy s i = +1 or sell s i = −1 .The current state of trader i is determined by where K is the tendency toward imitation, N i is the set of traders who influence trader i, σ is the tendency toward idiosyncratic behaviour, and ε i is a random variable.Note that (4) only describes the state of an individual agent.To explain the macrolevel hazard rate, we should be concerned with the average state of the whole system.In particular, the hazard rate can be represented by the sensitivity of the average state to a global influence, which is called the susceptibility of the system.Assume that a global influence term G is added to (4) and the average state of the market is given by M = 1/I ∑ I i=1 s i .Then, the susceptibility of the system is defined as X = dE M /dG| G=0 , which measures the sensitivity of M to a small change in the global influence.The form of X depends on the structure of the network that links individual agents.
Johansen et al. [4] proposed a hierarchical diamond lattice structure to model the network.The lattice structure has a general solution of susceptibility given by a first-order expansion as follows where K c is the tendency toward imitation at the critical time t c .If K evolves smoothly, we can apply a first-order Taylor expansion around the critical point t c .Then, prior to t c , we get the following approximation Given that the hazard rate of the crash behaves in the same way as the susceptibility in the neighbourhood of the critical point, we get where 1 − β > 0 is the critical exponent of hazard rate like that of susceptibility.Substituting (8) into (3) and integrating provide (9), which is known as the LPPL model where Y t > 0 is the log of price at time t, A > 0 is the log-price at the critical time t c , B < 0 is the increase in Y t over the time before the crash when C is close to 0, C ∈ −1, 1 controls the magnitude of oscillations around the exponential trend, t c > 0 is the critical time, β ∈ 0, 1 is the exponent of the power law growth, ω > 0 is the frequency of the fluctuations during the bubble, and ϕ ∈ 0, 2π is a phase parameter.

Methods and Data
3.1.Fitting the LPPL Parameters.The basic form of the LPPL given by ( 9) requires the estimation of seven parameters.The parameter set must be such that the root mean square error (RMSE) between the observation and the predicted value of the LPPL model is minimised as follows where y t and T denote the log of observation at time t and the number of trading days in the dataset.Let f t = t c − t β and g t = t c − t β cos ω ln t c − t + ϕ ; then, the LPPL model, (9), can be rewritten as It is straightforward to estimate the parameters A, B, and C using ordinary least squares (OLS) given the four parameters β, ω, t c , and ϕ.Thus, estimating these four parameters is the main task for applying the LPPL model.
We fit the LPPL parameters with two steps.In the first step, we produce the initial values for the parameters with a price gyration method.In the second step, we optimise these parameters using a nonlinear optimisation algorithm, GA.Such an indirect method is acceptable for nonlinear models, because the estimation results are sensitive to initial values and stochastic environment (the advantage of a two-step approach is, namely, from price gyration, that we can obtain an initial population for the parameters, purely based on data.However, it takes a long computing time, which is a clear disadvantage.It will not be a big issue due to the recent developments in parallel computing and multiprocessing (see Appendix A)).
Liberatore [8] defined a price gyration method to produce the initial values of the LPPL parameters by visually inspecting stock prices as follows: (1) Identify three consecutive stock price peaks, that is, i, j, and k; (2) Estimate the initial values of t c , ω, and ϕ from the price gyration as (3) Set the initial values of other two parameters, that is, β = 1 and C = 0; and (4) Estimate the initial values of A and B using an OLS fit Pele [9] extended Liberatore's [8] approach using an automatic peak detection algorithm [13] described as follows: 3 Complexity (1) Define a peak function S i which associates a score with element y i and distance κ (2) Screen the series of S i using S i > 0 and S i − m > hs, where m and s are the mean and standard deviation of S i and h is a positive coefficient (the value of h indicates how many standard deviations the selected peaks should be away from the mean.A higher h value means a stricter rule on detecting peaks.h is typically set within 1 ≤ h ≤ 3.In our paper, we follow a moderate rule on peak detection and choose h = 1 5 following Palshikar [13]); and (3) Then, retain only one peak with the largest value from any set of peaks within a fixed distance κ which rolls across the whole sample, and finally obtain the peak series.
Once the peaks are detected, price gyration might encounter following problems.The prediction results are not stable for different window sizes, and the estimation of critical times is not sufficiently accurate if peaks are too far from the last day of observation.To eliminate these issues, we relax and improve the idea of a fixed window size and equally weighted peaks.Our window size κ for peak detection is no longer fixed, which allows us to test for different possibilities of a fluctuating cycle of LPPL growth.Because more recent data have included more information on forecasting, we further implement a distance-based weighting approach for peak selection.After obtaining a series of peaks, we calculate the weight of each peak i where T is the sample size of the time series.We standardise the value so that the sum of the weights of all the peaks is equal to 1.Then, the weight of each peak i is where n is the total number of peaks.
The second cornerstone of our algorithm is the use of a GA to fit the LPPL model.Compared with other nonlinear optimisation algorithms, such as the quasi-Newton and the LMA, the GA has many advantages.It avoids potential local minima because the search for solution runs in parallel and does not require additional information about the shape of the calculated plane.Moreover, the objective function does not need to be continuous or smooth.The GA is implemented using the following steps: (1) Each member of the initial population is a vector of the seven LPPL parameters (A, B, C, t c , β, ω, and ϕ) generated by our improved price gyration algorithm.
The RMSE is calculated for each member; (2) An offspring is produced by randomly drawing two parents, without replacement, and calculating their arithmetic mean.If any parameter value is outside the constraint, it is set as the closest boundary value; (3) A mutation perturbs the solution so that new region of the search space can be explored.The mutation process is performed by adding a perturbation variable to each coefficient in the current population.If the perturbation drives the parameters out of the constraints, the closest boundary value will be given to these parameters as in step 2; (4) After breeding and mutation, we merge the newly generated individuals into the population.All the solutions are ranked according to their RMSEs in an ascending order, and only half of the best solutions can survive to the next generation; and (5) We iterate this procedure and choose the best fit as the final solution.
Johansen and Sornette [7] and Jacobsson [14] found that whether an LPPL model can capture crashes well depends, to some extent, on the specific bounds of the critical parameters β and ω.Based on their finding, we impose constraints on the LPPL parameters that are consistent with the previous literature.Table 1 defines the constraints on the LPPL parameters.
Our algorithm combines the price gyration method with the constrained GA, which extends existing research using a floating window size for peak detection and the distancebased weighting approach for peak selection.To summarise, the algorithm which we propose is implemented as the following steps: (1) Detect the peaks of the sample with window size κ following Palshikar [13] and Pele [9]; (2) Assign the distance-based weight to each peak; (3) Randomly select three consecutive peaks based on the weights; (4) Use these three consecutive peaks for price gyration and obtain the initial values for t c , ω, and ϕ; 4 Complexity (5) Set the initial values β = 1 and C = 0, and estimate the initial values of A and B using OLS; (6) Repeat steps 3 to 5, and obtain a series of initial values for the seven LPPL parameters; (7) Find the LPPL parameters using the constrained optimisation, GA, with the initial population of the parameters from step 6; and (8) Repeat steps 1 to 7 with changing the window size κ, and obtain the prediction interval for the critical time t c .
3.2.Data.First, we need to identify financial bubbles and crashes.A financial bubble occurs when the asset price continues to increase for a long period of time beyond its fundamental value, whereas a financial crash is defined as a substantial decrease of the asset price when the bubble bursts.
A critical time is the peak of a bubble that initiates a crash.Following Brée and Joseph [17], we identify a peak based on two conditions: (i) 262 weekdays prior to the peak, there is no value higher than the peak; and (ii) after the peak, stock prices decrease by more than 25% within a period of 60 weekdays.
Based on these criteria, we choose four stock market bubbles and market crashes that occurred during different time periods and in different financial markets: (i) the dot-com bubble in the late 1990s (stock markets saw their equity value increased rapidly from growth in the Internet sector and related fields in the late 1990s.The collapse of the bubble occurred during the period of 1999-2001); (ii) the Japanese asset price bubble in the late 1980s (real estate and stock prices were greatly inflated.The bubble was characterised by a rapid acceleration of asset prices and overheated economic activity, in addition to an uncontrolled money supply and credit expansion.By August 1990 (the fifth monetary tightening by the Bank of Japan), the NIKKEI stock index had plummeted to half of its peak price); (iii) the Hong Kong stock market bubble of 2007 (the announcement of the "through train" scheme by the State Administration of Foreign Exchange (SAFE) caused a frenzied boom in the Hong Kong stock market in 2007.In less than two months, the Hang Seng Index (HSI) increased from 20,000 to a peak of 31,958 at the end of October.As the central government of China postponed the "through train" scheme indefinitely, the Hong Kong stock market saw a substantial daily decrease of 1,526 points on December 5, 2007); and (iv) the Chinese stock market bubble of 2015 (the Shanghai Composite Index (SSEC) increased by approximately 150% within a year.Because of a series of government policies to deleverage the stock market, a third of the value of A-shares on the Shanghai Stock Exchange was lost within a month after June 2015.Subsequently, the market underwent two further crashes, in August 2015 and January 2016).The percentage decreases of four indices within 60 weekdays are 37% (NASDAQ), 28% (NIKKEI), 31% (HSI), and 43% (SSEC), respectively.Table 2 summarises information about these four episodes.The daily closing prices of the four indices are from the WIND database.
After identifying the financial bubbles and crashes, we need to select carefully the time window to estimate the LPPL model.Following Johansen and Sornette [7] and Brée and Joseph [17], we select the forecasting window as follows: (i) the time window starts at the end of the previous crash, that is, the lowest point since the last crash (as we select the most significant crash for each index, the amplitude of the previous crash cannot be as large as the major crash that we are investigating (i.e., more than a 25% decrease within a period of 60 weekdays), and thus the choice of the starting point is disputable.In this paper, we consistently choose the previous crash according to the following criteria: (i-1) when there is no higher value than the peak during a period of 262 weekdays prior to the peak and (i-2) when stock prices decrease by more than 20% within a period of 60 weekdays after the peak.As a result, prior to the major crash, there are less severe collapses in the selected four markets, which declined by 29% (NASDAQ), 21% (NIKKEI), 21% (HSI) and 23% (SSEC), respectively, within 60 weekdays); (ii) the day with the peak value of the index is the actual critical point of the bubble; and (iii) the last day of observation is divided into three different groups, which are ranged from one to three months (one quarter) before the actual critical time.

Results and Discussion
4.1.Empirical Results.We apply our algorithm to predicting the critical times of financial bubbles in the aforementioned four episodes.Table 3 summarises the forecasting results of our algorithm.The last column P 60 denotes the percentage of predicted critical times within 60 weekdays around the actual critical time.IQR is the interquartile range of the predicted critical times, which is computed by subtracting the first quartile from the third quartile.Table 3 shows that our algorithm provides a good forecast of the four stock market crashes.
We forecast a 95% prediction interval of critical times with a period of no more than 100 weekdays from the actual critical time for all the stock market crashes.The interquartile ranges of the predicted critical times are all within 50 weekdays, which means that our predictions are highly concentrated.Even though the last observation of the sample    6 Complexity changes from one month to three months before the actual critical time, our prediction intervals demonstrate a stable behaviour.Most of the predicted critical times are well within 60-weekday horizon of the actual critical time for all four episodes (P 60 ).
In addition to forecasting the critical time, it is important to justify the LPPL calibration, that is, to check the stylised features of LPPL, mentioned in Table 1.Table 4 shows the best LPPL fits for the four financial crashes estimated by our algorithm.Since we use the constrained GA, all the estimated parameters are well within the boundaries.The two conditions B < 0 and 0 1 ≤ β ≤ 0 9 ensure a faster-thanexponential acceleration of the log price, with a vertical slope at the critical time t c [15].The positive hazard rate always holds because the absolute value of C is restricted in one unit.The value of ω corroborates existing studies such as Johansen [16], who found that ω ≈ 6 36 ± 1 56 for 30 crashes in major financial markets.

Diagnostic Tests.
To reduce the possibility of false alarms, it is necessary to conduct a diagnostic analysis to demonstrate our predictions.We conduct the diagnostic analysis by considering the relative errors, the unit root test of the LPPL residuals, the sensitivity analysis of the LPPL parameters, and a crash lock-in plot (CLIP) analysis.
The relative error analysis of the best fits shows that the bubbles are well captured by our algorithm.In the analysis by Johansen et al. [4], most of the relative errors of the best fits were below 5%.Our algorithm significantly improves their results, demonstrating more accurate performance in capturing the four financial bubbles.The significance of our findings is quite evident and immediate in Figure 1, where the relative errors of all the fitting points of these four indices are well below 2%.
One key property of the LPPL model is that the residuals follow a mean-reverting Ornstein-Uhlenbeck (OU) process.Table 5 shows the results of the unit root tests.Both the augmented Dickey-Fuller (ADF) and Phillips-Perron (PP) tests with two lags for the best fit of the four indices reject the null hypothesis at a 1% significance level, which means that the residuals do not have a unit root but are stationary and thus compatible with a mean-reverting OU process.
We also investigate how sensitive the RMSE is to the variations of the LPPL parameters.Because A, B, and C are always estimated given the four parameters β, ω, t c , and ϕ, we examine the sensitivity of the LPPL fit to the variations 7 Complexity in these four parameters.We let t c and one parameter among β, ω, and ϕ vary for the NIKKEI, while the remaining parameters are fixed.The results in Figure 2 show that the variation of the RMSE is relatively smooth with respect to β, t c , and ϕ and that of the RMSE is highly sensitive to small fluctuations in ω. Figure 2 provides significant evidence supporting the choice of a GA instead of the LMA to fit the LPPL model.If the initial value of ω is close to a local minimum, the searching algorithm of the LMA can be easily trapped because it achieves a local optimum.Compared with the LMA, the search of a GA runs in parallel, which means that even when a local minimum has been found, small variations in the parameters might avoid the search procedure becoming trapped.In addition, it is natural to obtain multiple values of ω leading to a local minimum of RMSE.ω is the angular frequency for a periodic function.A periodic function may have multiple periods, as f t = f t + nT , where T = 2π/ω is the shortest period for n = 1, 2, … , and so on.The estimation result of ω in Table 4 is in line with Johansen [16].The log-periodic oscillations can be neither too slow (otherwise they would contribute to the trend) nor too fast (otherwise they would fit the random component of the data) [15].
Finally, we analyse CLIP following Fantazzini [18].A CLIP is a useful tool for tracking the development of a bubble and understanding whether a possible crash is imminent.The main idea of a CLIP is to plot the date of the last observation in the estimation sample on the horizontal axis and the estimated crash date t c on the vertical axis.If a regime change in the stock market is approaching, then, the estimated t c should be stabilised around a constant value close to the critical time.To implement a CLIP, we continue changing the last observation of our estimation sample consecutively from one month to three months before the actual critical time and make predictions for the four financial bubbles.From Figure 3, we can see that our results for t c are stable, especially from the last one quarter before the crash.Moreover, the predicted critical times t c are very close to the actual critical time.These results indicate that when a crash is imminent, our algorithm provides a robust and precise forecast of the critical time.

Model Comparison.
As a final step, we compare the prediction accuracy of critical time t c for the following two models: (i) the price gyration algorithm for searching initial values and the LMA for optimisation, M1, and (ii) the improved price gyration algorithm, which is applied with floating window sizes and a distance-based weighting approach, and a constrained GA for optimisation, M2.
For both methods, we forecast the critical time t c using different final observations of the estimation sample from one to three months before the actual critical time and merge the results into one sample.The probability density functions of estimated critical times t c are shown in Figure 4. We can observe that M1 does not predict critical time well because it produces t c either far away from the actual critical time such as NASDAQ or strongly biased such as NIKKEI, HSI, and SSEC.Put differently, M2 predicts a relatively accurate t c compared with M1.Most of the predicted critical times t c are close to each other and highly concentrated around the actual critical time, which demonstrates that our method, M2, outperforms M1.Detailed comparison with other estimation algorithms employed in the literature is presented in Appendices A and B.

Conclusions
This paper provides an algorithm to predict the critical time of financial bubbles with an LPPL model.The parameters are estimated by minimising the cost function by means of a nonlinear optimisation method.This algorithm consists of two steps: (i) a price gyration method to generate an initial candidate of parameters and (ii) a GA to find the optimal solution.Specifically, we go beyond the price gyration method in the previous literature.In our case, different window sizes are applied to peak detection since the fixed window size may omit the possible variation in the cycle of LPPL growth.Given the peaks detected, we assign the distance-based weights on each peak according to its distance from the last observation in the estimation sample.The distance-based weighting method makes the estimation accord with reality; that is, the recent data include more information on forecasting.We also use simulated annealing to optimise the model and find that the results are almost the same as those of a GA (up to 10 −4 ).Therefore, we attribute the success of our algorithm to the price gyration method with different window sizes and the distance-based weighting approach.
For validation, we perform an ex-ante prediction on the time of crashes on four stock market indices.The critical time of the bubbles, when the crashes may happen with significant probability, is one of the parameters in the LPPL model.Our predictions on critical time are highly concentrated around the actual time.Moreover, a diagnostic analysis demonstrates our results in different aspects.First, we generate smaller prediction errors for the LPPL model.Second, our prediction is stable with respect to varying the termination time of the observation period.Third, in terms of the degree of concentration and accuracy, we present a more significant and robust improvement than existing algorithms.
Our work focuses on bubbles and crashes in stock prices, and it can be further extended to other assets, such as real estates and foreign exchange rates, where both bubbles and herding behaviour can be observed, because the LPPL model describes the dynamics of financial bubbles generated by positive feedback mechanisms, especially the herding behaviour of noise traders [19][20][21][22].However, the LPPL model mainly focuses on the time period prior to crashes, therefore it leaves blank the price behaviour in the postcrash periods even when mispricing may still exist, which is of policy significance in order to stabilise and boost the economy once crashes occur.In addition, since the parameters in the LPPL characterise stock markets, they have a considerable potential to be related to economic fundamentals.Thus, as future research, additional analysis of whether and how the LPPL model reflects macroeconomic conditions would be of interest.

Appendix A. Computational Efficiency and Accuracy
We evaluate the computational efficiency of the four algorithms in terms of running time per each iteration.The whole computational effort per each iteration is the sum of running time needed to generate a set of initial values and to minimise the RMSE.We compare the computational efficiency of our algorithm with that of others in Table 6 using the NASDAQ case.The number of necessary iterations I and prediction results, that is, either (i) point estimate and its bias against actual crash date tc − t c or (ii) interval estimate (95% prediction interval) and P 60 , are also reported.
The Tabu search algorithm for generating initial values and the LMA for optimisation, named as TL, and GA provide a point estimator about t c , which is the only statistic that these algorithms yield by minimising the RMSE.However, they have no way of conducting a hypothesis test and justifying their clinical usage.The other algorithm, M1, runs even more efficiently than the first two and is able to construct a confidence interval.However, it generates estimation results on a broad spectrum and leads to a wide prediction interval and poor values of P 60 .On the contrary, our algorithm, M2, achieves precise estimation with a narrow prediction interval, and most estimates locate within 60 weekdays of the actual crash date.Since our algorithm includes GA, it takes as much time as other global optimisation approaches, such as Tabu search and pure GA.Especially when a large number of iterations is implemented, the efficiency of our algorithm is much lower than that of others.We, however, can exploit parallel computation on a general-purpose multicore process to heavily cut down the computational time.In short, there is a trade-off between estimation accuracy and computational efficiency.
We further provide a comparison between three major approaches and ours in Appendix A. One of the most common approaches is the 2-step nonlinear optimisation.First, 10 potential sets of solutions can be obtained using a so-called Tabu search [24].Second, each of these 10 solutions is used as a set of initial values in an LMA, a nonlinear least square algorithm.Finally, the set of parameters that produces the minimum sum of squared errors between the fitted model and the observations is taken as the final solution [4].
As an alternative to relying on gradient-based optimisation methods, such as LMA, a GA can be utilized for LPPL estimation.GA is a metaheuristic algorithm motivated by the process of natural selection belonging to the larger class of evolutionary algorithms.GA is commonly employed to obtain high-quality solutions of optimisation including searching problems by relying on bio-inspired operators such as mutation, crossover, and selection.GA overcomes the problem of local minima and allows for the setting of reasonable constraints on parameter spaces [12,14].
Unlike the two methods above which find the best fit by minimising the sum of squared errors (as a cost function), Fantazzini [18] proposed a 2-or 3-step maximum likelihood (ML) for a generalised LPPL model in which strong autocorrelation and heteroscedasticity of residual terms are allowed.This approach estimates the LPPL model with a reversed time series called "anti-bubbles."The 2-step approach estimates the original LPPL parameters and other parameters related to residual terms separately in two stages.The 3-step approach includes one more step at the beginning of the 2-step approach to provide the set of initial values for LPPL parameters.This ML optimisation method employed the Broyden, Fletcher, Goldfarb, Shanno (BFGS) algorithm that searches for a zero gradient.Similar to other gradient-based optimisation approaches, the main disadvantage of this approach is that it can be easily trapped in local minima.
One of the weaknesses of those algorithms is that they can only provide point estimation results, and thus the statistical robustness of the results is low.Liberatore [8] proposed a price gyration method to provide initial solutions to LMA based on the peaks of price trajectory.Compared to other methods such as Tabu search that provides a set of initial values, the price gyration method utilizes richer information, presented in the microstructure of price trajectory.With the abundant initial values generated by price gyration, we can obtain a distribution of LPPL parameters for interval estimation.
A recent paper [23] used a modified profile likelihood inference to provide interval estimation for the critical time in the LPPL model.It takes into account the impact of other nonlinear (or "nuisance") parameters for correct adjustment of the uncertainty regarding the critical time.Similar to modified profile likelihood, our method provides interval estimation.However, we incorporate parameter uncertainty not by assuming a certain probability distribution of error terms but rather through price gyration, which systematically generates a set of initial values in the parameter spaces.
Our algorithm, M2, is closely related to parallel LMA, M1.The first step of price gyration is to detect peaks, which are a local maximum within a window.Once the peaks are detected, price gyration might encounter certain problems.Specifically, the prediction results can be unstable for different window sizes, and the estimation of the critical time is not sufficiently accurate if the peaks are too far from the last observation of the sample.Hence, we further improve the price gyration method in two ways.First, we detect peaks by varying the window size, which allows for the possibility of different lengths of cycle.Second, we implement a distance-based weighting approach for peak selection; that is, the more recent the peak is, the greater the probability it will be selected.In addition, we substitute GA for LMA to search for the global minima.Furthermore, we also compare M2 with the original 2-step nonlinear optimisation and pure GA, both of which only provide point estimation, presented in Table 6.

Figure 1 :
Figure 1: Relative error analysis of the best LPPL fits.

Figure 2 :
Figure 2: Sensitivity analysis of the RMSE to LPPL parameters (NIKKEI).

Table 2 :
Data description."Time period" is the maximum time span used in our estimation, and "Observation" is the total number of data points in the sample."Critical time" is the date which corresponds to the peak of bubbles.

Table 3 :
Summary of predicted critical times.The last date is divided into three different groups, which are from one to three months before the actual critical point.

Table 4 :
LPPL parameters of the best fit.

Table 5 :
Unit root test for LPPL residuals.We reject the null hypothesis; that is, the residuals have a unit root, at 1% significance level ( * * * ).

Table 6 :
Computational effort of the four different algorithms.