Log Normal Stable Random Variables

Needs["StableM`"];
Needs["Histograms`"];

We defined the lognormally scaled stable distribution as the distribution resulting from the product of a log normal random variable and a standardized stable random variable.  The distribution has the properties that the tails are asymptotically the same as stable tails, but there is more mass in the center and mid arms of the distribution.  The skewness factor is also significantly damped by the scaling.  The δ parameter was added in a way that it remains the expectation of the distribution when α > 1.

The algorithm to construct a lognormal stable random variable is shown in Mathematica below.  SRandom procedure generates a stable random variable and the location parameter is added after the multiplication.

LNStableRV[n_,{α_,β_,γ_,σ_,δ_}]:= RandomReal[LogNormalDistribution[Log[γ],σ],n] SRandom[n,{α,β,1,0}]+δ;

LNStableRV[n_, {α_, β_, γ_, σ_, δ_}] := RandomReal[LogNormalDistribution[Log[γ], σ], n] SRandom[n, {α, β, 1, 0}] + δ;

The histograms show maximally skewed LNStable and Stable distributions with similar stable parameters, the shape of the distributions is quite different.

s0=LNStableRV[50000,{1.5,1,1,0.5,1}];
h0=Histogram[s0,HistogramScale->1,PlotLabel-> "LNStable\n{1.5,1,1,0.5,1}",HistogramRange-> {-4,6}];
s1=SRandom[50000,{1.5,1,1,1}];
h1=Histogram[s1,HistogramScale->1,PlotLabel-> "Stable\n{1.5,1,1,1}",HistogramRange-> {-4,6}];
GraphicsRow[{h0,h1},Frame->All]

Below is the case of symmetric LNStable and Stable distributions.  Note that the Stable distribution has more mass centrally and the tail behavior starts closer to the center of the distribution.

s0=LNStableRV[50000,{1.5,0,1,0.5,1}];
h0=Histogram[s0,HistogramScale->1,PlotLabel-> "LNStable\n{1.5,0,1,0.5,1}",HistogramRange-> {-4,6}];
s1=SRandom[50000,{1.5,0,1,1}];
h1=Histogram[s1,HistogramScale->1,PlotLabel-> "Stable\n{1.5,0,1,1}",HistogramRange-> {-4,6}];
GraphicsRow[{h0,h1},Frame->All]

We can do price simulations in the same way we did for stable distributions.  The parameter set is: {1.8, -0.08, 0.006, 0.5, Log[1.07]/250}.

s=LNStableRV[1000,{1.8,-0.08,0.006,0.5,Log[1.07]/250}];
ListPlot[s,Joined->True,PlotRange-> All,PlotLabel-> "LNStable Return Simulation"]
ListPlot[Exp[FoldList[Plus,0,s]+Log[50.]],Joined->True,PlotRange-> All,PlotLabel-> "LNStable Price Simulation"]

If we try to fit LNStable random variables with a stable distribution we find the same phenomenon we did with market data.  As we have seen before we get a tail exponent, α, which is lower (heavier) than the data.

EmpiricCDFList[data_] := Block[{prob,sel,del},
					
					prob= Table[(i-0.5)/Length[data],{i,Length[data]}];
					Transpose[Join[{Sort[data]},{prob}]]];
Clear[DisplayLogStableFit];
scdf[x_?NumericQ,parm_,type_:1,opts___]:=SCDF[x,parm,type,opts];
DisplayLogStableFit[data_,parm_,type_Integer:1]:=Module[{clist,lt,rt,trt,lp1,lp2,lp3,lp4,lp5,nmn,nstd},
clist=EmpiricCDFList[data];
	lt = Select[clist,#[[1]]<0&];
	rt= Select[clist,#[[1]]>0&];
	trt=Transpose[rt];
lp1=ListLogLogPlot[Abs[lt],PlotStyle->Blue,PlotRange->All];
lp2=ListLogLogPlot[Transpose[{trt[[1]],1- trt[[2]]}],PlotStyle->Red,PlotRange->All];
lp3= LogLogPlot[scdf[-x,parm,type],{x,0.0001,-4 Min[data]},PlotStyle->Blue,PlotRange->All,PerformanceGoal->"Speed"];
lp4= LogLogPlot[1-scdf[x,parm,type],{x,0.0001,-4 Min[data]},PlotStyle->Red,PlotRange->All,PerformanceGoal->"Speed"];
nmn=Mean[data];
nstd=StandardDeviation[data];
lp5= LogLogPlot[1-scdf[x,{2,0,nstd /Sqrt[2],nmn},1],{x,0.0001,4 nstd},PlotStyle->Green,PlotRange->All];
Show[lp1,lp2,lp3,lp4,lp5,PlotLabel->"Log Log Left Tail Blue, Right Red, (Normal Green)",AspectRatio->Automatic,PlotRange->All]];
parm=SFit[s];
Quiet[DisplayLogStableFit[s,parm]]
CellPrint[TextCell["Stable fit parameters: "<>ToString[parm],"Text"]]

Stable fit parameters: {1.45258, 0.0350185, 0.0058299, 0.00104949}

txcolor=RGBColor[181/255,18/255,27/255];
t1 = Graphics[Text[Hyperlink[Framed[Style["Financial Home", {txcolor, Bold, Larger}]], "../map/Overview.html"], {-5, 0}]];
t2 = Graphics[Text[Hyperlink[Framed[Style["Next", {txcolor, Bold, Larger}]],  "../s11/LNSProperties.html"], {0, -0.5}]];
t3 = Graphics[Text[Hyperlink[Framed[Style["Download Notebook", {txcolor, Bold, Larger}]], "../s10/LNStableRV.nb"], {5, 0}]];
t4 = Graphics[Text[Hyperlink[Framed[Style["Previous", {txcolor, Bold, Larger}]], "../s09/LogNormalStable.html"], {0, 0.5}]];

Show[ t1, t2, t3,t4, ImageSize -> 500]
CellPrint[TextCell["\n\n© Copyright " <>ToString[DateList[][[1]]]<>" mathestate    "<>DateString[DateList[],"DateShort"], "Text"]]

© Copyright 2008 mathestate    Mon 26 May 2008