Nonlinearity everywhere: implications for empirical finance, technical analysis and value at risk

We show that expected returns on US stocks and all major global stock market indices have a particular form of non-linear dependence on previous returns. The expected sign of returns tends to reverse after large price movements and trends tend to continue after small movements. The observed market properties are consistent with various models of investor behaviour and can be captured by a simple polynomial model. We further discuss a number of important implications of our findings. Incorrectly fitting a simple linear model to the data leads to a substantial bias in coefficient estimates. We show through the polynomial model that well-known short-term technical trading rules may be substantially driven by the non-linear behaviour observed. The behaviour also has implications for the appropriate calculation of important risk measures such as value at risk.


Introduction
It is fundamental in the study of asset markets to understand the cross-sectional and inter-temporal relationships between assets. Simple linear models have generally been used for this purpose and have the advantages of being tractable and well understood and they also have been shown to give a reasonable first-order approximation of many of the processes involved. Simple linear models of expected stock returns, however, cannot capture properties of the data which have been proposed in prior empirical and theoretical studies concerning stock behaviour. In particular, many studies have shown that stock prices tend to reverse after large price movements. An associated property is a tendency for trends to be observed in the data. In this paper, we use non-linear modelling to test whether stock price movements are, in general, consistent with the prior studies discussed above and then investigate some important implications of this. There has been substantial prior work on nonlinear modelling of market returns [Moreno and Olmeda (2007) give a summary of inter-temporal work in this area. Kolm, Tütüncü, and Fabozzi (2014) and Carroll et al. (2017) give summaries of cross-sectional work]. Our approach differs from prior work in being motivated by using the most parsimonious and tractable possible model that can directly capture and test for generalised stylised facts that have frequently been observed in prior research studies on particular and much less comprehensive data sets. We do not particularly aim to find an optimal non-linear model for prediction or in-sample fit but instead to find whether a simple model can capture the salient features in which we are interested and then to investigate some of the implications of this.
Our main contribution is to show that on daily data the expected returns on US stocks and all major stock world market indices are non-linearly dependent on previous returns in a way consistent with the literature on large price changes and market frictions. In particular, there is a very pervasive tendency for the sign of returns to reverse after large price movements and for trends to continue after small price changes. These properties can be captured by a simple polynomial non-linear model suggested by the properties of the data.
A potential drawback of a non-linear approach is that there are numerous potential non-linear models. Our proposed polynomial model has the advantage of being extremely easy to fit and interpret. It also enables us to show some important implications for a number of areas in the finance literature. We show that in these areas fitting simple linear models to the data leads to substantial problems. We demonstrate that well-known technical analysis trading rules may be substantially driven by the non-linear behaviour we observe in the data. We further show that neglecting the non-linear aspect of the data may result in underestimates of value at risk. We expand on these implications in the paragraphs below.
One implication of our findings relates to the relationship between economic theory, basic time series analysis and the appropriateness of linear models. Early and seminal work in finance shows that if markets discount all available information, prices will follow a martingale process where the expected value of future prices will be independent of the value of past prices (Samuelson 1965;Mandelbrot 1966). This leads to the question of whether independence can be supported empirically which is somewhat difficult to answer definitively given there is infinite number of possible underlying return generation processes. A very simple and direct way of investigating the independence of future prices from past price is by looking at the autocorrelation of stock returns. It is now regular practice to deal with any issues related to the independence of expected future returns from past returns by fitting simple lagged returns to deal with any modest autocorrelation in the return series (see, for example, Edmans, Garcia, and Norli 2007;Kaplanski and Levy 2010). Whilst very convenient this practice is not necessarily theoretically sound as an absence of autocorrelation does not imply independence (Cont 2001). Thus allowing for autocorrelation by fitting lagged returns in a linear model will not necessarily result in a series of independent returns. Given the non-linear nature of returns, we show that adjustments based on simple linear models of this type will not, in fact, create a series of independent returns. We show that using a simple linear AR (1) model instead of the appropriate non-linear model results in substantial bias in the coefficients of the model and in many cases causes changes in significance.
Another important implication of non-linearity of the form we have identified is its association with trends in the data and consequently possible connections to trend-following rules in technical analysis. We show that can substantially explain the short-term predictive power of moving average and trading range break rules which are important classes of rules in technical analysis. This finding is likely to have similar implications for other predictive methods which are based on extrapolating trends in the data. We consider the implications of our findings for the calculation of risk measures taking the standard value at risk (VaR) measure as an example. We show that neglecting non-linear effects can lead to risk measures being substantially underestimated which is clearly potentially very important for many financial institutions.
The remainder of the paper is organised as follows. Section 2 reviews the relevant literature. Section 3 outlines our data. Section 4 outlines our methodology. Section 5 presents our results. Section 6 discusses implications and Section 7 presents conclusions.

