S23Test

How good is the stable 2:3 order statistic distribution as a model for financial data, compared to the Student T distribution which can also model heavy tailed behavior?  This notebook selects at random 50 ticker symbols which have more than ten years of daily data from the S&P 1500 constituent list.  The last decade of data presents an interesting challenge in that it has the highest volatility since the Great Depression as well as some of the lowest volatility ever recorded.  To capture both aspects of the data set.  Each distribution was fit to the whole ten years of daily logarithmic returns and the most recent 500 returns, when the volatility was significantly lower.  Maximum likelihood fitting was used for both models.  This method tends to give the most accurate fit, but the fit to the tail behavior particularly in small samples depends upon having the best model.  There are not good numerical methods to assess the tail fit so it is done graphically, comparing the empirical data distributions to the model fits.  The restriction to a limit of 500 data points should limit the data to no more than 5 points on each tail beyond the p = 0.01 level, thus presenting a significant challenge to get the tail behavior right.

The fits are shown in the form StudentTDistribution[ μ, σ, ν] where μ is the location parameter, σ is the scale parameter and ν is the shape parameter.  For the stable 2:3 order statistic distribution the parameters are shown as S23OrderDistribution[ α, β, γ, δ ] where α is the tail parameter, double that of the parent stable distribution and β, γ, δ, correspond respectively to the skewness parameter, scale parameter, and location parameter of the parent stable distribution.  The tails are plotted on a log log plot with 1- probability for the right tail in red and the probability for the left tail in blue against the magnitude of x.  The tails of the Student T distribution are shown in a single color green, since this is a symmetric distribution, they will converge, whereas for the stable 2:3 order distribution there will be parallel power tails if β is not close to zero.  The empirical distribution has the same red and blue tail colors but has the jagged curve since each point is essentially a discrete event.

On the graphs both tails are represented as negative slopes.  The steeper slopes have the lighter tail behavior and the more horizontal slopes have the heavier tail behavior.

The software notebook used below can be found here: http://pages.suddenlink.net/rhr/s23/S23Distribution.nb

NotebookEvaluate["C:\\Mathematica 9\\MarketModel2013\\S23\\S23Distribution.nb"];
tickerList = {"GLW", "WEN", "MW", "NANO", "FMC", "NFG", "TBI", "CKH", "HFC", "DIOD", "PLXS", "CVGW", "BK", "MYE", "TXN", "MDLZ", "GGG", "MCK", "NPBC", "GVA", "SNPS", "ISCA", "EZPW", "EAT", "TJX", "NYCB", "LEN", "DHI", "XRX", "EFII", "DDD", "ATML", "OCR", "NBL", "BKE", "KLIC", "CVD", "ANDE", "WM", "GWR", "NVR", "TIBX", "BBCN", "HPQ", "ABM", "LAD", "SYKE", "UNF", "EMN", "RGLD"};
startDate = DatePlus[Take[DateList[], 3], {-10, "Year"}]
Do[data = FinancialData[tickerList[[i]], startDate];
  Print[DateListLogPlot[data, Joined -> True, PlotRange -> All, PlotLabel -> tickerList[[i]] <> " Prices"]];
  
  lr = Differences[Log[data[[All, 2]]]];
  max = Max[Abs[lr]];
  std = EstimatedDistribution[lr, StudentTDistribution[μ, σ, ν]];
  s23 = Quiet@S23MLFit[lr, {3, 0, 0.01, 0}];
  empD = EmpiricalDistribution[lr];
  Print["Ten Year Fit Parameters"];
  Print[std];
  Print["S23OrderDistribution[" <> StringReplace[ToString[s23, StandardForm], {"{" -> "", "}" -> ""}] <> "]"];
  Print[LogLogPlot[{CDF[std, -x], CDF[S23OrderDistribution[s23], -x], CDF[empD, -x], 1 - CDF[S23OrderDistribution[s23], x], 1 - CDF[empD, x], 1 - CDF[std, x]}, {x, 0.01, max}, PerformanceGoal -> "Speed", PlotStyle -> {Green, Blue, Blue, Red, Red, Green}, PlotLabel -> "StudentT Fit -Green\nS23 Fit Left Tail Blue, Right Tail Red"]];
  
  lr = Take[lr, -500];
  std = EstimatedDistribution[lr, StudentTDistribution[μ, σ, ν]];
  s23 = Quiet@S23MLFit[lr, {3, 0, 0.01, 0}];
  empD = EmpiricalDistribution[lr];
  Print["Two Year Fit Parameters"];
  Print[std];
  Print["S23OrderDistribution[" <> StringReplace[ToString[s23, StandardForm], {"{" -> "", "}" -> ""}] <> "]"];
  Print[LogLogPlot[{CDF[std, -x], CDF[S23OrderDistribution[s23], -x], CDF[empD, -x], 1 - CDF[S23OrderDistribution[s23], x], 1 - CDF[empD, x], 1 - CDF[std, x]}, {x, 0.01, max}, PerformanceGoal -> "Speed", PlotStyle -> {Green, Blue, Blue, Red, Red, Green}, PlotLabel -> "StudentT Fit -Green\nS23 Fit Left Tail Blue, Right Tail Red"]];
  Print["**********************************************"];
  Print[],
  
  {i, Length[tickerList]}] // AbsoluteTiming

