Skip to content
All library documents

Comparing Stock Returns with Random Walks and Testing Predictability

Article Quant Q&A · Author: Mark Dunne

Summary

The document compares an artificial price series with daily SPY data and asks whether visual similarity means stock prices are random or predictable. Responses caution that a single simulated path can resemble market prices by chance, so a chart alone cannot establish how a series was generated. One answer points to gain-loss asymmetry: financial prices may rise over a longer span and then fall more abruptly. Another recommends examining log returns, where unusually large observations can distinguish market data from a normal random-walk model.

The discussion raises the efficient markets hypothesis and the limits of predicting the next price move from past data. It does not present a formal statistical test, quantify the return distribution, or establish that every stock series follows the same behavior. Its practical lesson is to compare return properties across many observations and assess whether any apparent pattern survives rigorous testing; visual resemblance and in-sample fit alone do not demonstrate a profitable forecasting strategy.

Key ideas

  • A single simulated random-walk path can resemble a real market price chart by chance.
  • Examining log returns can reveal distributional differences hidden by price-level plots.
  • Gain-loss asymmetry is presented as one stylized feature of financial time series.
  • Visual similarity and in-sample patterns do not establish predictive power or profitability.
  • The discussion does not provide a formal test or prove that all stock returns behave alike.

Tags

Full text
# How is stock data objectively different to this random walk?


# How is stock data objectively different to this random walk?












I have a random walk that is generated as so using python, numpy, and matplotlib

```
def random_process():
    a = 0
    b = 104         #replicate starting point of SPY shown later
    rho = 0.995     #empirically good number
    X, Y = [], []

    aSamples = np.random.normal(size=sample_size)
    bSamples = np.random.normal(size=sample_size)

    for i in range(0, sample_size):
        X.append(i)
        Y.append(a + b)

        a = a * rho + aSamples[i]
        b = b + rho * bSamples[i]

    plt.plot(X, Y)
    plt.show()
```

This generated the following plot

The walk of the b variable means that it is not guaranteed to return to any value.

I also generated a plot for the SPY index based on daily data for the year 2010

How are these plots objectively different? How would one be able to tell that the first plot is generated at random and that it is impossible to predict the direction of the next value?

Is attempting to build a strategy that looks exclusively at in-sample stock data as futile as trying to predict the next value of the first plot?

## Answer by vonjd (score 5, accepted)

https://quant.stackexchange.com/a/15173

I think the main difference even in this little example is the gain-loss asymmetry which is a known stylized fact: When you look at the big bump both time series posses your artificial one is perfectly symmetric whereas the real one takes longer for going up and then crashes in a relatively shorter time frame.

This is a known phenomenon in real financial time series. You can find more here:

What Can Be Learned from Inverse Statistics? by Peter Toke Heden Ahlgren, Henrik Dahl, Mogens Høgh Jensen, Ingve Simonsen

Unfortunately the article is not free but you can at least access the abstract (and some may be able to access it anyway).

More pages of the article can be found here (p. 247ff.): Google books

Edit More similar papers can be found here: http://papers.ssrn.com/sol3/cf_dev/AbsByAuth.cfm?per_id=327148

## Answer by CharlesM (score 2)

https://quant.stackexchange.com/a/15176

For both time-series, just plot the log returns. You will see that one is not a Random-Walk .. the S&P500 since you will get values that far beyond the normal distribution. Just watch this video by Benoit Mandelbrot (starting at 11min:54sec). Looking at both graphs, your eyes can fool you making you believe that both are generated by Random Walks...

## Answer by emcor (score 0)

https://quant.stackexchange.com/a/15169

You have just luckily created 1 path of the random walk by chance that fitted the S&P. You can create another random walk and it will look much different.

The efficient markets hypothesis predicts that stock prices behave as random walks, so it is likely that S&P looks similar to that. However, one cannot predict the next step to make a profit, because the next step is always purely random up or down.

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.