Literature review
In this literature review, we briefly review the literature on the market responses to large price changes and the related literature on the tendency for trends to be observed in the data. Then we review the literature on technical analysis and finally that on value at risk.

Responses to large price changes
There is a large literature documenting the fact that financial market prices can be predicted conditional on large price changes. For instance, early papers by Brown, Harlow, and Tinic (1988;1993), Atkins and Dyl (1990), Bremer and Sweeney (1991), Cox and Peterson (1994) and Park (1995) all find that stocks with a large negative return in a particular period (normally a day) consequently have larger than expected positive returns over the following days. Numerous other papers have subsequently confirmed these findings (see, Amini et al. 2013; for a review of this literature). Many different markets have been studied including individual stocks (Zawadowski, Andor, and Kertész 2006;Lobe and Rieks 2011), stock market indices (Rezvanian, Turk, and Mehdian 2011;Yu, Rentzler, and Tandon 2010), futures markets (Fung, Mok, and Lam 2000;Grant, Wolf, and Yu 2005), government bonds (Kassimatis, Spyrou, and Galariotis 2008), commodity futures (Mazouz and Wang 2014) and cryptocurrency markets (Borgards and Czudaj 2020). The precise methodology used in this literature varies across papers as do some of the empirical findings. Regarding the definition of a large price change, a figure of 10% is usually used for stocks (see for example Peterson, 1994;Choi and Jayaraman 2009) while some papers have used the residuals from market models (Brown, Harlow, and Tinic 1988;1993) or returns that exceed some past standard deviation of returns (Lasfer, Melnik, and Thomas 2003;Pritamani and Singal 2001). A few papers take a more general approach and use a range of magnitudes or a continuous function to examine returns after price changes of all sizes (Hudson, Keasey, and Littler 2001;Amini, Hudson, and Keasey 2010). There have been ongoing debates about whether both large price falls and rises are followed by reversals and the causes of reversals with microstructure effects, rational responses to risk and behavioural factors such as overreaction all being proposed (Amini et al. 2013). Another issue is that the literature is also rather fragmented in its geographical and time coverage leaving open the question of the generality of this type of behaviour (Amini et al. 2013).
A closely related literature is that on the MAX effect in financial markets, first proposed by Bali, Cakici, and Whitelaw (2011), where US stocks with a previous large return perform poorly in the subsequent period. This effect has been supported by numerous studies using European stocks (Walkshäusl 2014), Australia equities (Zhong and Gray 2016), the Hong Kong market (Chan and Chui 2016) and mainland China (Nartea, Kong, and Wu 2017).

The tendency for prices to trend
Several strands of the finance literature deal with the tendency for prices to trend. Prices may underreact to news because of trading costs (Ng, Rusticus, and Verdi 2007) or news may only be incorporated slowly into prices (Barber and Odean 2008). There may also be spurious trends in the data caused by non-synchronous pricing (Day and Wang 2002). In addition, behavioural biases may cause the extrapolation of perceived trends in the data (Bloomfield and Hales 2002).
Also related to this area of research is time-series momentum, first proposed by Moskowitz, Ooi, and Pedersen (2012) where the previous 12-month return of an asset positively predicts future returns. 1 This finding has been strongly supported in the literature by Asness, Moskowitz, and Pedersen (2013), Georgopoulou and Wang (2017), Lim, Wang, and Yao (2018) and Hurst, Ooi, and Pedersen (2017). The literature on momentum crashes (Daniel and Moskowitz 2016) is also potentially relevant to our work although it largely deals with cross-sectional rather than time-series momentum. The idea that the profits from momentum strategies may severely decline in panic states of the market or when volatility is high certainly has some similarities to aspects of our investigation. Whilst the tendency for markets to trend but also to reverse after large price moves describe rather different market properties it is desirable to use market models that can incorporate both properties which is one of the key attributes of our proposed approach.

