Log Returns of Stock Prices
Stock prices modeled with geometric Brownian motion (in the classical Black–Scholes model) are assumed to be normally distributed in their log returns. Here, this assumption is examined with the stock prices of five companies: Google, Microsoft, Facebook, Apple, and Intel.
Retrieve the stock prices in 2015 with FinancialData.

symbols = {"GOOGL", "MSFT", "FB", "AAPL", "INTC"};
prices = Table[
FinancialData[stock, {{2015, 1, 1}, {2015, 12, 31}}], {stock,
symbols}];
Compute the log returns.

logreturn = Minus[Differences[Log[prices[[All, All, 2]]], {0, 1}]];
Filter the log returns with an ARCHProcess of order 1.

fdata = Table[
{\[Kappa]1, \[Alpha]1} = {\[Kappa], \[Alpha]} /.
FindProcessParameters[lr, ARCHProcess[\[Kappa], {\[Alpha]}]];
MovingMap[Last[#]/Sqrt[\[Kappa]1 + \[Alpha]1 First[#]^2] &, lr, 2]
, {lr, logreturn}];
fdata = Transpose[fdata];
Compare the filtered data from each stock to the normal distribution with QuantilePlot. For all five companies, the tails deviate from normal.

Perform a multivariate normality test with BaringhausHenzeTest (BHEP). The normality assumption is clearly rejected.

htd = BaringhausHenzeTest[fdata, "HypothesisTestData"];

htd["TestDataTable"]


htd["ShortTestConclusion"]

Fit the filtered data with MultinormalDistribution and MultivariateTDistribution.

multiN = EstimatedDistribution[fdata,
MultinormalDistribution[Array[x, 5], Array[s, {5, 5}]]]


multiT = EstimatedDistribution[fdata,
MultivariateTDistribution[Array[x, 5], Array[s, {5, 5}], nu]]

Compute the AIC for the two distributions. The model of MultivariateTDistribution has a smaller value.

aic[k_, dist_, data_] := 2 k - 2 LogLikelihood[dist, data]

aic[5 + 15, multiN, fdata]


aic[5 + 15 + 1, multiT, fdata]
