Generalized Central Limit Theorem

The generalized central limit distribution states that a sum of independent random variables from the same distribution, when properly centered and scaled belongs to the domain of attraction of a stable distribution.  Further the only distributions that arise as limits from suitably scaled and centered sums of random variables are stable distributions.  The goal of this section is not to give a proof, but to demonstrate this to prepare for the next section where we will propose that over short intervals of time financial market returns are sufficiently independent and identical that they should also converge to a stable domain of attraction.

To start with the simplest case we will take sums of random variables from a Pareto distribution with a minimum value of 1.  We will start with a single tailed distribution then progress to a two tailed example.  The formulae for the Pareto distribution density and distribution functions are below.

Needs["StableM7`"];
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]];

f(x)=α (x^(-α-1))

F(x)=({{1-((((1/x)))^α),    for x>1}})

Here we create a sample of random variables that result as sum of 1000 ParetoDistribution[1, 1.5] random variables.  The scaling factor was selected with some knowledge of the mathematics of stable distributions, and the shift is simply the mean of the Pareto distribution multiplied by n.  In the notebook, the cell below can be run with different size n to see how the convergence to a stable distribution progresses.  With the adjustments as n grows larger, this should progress to a stable distribution with parameters {α, β, γ, δ} = {1.5, 1., 1, 0.}

scale = Function[{n,α}, (2 Gamma[α] Sin[Pi α/2]/Pi )^(1/α) n^(-1/α)];
n=1000;
scl=scale[n,1.5];
mu= Mean[ParetoDistribution[1,1.5]];
CellPrint[TextCell["Shift by "<>ToString[n mu],"Text"]];
CellPrint[TextCell["Then scale by "<>ToString[scl],"Text"]];
sample=(Plus@@Partition[RandomReal[ParetoDistribution[1,1.5],1000 n],1000]  - mu n) scl;
fit=Quiet[SFit[sample,1]];
CellPrint[TextCell["Stable fit of shifted and scaled sample\n "<>ToString[fit],"Text"]];
g1=Histogram[sample, {-6,10,16/50},"ProbabilityDensity",PlotRange->All];
g2=Plot[SPDF[x,fit,1],{x,-6,10},PlotStyle->{Blue,Thickness[0.008]},PlotRange->All];
Show[g1,g2, PlotRange-> {{-6,10},All}]

Shift by 3000.

Then scale by 0.00541926

Stable fit of shifted and scaled sample
 {1.48616, 1., 0.895938, -0.220168}

A two tailed model is set up as the difference of two ParetoDistribution[1, α] random variables.  The density histogram fit is shown as well as the log - log distribution fit.  As the log-log plot clearly shows the characteristic stable tail behavior is clearly present with sums of the differences of a 1000 pairs of Pareto distribution random variables.  We use the Mathematica formula below to generate n differences.

P2RV=Function[{n,α,β},(1/2) (β+1) RandomReal[ParetoDistribution[1,α],n]-(1/2) (1-β) RandomReal[ParetoDistribution[1,α],n]];

This set up is for generating stable RVs in the range 1 < α < 2.  Sums of two tailed Pareto RVs converge very slowly to stable input parameters as α -> 2.  For α < 1 a different centering strategy would likely be better, i.e. try the median.

P2RV=Function[{n,α,β},((1+β)/2)RandomReal[ParetoDistribution[1,α],n]-((1-β)/2)RandomReal[ParetoDistribution[1,α],n]];
{a,b}={1.5,-0.5};
n=1000;
mu=((a b)/(-1+a));
k=scale[n,a];
s=Table[Plus@@P2RV[n,a,b],{1000}];

s1=s k-mu k n;
CellPrint[TextCell["Shift by "<>ToString[n mu],"Text"]];
CellPrint[TextCell["Then scale by "<>ToString[k],"Text"]];
parm=SMLFit[s1,1];
CellPrint[TextCell["Stable fit of shifted and scaled sample\n "<>ToString[parm],"Text"]];
g1=Histogram[s1,{-10,10,20/50},"ProbabilityDensity",PlotRange->All];
g2=Plot[SPDF[x,parm,1],{x,-10,10},PlotStyle->{Blue,Thickness[0.008]},PlotRange->All];
Show[g1,g2]
DisplayLogStableFit[s1,parm]

Shift by -1500.

Then scale by 0.00541926

Stable fit of shifted and scaled sample
 {1.39597, -0.55467, 0.751621, 0.0282783}

The above shows that it is possible to generate random variables that demonstrate stable behavior with as few as a thousand sums of random variables from a heavy tailed distribution.  It is not hard now to imagine a market system where limit order book log price differences might have heavy tailed distributions.  As sums of price differences accumulate over a short period of time, they should converge to a stable distribution.  Over a very short time frame the statistical description of the limit order books is not likely to change much.  But the look at real financial data suggests that the statistical parameters of the limit order books may change over several minutes.  To study this in more detail we develop an simple algorithmic continuous double auction market in the next section.

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}]], "../s07/CDA.html"], {0, -0.5}]];
t3 = Graphics[Text[Hyperlink[Framed[Style["Download Notebook", {txcolor, Bold, Larger}]], "../s06/GCLT.nb"], {5, 0}]];
t4 = Graphics[Text[Hyperlink[Framed[Style["Previous", {txcolor, Bold, Larger}]], "../s05/RVSums.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    Fri 19 Dec 2008