Technical analysis
Technical analysis is a popular tool used by investors to predict future price movements as these prices tend to follow trends. There are two main categories for technical trading rules, namely those that follow a qualitative form, and those that follow a quantitative form. The qualitative form is where charts are analyzed and attempts are made to identify patterns in the data while the quantitative form is the analysis of past prices through timeseries analysis to construct trading signals. The main difference between the two is that, given a certain rule, quantitative technical analysis is completely objective and every individual should come to the same conclusion while qualitative technical analysis is subjective and individuals may come to different conclusions from the same chart (Hudson and Urquhart 2019).
Practitioners have used technical analysis extensively to predict future prices, with Smith et al. (2016) showing that 21.6% of live hedge funds use technical analysis while Menkhoff (2007) reports that technical analysis is widespread in the foreign exchange market. In the academic literature, technical analysis has been found to offer high predictive power in the foreign exchange market (for instance Poole 1967;Neely, Weller, and Dittmar 1997;Hsu, Taylor, and Wang 2016), equity markets Hudson, Dempsey, and Keasey 1996;Han, Yang, and Zhou 2013), commodity futures markets (Miffre and Rallis 2007;Szakmary, Shen, and Sharma 2010;Han, Hu, and Yang 2016), commodity spot markets (Batten et al. 2018;Psaradellis et al. 2019), bond markets (Shynkevich 2016) and even in cryptocurrencies (Hudson and Urquhart 2019;Gerritsen et al. 2020;Grobys, Ahmed, and Sapkota 2020).
A huge variety of rules are used in technical analysis but two of the most fundamental ones which have been extensively investigated in academic studies are the moving average rule and the trading range break rule. The seminal paper by Brock, Lakonishok, and LeBaron (1992) showed that these rules are predictive on long-run US data and these findings have been confirmed in studies on many other markets and time periods (see, Hudson, Dempsey, and Keasey 1996, for another long run study using UK data and Park and Irwin 2007, for a general survey of the literature).

Value at risk
Value at risk (VaR) has been a standard risk measure used by regulators and the financial services industry for many years and aims to measure the probability of a given loss over a particular time period. Whilst the concept of the measure is quite straightforward obtaining accurate estimates of its size has been the subject of a very large academic literature as it is very sensitive to the assumed properties of the underlying assets (Hull 2015). In particular, taking account of the fat tail properties of asset returns is widely acknowledged to be crucial (Jorion 2011). The importance of considering the autocorrelation of assets has also not been neglected (Hull 2015). Judging the effectiveness of a VaR model is also very important and various forms of back testing are often used for this purpose. One important approach is to consider the number of 'exceedences' or 'exceptions', that is, the number of times the estimate of the measure has actually been exceeded in the past compared to the number of times it was expected to be exceeded (Kratz, Lok, and McNeil 2018).

Data
The data used in this study covers daily share price data of all common shares traded on NYSE, AMEX, and NASDAQ between 1925 and 2019, as well as stock market indices of 39 developed and emerging markets for the period between 1994 and 2019. 2 We obtain stock data from CSRP (The Center for Research in Security Prices). Using the Daily Stock File from CRSP, the whole stock sample includes 49,478,887 firm-day observations for which bid and ask prices are available. The stock market indices are obtained from DataStream International and include a total of 255,505 index observations.
For the daily US stock data, we employ logarithmic returns where price is the average of bid and ask prices. The descriptive statistics for the US stock data are shown in Table 1. The descriptive statistics are as expected with daily means that are small in absolute value, considerable larger standard deviations and substantial maximum and minimum daily returns. The autocorrelations are modest in numerical terms and negative although highly statistically significant due to the large sample size.
For the stock market index returns we also calculate logarithmic returns where price is the closing value of the index. The descriptive statistics for the stock market indices are shown in Table 2 with developed countries  in Panel A and developing countries in Panel B. Again the descriptive statistics are broad as expected with daily means that are small in absolute value, considerable larger standard deviations and substantial maximum and minimum daily returns. For the developed markets the autocorrelations are modest in numerical terms and nearly all positive with quite a number being significant. The USA is unusual in having an autocorrelation level which is negative to a statistically significant extent. For the developing markets, the autocorrelations are again almost all positive and tend to be somewhat larger with a greater likelihood of statistical significance than those of the developed countries.

Methodology
We initially examine US stocks using panel data approaches as the number of individual time series involved is rather unmanageable in presentational terms. We then move to the stock indices and do some additional analysis on the individual time series for the various indices. Overall, we use discrete and continuous empirical analysis on US stocks and individual time series indices as follows.

Discrete empirical analysis
Initially to get a clear qualitative feel for the nature of the results and for consistency with most of the prior literature which examines large returns, which are defined in a fairly arbitrary way (often as being larger than 10% in absolute terms), we analyse returns by reference to prior returns which have been divided into discrete bands broadly following the approach of Amini, Hudson, and Keasey (2010).
R t−1 can be divided into a number of groups (bands) by size Say we use bands

