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 =
EstimatedProcess[LUVseries["Values"],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]]]
Now, calculate the mean function of the simulations to find predicted future values:
meanPath = TimeSeriesThread[Mean, td];
Plot the mean fuction of the simulations:
DateListPlot[meanPath]
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:
Please I will be very thankful to anyone who can tell me what is wrong with the code or with the estimation.