ロジスティック分布を使って部分的変動のシミュレーションを行う
LogisticDistributionは,株式の前の終値からの部分的な価格変動に大変よいフィットを提供する.EstimatedDistributionを使って,2000年1月1日から2009年1月1日にかけてのS&P 500指標の日々の部分的価格変動についてロジスティック分布の最適のフィットを求める.その後,この分布を使ってシミュレーションを行う.
sp500 = TimeSeriesMap[Normal[#, Quantity]&, FinancialData["SP500", "FractionalChange", {{2000, 1, 1}, {2009, 1, 1}, "Day"}]];edist = EstimatedDistribution[sp500, LogisticDistribution[μ, β]]Show[Histogram[sp500, {-0.05, 0.07, 0.005}, "PDF", PlotRange -> {0, 55}, ChartStyle -> "GrayTones"], Plot[PDF[edist, x], {x, -0.1, 0.07}, PlotStyle -> {AbsoluteThickness[3], StandardMagenta}, PlotRange -> All], BaseStyle -> {FontFamily -> "Verdana"}, ImageSize -> 430, Epilog -> Inset[Framed[Style[Grid[{{"推定分布:"}, {Round[#, 0.000001]& /@ edist}}], 11, FontFamily -> "Verdana"], Background -> StandardBlue, RoundingRadius -> 3], {Right, Top}, {Right, Top}]]ListPlot[RandomVariate[edist, 30], Joined -> True, PlotStyle -> Thick, ImageSize -> 400, BaseStyle -> {FontFamily -> "Verdana"}, PlotLabel -> "30日間の部分的価格変動のシミュレーション"]