Continuous empirical analysis
Whilst the analysis using discrete bands above is consistent with most of the prior literature and helpful for given an intuitive feel for the underlying process it has obvious drawbacks. The bands are necessarily arbitrary and will also introduce discontinuities in the modelling of what is likely to be a continuous underlying distribution.
The choice of a particular continuous function is potentially quite problematic. Amini, Hudson, and Keasey (2010) address these issues by fitting a polynomial expression to a modest sample of 30 UK companies showing that it can capture the salient features of the data. We build on this approach and show that it gives robust and appropriate conclusions across our comprehensive data set. A simple polynomial function has the benefits of being flexible enough to accommodate the shape of the underlying function and is also tractable and can be easily compared to the standard AR(1) models used in the literature.
To avoid over-fitting the data we fit the lowest degree of polynomial that can fit the shape of the data and capture its turning points. Generally, the expected returns increase in line with prior innovations but the reversals after large price drops and rises indicate there are evidently two turning points in the function. Basic calculus indicates that a cubic is the lowest degree of polynomial that can capture the turning points in the data. One would also anticipate that the cubic term should have a negative coefficient.
is the cubic value of the return of firm i on day t − 1, β 1 , β 2 , β 3 are the coefficient for the return terms, α i is the firm-specific intercept that captures heterogeneities across firms, and u it is the error term.
We use panel data methodology to estimate the above model. The most important advantage of panel data is that it controls for unobserved heterogeneity. The choice between fixed effect and random effect is argued to be a model selection issue (Hsiao and Sun 2000) depending on whether unobserved heterogeneity in the error term is correlated with the explanatory variable or not. We choose the fixed effect model as the unobserved heterogeneity seems to be correlated with the explanatory variables. In other words, using fixed effect, we aim to control for firm-specific characteristics that may impact the explanatory variable (return).

Discrete empirical analysis
The empirical results for the discrete empirical analysis of US stock data are shown in Table 3. Notes: The table shows daily returns for US stocks by prior returns divided into discrete bands. The binomial test statistic is based on the normal approach to the binomial given the large sample size. It shows the number of standard deviations by which the observed number of positive returns in that band differs from the expected number given no difference between bands with respect to the probability of the sign of the next day return. * * * Indicates significance at the 1% level.
We observe reversals on the next day after both large price increases and large price drops, i.e. we see negative returns after increases of over 15% and positive returns after drops of over 10%. The same pattern is observed when we look at the cumulative average returns over the next five days. These findings are broadly consistent with much prior research although there has been a debate about whether reversals are observed after both large price rises and price drops (Amini et al. 2013). The associated t-statistics reported in the fourth column of the table indicate that the results are highly statistically significant. As an additional measure of robustness we also use the non-parametric binomial test (Hudson, Keasey, and Dempsey 1998) to examine the significance of our results. This test is robust to the nature of the underlying return distribution. The binomial test statistics are shown in the fifth column of the table. The statistics indicate that there is a negligible probability that the number of positive (negative) returns on the day after a large price change could occur if the bands were homogeneous in respect of the expected sign of the return on the next day.
After price innovations that are smaller in magnitude, we observe what could be described as the continuation of trends. After negative innovations, we see negative expected returns and after positive innovations, other than the smallest ones, we see positive expected returns. Both t-statistics and the results of the binomial tests strongly support the significance of these findings. Generally, the properties of the full range of innovations have not been explored in the literature although Amini, Hudson, and Keasey (2010) report a similar pattern of results for a small panel of 30 stocks quoted on the London Stock Exchange.
Results of the panel regression analysis are reported in Table 4. For the full sample (1925-2019), the explanatory variables in the model all have t statistics with a very high level of statistical significance confirming that they have a valid role in explaining returns and that a non-linear model is appropriate. The coefficient of the cubic term is negative which is consistent with the pattern of reversals after large changes. Therefore, overall, we find significant evidence of the expected form of non-linearity in our returns. For robustness, we examine the sub-samples 1925-1993 and 1994-2019 and see very similar patterns of results. Table 5 shows the results obtained by dividing prior returns into appropriate bands. The patterns revealed for next-day return as well as cumulative average returns over the next five days are broadly similar to those seen  in the analysis of the US stocks with price continuations after small price movements and reversals after the largest movements. In general, the t-statistics and the results of the binomial test show the results to be highly statistically significant albeit the reversals after the largest positive movements are not statistically significant probably due to the relatively small number of very large movements observed in index data.

Continuous empirical analysis
For the world stock market data we fit a cubic model as reported in Equation (1) using a panel data technique using a fixed-effect model. The results are reported in Table 6.
Similarly to the equivalent model for US stocks the explanatory variables in the model all have t statistics with a very high level of statistical significance confirming that they have a valid role in explaining returns and that a non-linear model is appropriate. Again, the coefficient of the cubic term is negative as expected.