s23test_1.gif

Graphics:GLW Prices

s23test_3.gif

s23test_4.gif

s23test_5.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_7.gif

s23test_8.gif

s23test_9.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_11.gif

s23test_12.gif

Graphics:WEN Prices

s23test_14.gif

s23test_15.gif

s23test_16.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_18.gif

s23test_19.gif

s23test_20.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_22.gif

s23test_23.gif

Graphics:MW Prices

s23test_25.gif

s23test_26.gif

s23test_27.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_29.gif

s23test_30.gif

s23test_31.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_33.gif

s23test_34.gif

Graphics:NANO Prices

s23test_36.gif

s23test_37.gif

s23test_38.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_40.gif

s23test_41.gif

s23test_42.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_44.gif

s23test_45.gif

Graphics:FMC Prices

s23test_47.gif

s23test_48.gif

s23test_49.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_51.gif

s23test_52.gif

s23test_53.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_55.gif

s23test_56.gif

Graphics:NFG Prices

s23test_58.gif

s23test_59.gif

s23test_60.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_62.gif

s23test_63.gif

s23test_64.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_66.gif

s23test_67.gif

Graphics:TBI Prices

s23test_69.gif

s23test_70.gif

s23test_71.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_73.gif

s23test_74.gif

s23test_75.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_77.gif

s23test_78.gif

Graphics:CKH Prices

s23test_80.gif

s23test_81.gif

s23test_82.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_84.gif

s23test_85.gif

s23test_86.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_88.gif

s23test_89.gif

Graphics:HFC Prices

s23test_91.gif

s23test_92.gif

s23test_93.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_95.gif

s23test_96.gif

s23test_97.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_99.gif

s23test_100.gif

Graphics:DIOD Prices

s23test_102.gif

s23test_103.gif

s23test_104.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_106.gif

s23test_107.gif

s23test_108.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_110.gif

s23test_111.gif

Graphics:PLXS Prices

s23test_113.gif

s23test_114.gif

s23test_115.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_117.gif

s23test_118.gif

s23test_119.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_121.gif

s23test_122.gif

Graphics:CVGW Prices

s23test_124.gif

s23test_125.gif

s23test_126.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_128.gif

s23test_129.gif

s23test_130.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_132.gif

s23test_133.gif

Graphics:BK Prices

s23test_135.gif

s23test_136.gif

s23test_137.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_139.gif

s23test_140.gif

s23test_141.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_143.gif

s23test_144.gif

Graphics:MYE Prices

s23test_146.gif

s23test_147.gif

s23test_148.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_150.gif

s23test_151.gif

s23test_152.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_154.gif

s23test_155.gif

Graphics:TXN Prices

s23test_157.gif

s23test_158.gif

s23test_159.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_161.gif

s23test_162.gif

s23test_163.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_165.gif

s23test_166.gif

Graphics:MDLZ Prices

s23test_168.gif

s23test_169.gif

s23test_170.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_172.gif

s23test_173.gif

s23test_174.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_176.gif

s23test_177.gif

Graphics:GGG Prices

s23test_179.gif

s23test_180.gif

s23test_181.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_183.gif

s23test_184.gif

s23test_185.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_187.gif

s23test_188.gif

Graphics:MCK Prices

s23test_190.gif

s23test_191.gif

s23test_192.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_194.gif

s23test_195.gif

s23test_196.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_198.gif

s23test_199.gif

Graphics:NPBC Prices

s23test_201.gif

s23test_202.gif

s23test_203.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_205.gif

s23test_206.gif

s23test_207.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_209.gif

s23test_210.gif

Graphics:GVA Prices

s23test_212.gif

s23test_213.gif

s23test_214.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_216.gif

s23test_217.gif

s23test_218.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_220.gif

s23test_221.gif

Graphics:SNPS Prices

s23test_223.gif

s23test_224.gif

s23test_225.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_227.gif

s23test_228.gif

s23test_229.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_231.gif

s23test_232.gif

Graphics:ISCA Prices

s23test_234.gif

s23test_235.gif

s23test_236.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_238.gif

s23test_239.gif

s23test_240.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_242.gif

s23test_243.gif

Graphics:EZPW Prices

s23test_245.gif

s23test_246.gif

s23test_247.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_249.gif

s23test_250.gif

s23test_251.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_253.gif

s23test_254.gif

Graphics:EAT Prices

s23test_256.gif

s23test_257.gif

s23test_258.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_260.gif

s23test_261.gif

s23test_262.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_264.gif

s23test_265.gif

Graphics:TJX Prices

s23test_267.gif

s23test_268.gif

s23test_269.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_271.gif

s23test_272.gif

s23test_273.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_275.gif

