Complexity

Volume 2018, Article ID 4237471, 12 pages

https://doi.org/10.1155/2018/4237471

## Forecasting Financial Crashes: Revisit to Log-Periodic Power Law

^{1}Saïd Business School and Green Templeton College, University of Oxford, Park End Street, Oxford OX1 1HP, UK^{2}Shenzhen Goofar Sanxin Fund Management, Qiushi Building, Shenzhen 518000, China^{3}HSBC Business School, Peking University, University Town, Shenzhen 518055, China^{4}Graduate School of Future Strategy, Korea Advanced Institute of Science and Technology (KAIST), Daejeon 34141, Republic of Korea

Correspondence should be addressed to Kwangwon Ahn; rk.ca.tsiak@nha.k

Received 19 February 2018; Revised 19 April 2018; Accepted 5 June 2018; Published 1 August 2018

Academic Editor: Gonzalo Ruz

Copyright © 2018 Bingcun Dai et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

#### Abstract

We aim to provide an algorithm to predict the distribution of the critical times of financial bubbles employing a log-periodic power law. Our approach consists of a constrained genetic algorithm and an improved price gyration method, which generates an initial population of parameters using historical data for the genetic algorithm. The key enhancements of price gyration algorithm are (i) different window sizes for peak detection and (ii) a distance-based weighting approach for peak selection. Our results show a significant improvement in the prediction of financial crashes. The diagnostic analysis further demonstrates the accuracy, efficiency, and stability of our predictions.

#### 1. 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–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 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 , 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.

#### 2. 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 before a crash is given by the following stochastic differential equation where is the drift, 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 , where 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 , 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.

Johansen et al. [4] introduced a dynamic stochastic model for microlevel behaviour in which each trader (for ) can either buy or sell . The current state of trader is determined by where is the tendency toward imitation, is the set of traders who influence trader , is the tendency toward idiosyncratic behaviour, and 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 is added to (4) and the average state of the market is given by . Then, the susceptibility of the system is defined as , which measures the sensitivity of to a small change in the global influence. The form of 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 is the tendency toward imitation at the critical time . If evolves smoothly, we can apply a first-order Taylor expansion around the critical point . Then, prior to , 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 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 is the log of price at time , is the log-price at the critical time , is the increase in over the time before the crash when is close to , controls the magnitude of oscillations around the exponential trend, is the critical time, is the exponent of the power law growth, is the frequency of the fluctuations during the bubble, and is a phase parameter.

#### 3. 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 and denote the log of observation at time and the number of trading days in the dataset.

Let and ; then, the LPPL model, (9), can be rewritten as

It is straightforward to estimate the parameters , , and using ordinary least squares (OLS) given the four parameters , , , 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, , , and ;(2)Estimate the initial values of , , and from the price gyration as , , and with ;(3)Set the initial values of other two parameters, that is, and ; and(4)Estimate the initial values of and using an OLS fit

Pele [9] extended Liberatore’s [8] approach using an automatic peak detection algorithm [13] described as follows: (1)Define a peak function which associates a score with element and distance (2)Screen the series of using and , where and are the mean and standard deviation of and is a positive coefficient (the value of indicates how many standard deviations the selected peaks should be away from the mean. A higher value means a stricter rule on detecting peaks. is typically set within . In our paper, we follow a moderate rule on peak detection and choose 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 where 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 . Then, the weight of each peak is where 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 (, , , , , , 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.