Discrete empirical analysis
In order to determine how the individual stock market indices conform to our hypotheses, we fit the discrete innovation bands similar to Table 3 on each index separately. The full empirical results are too extensive to be reported here although they are available on request. Table 7 summarises the results in qualitative terms for convenience.
The yes and no indicators are a simple qualitative description of the nature of the post innovation returns. The intention is to summarise the very large quantity of data represented by the substantial number of discrete bands for each market. The way the descriptions have been arrived at is as follows for each country: To determine if there are continuation after small positive changes we see if at least two of the three smallest innovation bands above zero are followed by positive returns; to determine if there are continuation after small negative changes we see if at least two of the three smallest innovation bands in absolute terms below zero are followed by negative returns; to determine if there are reversals after large positive changes we see if at least one of the two largest innovation bands is followed by a negative expected return; to determine if there are reversals after large negative  Notes: The table shows returns for world stock indices by prior daily returns divided into discrete bands. The binomial test statistic is based on the normal approach to the binomial given the large sample size. It shows the number of standard deviations by which the observed number of positive returns in that band differs from the expected number given no difference between bands with respect to the probability of the sign of the next day return. * * * , * * and * indicates significance at the 1%, 5% and 10% levels.
i,t−1 + u it using panel data for world stock market returns. * * * Indicates significance at the 1% level.
changes we see if at least one of the two innovation bands representing the largest falls is followed by a negative expected return. These determinations aim to give a qualitative summary of the results but they are precise and not subjective. Although the pattern does not fit every market perfectly it is clear that most markets can be characterised as tending to move in trends with reversals after large price changes. The vast majority of the developed markets (and all of the developing markets) exhibit continuations after both positive and negative small price changes. A substantial majority of the markets, both developed and developing, show reversals after both large negative and large positive changes.

Continuous empirical analysis
Similarly to before, we fit a cubic model to each individual index time series of the form below This is similar to form to Equation (1) except we are now using individual time series rather than panel data. The results of the regressions are shown in Table 8. For all except at handful of countries (Austria, Belgium, Denmark, Ireland and South Korea) at least one of a 2 or a 3 is statistically different from zero. Moreover, most of these coefficients are statistically significant at the 1% or even the 0.1% level. Therefore, fitting an AR(1) model and ignoring higher powers of R t−1 would be omitting significant variables. a 1 is almost always positive (the only exceptions being Italy and China) and significant in the vast majority of cases. a 3 is almost always negative (the exceptions being Denmark, Italy, Switzerland and China with Denmark and Italy not having significant coefficients) and usually highly significant which is consistent with a tendency for reversals after large price movements. Table 9 shows some important results derived from the fitted values of Equation (2) for each country using calculus. If a 3 is negative, for consistency with reversals after large price changes and trends continuing following small price changes, we expect to find two turning points in the expected value of R t with the minimum at a value of R t−1 which is less than the value of R t−1 at which the maximum is located. In addition, the maximum positive rate of the derivative of R t with respect to R t−1 , which can be considered a measure of the level of trend   continuance in prices, should be at a value of R t−1 between the values of R t−1 associated with the turning points. By looking at the first derivative of Equation (3)  The maximum positive rate of the derivative of R t with respect to R t−1 , is almost always at a value of R t−1 between the values of R t−1 associated with the turning points. When the value of the derivative is considered in most cases the value is substantial particularly for the developing markets.
To briefly summarise our results we have found generally strong evidence that stock prices tend to reverse after large movements and trend after small movements. The fact that the results are similar across many different countries and various time periods indicates that the findings are quite robust. Previous studies are quite fragmented but largely find reversals after large movements which we also generally confirm in our much more comprehensive and systematic study. We also largely confirm the previous findings of Amini et al. (2013) albeit that paper is a much smaller study of the UK market.

Implications
This section considers various important implications of our findings.

Quantifying the bias of using an AR(1) instead of a cubic model
Basic econometric theory indicates that omitting significant variables introduces bias into model coefficients. It is possible to compute the bias induced by using an AR(1) model instead of a cubic model.
We estimate a standard AR(1) model where R t is the index return. The bias is the difference between b 1 estimated from Equation (3) and a 1 estimated from Equation (2). The results of estimating Equation (3) and the biases and percentage biases are shown in Table 10.  The results in Table 10 show that there is quite systematic omitted variable bias in fitting an AR(1) model compared to a cubic model. In the large majority of cases the AR(1) underestimates the coefficient of R t−1 often to quite a considerable extent. The last column of the table considers the statistical significance of the coefficient at the conventional 5% level and whether it has changed compared to that under the cubic model. In many of the developed markets the coefficient has changed to become insignificant. In the developing markets there are fewer changes in significance as the coefficients are often extremely statistically significant in the AR(1) model and the change to the cubic model has not been enough to completely eliminate this significance.