s23test_276.gif

Graphics:NYCB Prices

s23test_278.gif

s23test_279.gif

s23test_280.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_282.gif

s23test_283.gif

s23test_284.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_286.gif

s23test_287.gif

Graphics:LEN Prices

s23test_289.gif

s23test_290.gif

s23test_291.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_293.gif

s23test_294.gif

s23test_295.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_297.gif

s23test_298.gif

Graphics:DHI Prices

s23test_300.gif

s23test_301.gif

s23test_302.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_304.gif

s23test_305.gif

s23test_306.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_308.gif

s23test_309.gif

Graphics:XRX Prices

s23test_311.gif

s23test_312.gif

s23test_313.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_315.gif

s23test_316.gif

s23test_317.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_319.gif

s23test_320.gif

Graphics:EFII Prices

s23test_322.gif

s23test_323.gif

s23test_324.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_326.gif

s23test_327.gif

s23test_328.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_330.gif

s23test_331.gif

Graphics:DDD Prices

s23test_333.gif

s23test_334.gif

s23test_335.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_337.gif

s23test_338.gif

s23test_339.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_341.gif

s23test_342.gif

Graphics:ATML Prices

s23test_344.gif

s23test_345.gif

s23test_346.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_348.gif

s23test_349.gif

s23test_350.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_352.gif

s23test_353.gif

Graphics:OCR Prices

s23test_355.gif

s23test_356.gif

s23test_357.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_359.gif

s23test_360.gif

s23test_361.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_363.gif

s23test_364.gif

Graphics:NBL Prices

s23test_366.gif

s23test_367.gif

s23test_368.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_370.gif

s23test_371.gif

s23test_372.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_374.gif

s23test_375.gif

Graphics:BKE Prices

s23test_377.gif

s23test_378.gif

s23test_379.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_381.gif

s23test_382.gif

s23test_383.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_385.gif

s23test_386.gif

Graphics:KLIC Prices

s23test_388.gif

s23test_389.gif

s23test_390.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_392.gif

s23test_393.gif

s23test_394.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_396.gif

s23test_397.gif

Graphics:CVD Prices

s23test_399.gif

s23test_400.gif

s23test_401.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_403.gif

s23test_404.gif

s23test_405.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_407.gif

s23test_408.gif

Graphics:ANDE Prices

s23test_410.gif

s23test_411.gif

s23test_412.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_414.gif

s23test_415.gif

s23test_416.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_418.gif

s23test_419.gif

Graphics:WM Prices

s23test_421.gif

s23test_422.gif

s23test_423.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_425.gif

s23test_426.gif

s23test_427.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_429.gif

s23test_430.gif

Graphics:GWR Prices

s23test_432.gif

s23test_433.gif

s23test_434.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_436.gif

s23test_437.gif

s23test_438.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_440.gif

s23test_441.gif

Graphics:NVR Prices

s23test_443.gif

s23test_444.gif

s23test_445.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_447.gif

s23test_448.gif

s23test_449.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_451.gif

s23test_452.gif

Graphics:TIBX Prices

s23test_454.gif

s23test_455.gif

s23test_456.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_458.gif

s23test_459.gif

s23test_460.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_462.gif

s23test_463.gif

Graphics:BBCN Prices

s23test_465.gif

s23test_466.gif

s23test_467.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_469.gif

s23test_470.gif

s23test_471.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_473.gif

s23test_474.gif

Graphics:HPQ Prices

s23test_476.gif

s23test_477.gif

s23test_478.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_480.gif

s23test_481.gif

s23test_482.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_484.gif

s23test_485.gif

Graphics:ABM Prices

s23test_487.gif

s23test_488.gif

s23test_489.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_491.gif

s23test_492.gif

s23test_493.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_495.gif

s23test_496.gif

Graphics:LAD Prices

s23test_498.gif

s23test_499.gif

s23test_500.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_502.gif

s23test_503.gif

s23test_504.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_506.gif

s23test_507.gif

Graphics:SYKE Prices

s23test_509.gif

s23test_510.gif

s23test_511.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_513.gif

s23test_514.gif

s23test_515.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_517.gif

s23test_518.gif

Graphics:UNF Prices

s23test_520.gif

s23test_521.gif

s23test_522.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_524.gif

s23test_525.gif

s23test_526.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_528.gif

s23test_529.gif

Graphics:EMN Prices

s23test_531.gif

s23test_532.gif

s23test_533.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_535.gif

s23test_536.gif

s23test_537.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_539.gif

s23test_540.gif

Graphics:RGLD Prices

s23test_542.gif

s23test_543.gif

s23test_544.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_546.gif

s23test_547.gif

s23test_548.gif

Graphics:StudentT Fit -Green S23 Fit Left Tail Blue, Right Tail Red

s23test_550.gif

s23test_551.gif

s23test_552.gif



Financial Data Analysis Home



© Copyright 2014 Robert H. Rimmer, Jr.    Fri 30 May 2014

Spikey Created with Wolfram Mathematica 9.0