I'm a full time undergraduate student from Peru, and I'm trying to use the Geometric Brownian Motion example used in the help section from Wolfram Mathematica in order to forecast future stock prices, as in the example. But it seems that there might be some kind of error, because when I take the mean function of the simulated future paths in order to find the predicted future values the resulting path is ridiculous due to the extremely low volatility it has.

The code I'm using is the same as the example provided by Mathematica:

Getting the data:

LUVdata = FinancialData["LUV", "Close", {{2015, 1, 1}, {2015, 4, 28}}];

Adjusting the data to a Time Series:

LUVseries = TimeSeries[LUVdata[[All, 2]], {LUVdata[[1, 1]]}];

Fitting a Geometric Brownian Motion Process to the values:

eprocess = 
  GeometricBrownianMotionProcess[\[Mu], \[Sigma], \[Alpha]]];

Simulate 4000 future paths for the next 17 days:

paths = RandomFunction[eprocess, {LUVseries["PathLength"], 
LUVseries["PathLength"] + 17, 1}, 4000];

td = TemporalData[paths["ValueList"], {LUVdata[[-1, 1]], Automatic, "Day"},  
      ValueDimensions -> 1];

Plot the simulations:

forecastPlot = DateListPlot[td, Joined -> True, PlotStyle -> Directive[Opacity[.4]]]

enter image description here

Now, calculate the mean function of the simulations to find predicted future values:

meanPath = TimeSeriesThread[Mean, td];

Plot the mean fuction of the simulations:


enter image description here

As you see in the plot of the mean function, it says that the stock will only varies in a range of 0.05 cents in 17 days which is totally wrong taking into account that this stock varies more than 1 dollar in a normal trading day:

enter image description here

Please I will be very thankful to anyone who can tell me what is wrong with the code or with the estimation.

  • 6
    $\begingroup$ You have averaged out all volatility, I think. Any "random noise" was reduced by a factor of Sqrt[4000]. Also I'm not quite getting the output you have when running the code (the paths do not start at a single point). $\endgroup$
    – LLlAMnYP
    Jun 9 '15 at 17:05
  • 1
    $\begingroup$ What a result like you got basically means, is that your model cannot make any predictions about day-to-day variation of the stock, it is effectively random noise to it. And judging from the history of the data it can assume that there will not be any significant changes in the near future (except for random day-to-day variation which it cannot predict). $\endgroup$
    – LLlAMnYP
    Jun 9 '15 at 17:12
  • 1
    $\begingroup$ In my opinion it makes more sense to think in price ranges and their probabilities. You could use your simulation to predict these price ranges, but I think using implied volatility instead of past volatility gives better predictions. $\endgroup$
    – Karsten 7.
    Jun 9 '15 at 17:25
  • 1
    $\begingroup$ To sum up what @LLlAMnYP said, by the central limit theorem, at some time t, the returns distribution error i.e volatility will go down as O(1/Sqrt[n]) for n paths. Also, on a day-to-day scale with a near zero drift parameter, geometric brownian motion is a martingale, hence you cannot predict the expected future earnings given any past events. GBM's normal increments also underepresent extreme/catastrophic tail events more common in Student-T and Lorentz distributions. I doubt you can do any better than spotting reversals with MACD given such coarse day-to-day samples. $\endgroup$
    – Histograms
    Jun 9 '15 at 17:48
  • 4
    $\begingroup$ I'm voting to close this question as off-topic because the issue here is not related to Mathematica and its results, but involves the understanding of the underlying mathematical concepts. $\endgroup$ Jun 9 '15 at 21:51