Implications for trend following
These empirical results are very much in line with the theoretical analysis in Amini, Hudson, and Keasey (2010) which shows that 'if price reversals are observed after large absolute price movements in a series with zero  (2). * * * , * * and * indicates significance at 1%, 5% and 10% respectively.
autocorrelation price trends must continue after small price movements' (Amini, Hudson, and Keasey 2010, 102). An extension to the reasoning in Amini, Hudson, and Keasey (2010) is given in Appendix 1. It shows that, given a number of series with modest autocorrelation, price trends after relatively small price movements will be more pronounced that would be expected given the level of autocorrelation if price reversals are observed after large absolute price movements (or larger reversals than would be expected in the case of series with negative autocorrelations). The runs test is a simple direct measure of trends in time series data (Fama 1965). Table 11 presents the results of the runs tests on index returns and on residuals after fitting the cubic model. The second and third columns of Table 11 show the statistics associated with the runs test and the associated p-values. The majority of the series have a substantially fewer runs in the series than one would expect by chance indicating the presence of Table 11. Runs tests on index returns and on residuals after fitting cubic model. (2) Country ( trending in the data which supports our general proposition that trending will be observed in series with modest autocorrelation but reversals after large price changes. We investigate whether a cubic model is associated with trends in the data. One would expect that if the cubic model is fitted the residuals will exhibit a lower tendency towards trending. It should be noted that the cubic model has been fitted to minimise squared residuals rather than necessarily to exactly eliminate trends so this may not necessarily be done in an optimal way. When the runs test is applied to the residuals from the series after fitting the cubic model the number of runs is generally substantially increased, often to a statistically significant extent (see the fourth and fifth columns of Table 11), indicating that fitting this model tends to act to more than eliminate trends in the series. In a sense, the model tends to over-adjust for trends in the data as the resulting residuals tend to exhibit fewer runs than one would expect from a random walk.

R t ε t from Formula
The results show that although the original returns series is too likely to trend compared to an independent series, as shown by the runs test, the residuals from our cubic model are too likely to reverse. Thus although our model has taken account of the existence of trends and reversals it has not created a perfect independence series of residuals. Any particularly undesirable characteristic of a model could be improved by optimising the parameters to improve this. For example, the parameters could be set up to maximise the performance of the residuals of the model on the runs test but this would be at the expense of the performance of other aspects of the model, for example, in our case the fit of the model in OLS terms would be less good.
The implication of the paper is that autocorrelation is not sufficient to ascertain the independence of stock prices. Given the almost infinite number of ways in which stock returns may have time series dependence, it is very challenging to create a series of returns that are completely independent using tractable models. With relatively simple models it is only possible to model a limited number of aspects of dependence depending on the number of parameters in the model. For example, the 3 parameter cubic model we use takes account of the continuation and reversal properties of returns which cannot be done using a one-parameter AR(1) model. More and more parameters could, of course, be added to models but then there would be issues of over-fitting, difficulties of interpreting parameters and the stability of parameters within and out-of-sample. Another relevant factor concerns what a model is aiming to optimise. In our paper, we use the standard OLS approach so our implicit objective is to minimise the squared deviations in the model.

Implications for technical analysis and prediction
Whilst our results are strong in terms of explaining in-sample market behaviour their effectiveness for predictive purposes is an open question. It is not a given that non-linear models will predict particularly well out of sample. Nunno (2014) shows that polynomial regressions may overfit the data. Polynomial regressions may have better performance than linear models at the start of a testing period but worse performance as the prediction period lengthens.
It is not our intention in this paper to focus on the ability of our non-linear models to predict the market in general, however, our findings have implications for understanding technical analysis which is the practice of predicting future price movements from past price movements. Although many academic papers have shown that technical trading rules can predict to a statistically significant degree (Park and Irwin 2007), in general, their effectiveness has not been satisfactorily explained by empirical models of stock-market data. Although there are a huge number of technical trading rules in use, many rules are broadly based on trend-following principles so our findings in the preceding sections of this paper are clearly potentially relevant. Probably the most influential paper in the academic literature dealing with technical analysis is the paper by Brock, Lakonishok, and LeBaron (1992). This paper is particularly relevant for our purposes because not only does it show that moving average rules and trade range break rules, which are clearly trend-following rules, can predict market movements but also that their success cannot be explained by several standard models of stock market returns. 3 In particular the paper shows that the moving average strategies cannot be generated by random walk, AR(1), GARCH-M or Exponential GARCH models.
A moving average is an average of the level of a financial instrument or index over a number of consecutive time periods up to the date the trading decision is being considered. The moving average rule generates a buy (sell) signal when a moving average based on a short period is above (below) a moving average based on a long period. Thus a buy signal is generated in accordance with the following formula: where P t is the price at time t. S is the length of the short period and L is the length of the long period. A sell signal is generated when the reverse inequality holds:  (Sell) periods that are greater than 0. Buy-Sell shows the difference between the mean buy and the mean sell returns. * * * , * * and * indicates significance at the 1%, 5% and 10% respectively.
Shorter moving averages follow the market closely, whereas longer moving averages smooth market fluctuations. Thus a rule with a short period of one is very responsive and gives buy (sell) signals whenever the price rises above (below) the long moving average. A short period of one is the most commonly used short period in the literature. Various long periods have been used with Brock, Lakonishok, and LeBaron (1992) using periods ranging between 50 and 200 days and other papers such as Han, Yang, and Zhou (2013) using long periods as short as 10 days.
In a sense, the rules can be viewed as marking predictions based on different amounts of past data with long moving average rules using more past data. Given this and the results of Nunno (2014), which are reported above, we can hypothesise that the non-linear models will be more effective at explaining the short-dated moving average rules.
In Table 12 we report the results of using moving average rules in the Portuguese market, which we pick for demonstration purposes, on the raw index data and then on the data adjusted to eliminate the effects of a standard AR(1) model and a cubic model formulated as in our Equation (2). We hold the short moving average period constant at 1 and investigate a range of long periods from 10 to 200. The results are presented in the standard way popularised in the technical analysis literature by Brock, Lakonishok, and LeBaron (1992).
The data is adjusted to eliminate the effects of the AR(1) and cubic models using a similar method to that used in Atanasova and Hudson (2010) and Gallant, Rossi, and Tauchen (1992). We create new indices after removing the effects of the AR(1) and cubic models by starting with an initial value and then increasing that value over time in line with the residuals after fitting the appropriate model.
where I N t is the value of the new index at time t, I N 0 is an arbitrary initial value for the new index, ε t is the residual from either the AR (1) or cubic model at time t The results in Table 12 show that the MA rules on the raw index data are generally predictive as indicated by the positive difference between the buy and sell returns we observe for each set of parameters and this predictability is statistically significant for the 50 and 100 d long periods. When the index data is adjusted to eliminate first the effects of the AR(1) and then the cubic models we see that the economic size of the rule returns tend to  (1) adjustment reduces the buysell returns, the number of rules where the cubic adjustment reduces the buy-sell returns, the number of rules where the cubic adjustment gives lower buy-sell returns than the AR(1) adjustment and the total number of rules considered.
decline progressively and quite substantially. In conclusion, the cubic model seems to substantially capture the trends in the data that allow the moving average rule to be effective. Whilst the rules applied to the Portuguese market indicate some interesting findings, they need to be confirmed over all the markets. We have calculated the results of the rules for all markets. The results are shown in the Appendix. For the developed markets we investigate a total of 105 rules by adopting long periods of 10, 20, 50, 100 and 200 days for each of the 21 markets. Similarly, for the developing markets, we investigate a total of 90 rules by adopting long periods of 10, 20, 50, 100 and 200 days for each of the 18 markets. Initially, we observe that the rules are generally effective on the unadjusted indices in that the difference between the buy and sell returns are almost always positive -out of the 195 rules tested in only 12 cases is the difference between the buy and sell return negative. The effects of applying rules to the indices adjusted for the effects of the AR(1) and cubic models are summarised in Table 13. In the large majority of cases, both the AR(1) and cubic adjustments reduce the difference between the buy and sell returns. In over two-thirds of the cases for the developed markets and in nearly all the cases for the developing markets the cubic adjustment reduces the difference between the buy and sell returns more than the AR(1) adjustment. In conclusion, the non-linear cubic model is very effective at explaining the success of the technical analysis rules particularly for short-moving averages. 4

Limitations for var calculations
Our findings have important implications for risk calculation such as VaR calculations. The intuition behind this is very simple: if market trends tend to continue then market downturns will tend to be worse over short time periods than would happen if prices move more randomly.
There are many different approaches to estimating VaR involving a variety of underlying assumptions and approximations (see, for example, Chen and Lu 2012;Şener, Baronyan, and Mengütürk 2012). Most of the approaches assume independent and identically distributed returns, often with a focus on the properties of the tails of the distribution or alternatively emphasise models of time-varying volatility. We do not aim to criticise this literature which generally addresses the major first-order effects in the estimation. We do, however, show just that the existence of trends in returns, as captured by our cubic model, may have substantial effects.
For demonstration purposes we assume IID normally distributed returns with zero expected returns (i.e. assume expected returns are negligible compared to return variability). We further assume three levels of autocorrelation: zero autocorrelation, autocorrelation equal to the coefficient of R t−1 in a linear regression of R t on R t−1 for that market, and autocorrelation equal to the coefficient of R t−1 in the cubic regression of R t on R t−1 . As shown in Table 8 the third measure of autocorrelation is generally larger than the second one reflecting the tendency for trends to continue after small price movements. Our approach is approximate but conservative as it ignores the possibility of reversals after large price movements which will tend to reduce VaR. We calculate a 10 d 1% VaR as often required by regulators.
In Table 14 we show the VaR figures calculated using the formula of Hull (Hull 2015, 265) under three different assumptions: zero autocorrelation in returns, autocorrelation in returns based on a simple linear regression, autocorrelation based on the coefficient of R t−1 in the cubic equation. We see that for the large majority of markets there is a progression in the size of the VaR estimates with the estimate allowing for linear effects being normally larger than the estimate assuming no covariance and the estimate allowing for cubic effects being still larger. The effects on the VaR estimates can be quite substantial frequently resulting in increases of the order  (1) VaR Linear Regression (2) Percentage decrease of (2) compared to (1) VaR Cubic Regression (3) Percentage decrease of (3) compared to (1) of 4% or more in developed markets and often increases of well over 10% in the developing markets. Thus neglecting these effects may result in economically significant underestimates of VaR measures.
To demonstrate the economic significance of our findings we have used back testing to evaluate the importance and significance of the different approaches. To do this and given the importance of the fat tail properties we have calculated the number of 'exceedences' associated with each of the value at risk approaches in Table 14. That is, we have calculated the number of times that the calculated value at risk figure would have been exceeded over our investigation period. These figures are shown in Table 15. There are 6578 daily returns in each series so with a perfect value at risk model one would expect approximately 65 exceedences. It is clear that all the models have more exceedences than this. The explanation for the generally excessive number of exceedences over all the models in the demonstration is that IID normally distributed returns have been assumed rather than fat-tailed distributions. However, in our paper, we are not aiming to find the best possible value at risk model in absolute terms but to investigate the potential advantages of the Cubic regression model perhaps as a supplement to other models which would probably use some sort of fat-tailed distribution. In this context of our paper, it is clear that the Cubic regression model tends to perform much better than the other models given the underlying distribution we have assumed.

Conclusions
Drawing on the literatures on reactions to large price movements and on trends in financial markets we show, using very comprehensive data for US stocks and world stock markets, that prices follow non-linear processes with reversals after large price changes and trend continuations after small price changes. We further show that a simple cubic polynomial model can capture the salient features of the data. Our work differs from previous work that has found non linearity in financial markets in that our proposed model incorporates the well-known stylised facts from the two previous mentioned literatures, is very tractable and has generally robust findings across an extremely comprehensive dataset.
Our findings have a number of important implications. Much prior work assumes a linear structure for mean returns and consequently will suffer from omitted variable bias which we show to be substantial. In addition, the cubic model we propose can account for much of the trending observed in the data and can substantially explain some of the well-known results found using very important technical trading rules. We also show that neglecting these trend following effects can result in substantial underestimates of VaR.
Our findings give rise to a number of avenues for future work. Firstly, we have deliberately used a very simple model to fit the stylised features of the data as this is very tractable and easy to interpret. Many other alternative models could be used, for example, we have not incorporated well known features of the data such as volatility clustering. It would be interesting to consider the features and advantages of other modelling approaches. In addition, for simplicity, we have fitted the model using Ordinary Least Squares. One might usefully use different objective functions when fitting the model, for example, ensuring that the resultant residuals followed a random walk. Machine learning models have become increasingly prominent and one of their main advantages is to combine non-linear features in an optimal manner and so are relevant to our study. However, such models do have substantial disadvantages compared to the approach we have used. They are rather of a 'blackbox' nature and so are neither transparent nor aligned in a direct way with stylised features of the data found in previous research or from general economic or psychological reasoning. Nonetheless, it would be interesting to compare the accuracy of the two approaches and their out of sample robustness. Secondly, we have not systematically explored the underlying causes of our findings. Papers in the literature on reactions on large price movements have already suggested a variety of possible explanations including market microstructure effects, rational response to risk and behavioural factors such as overreaction although little consensus has been found (Amini et al. 2013). Similarly, a number of rational and behavioural effects have been proposed as explanations for the tendency of prices to trend as discussed in our review of the literature. Definitively determining the causes of the patterns we observe would thus be an interesting and challenging project. In this task, given the comprehensive nature of our database, we can initially rule out explanations based on the particular features of individual markets and time periods which would tend to mitigate against many microstructure-based effects. Thirdly, there are a number of ways in which the practical applications of our findings can be extended. We have shown how the non-linearity we observe is useful in explaining the effectiveness of important classes of technical trading rules. Many other trading rules in finance are broadly based on trend following so it would be interesting to see if the findings are useful for explaining other rules. Similarly, whilst we have examined the effects of the non-linearity on the VaR measure it would be interesting to examine the effects on other risk measures. Finally, we have used daily data and it would be interesting to see if the approach would be useful at other sampling intervals.