Nutné spustiť

Clear["Global`*"]
Needs["MultivariateStatistics`"]
Needs["PlotLegends`"]
Needs ["HypothesisTesting`"]

Jednorozmerné rozdelenia

Aktivácia dát

bmwvynosy=Map[Last,FinancialData["F:BMW","Return",{{2010,1,1},{2012,6,27}}]];
jnjvynosy=Map[Last,FinancialData["JNJ","Return",{{2010,1,1},{2012,6,27}}]];
attvynosy=Map[Last,FinancialData["T","Return",{{2010,1,1},{2012,6,27}}]];
bmwvynosydat=FinancialData["F:BMW","Return",{{2010,1,1},{2012,6,27}}];
jnjvynosydat=FinancialData["JNJ","Return",{{2010,1,1},{2012,6,27}}];
attvynosydat=FinancialData["T","Return",{{2010,1,1},{2012,6,27}}];
bmwceny=FinancialData["F:BMW",{{2010,1,1},{2012,6,27}}];
jnjceny=FinancialData["JNJ",{{2010,1,1},{2012,6,27}}];
attceny=FinancialData["T",{{2010,1,1},{2012,6,27}}];
cvar[α_,var_,f_]:=1/(1-α)*(∫_var^Infinity)x*f\[DifferentialD]x

Vývoj cien a výnosov

BMW

DateListPlot[bmwceny,Frame->True,FrameStyle->Directive[22], Joined->True]
DateListPlot[bmwvynosydat,Frame->True,FrameStyle->Directive[20], Joined->True]

Johnson&Johnson

DateListPlot[jnjceny,Frame->True,FrameStyle->Directive[22], Joined->True]
DateListPlot[jnjvynosydat,Frame->True,FrameStyle->Directive[20], Joined->True]

AT&T

DateListPlot[attceny,Frame->True,FrameStyle->Directive[22], Joined->True]
DateListPlot[attvynosydat,Frame->True,FrameStyle->Directive[20], Joined->True]

Neparametrické metódy

Odhad z historických dát

Jadrový odhad hustôt dát.

bmwsmooth=SmoothKernelDistribution[-bmwvynosy];
jnjsmooth=SmoothKernelDistribution[-jnjvynosy];
attsmooth=SmoothKernelDistribution[-attvynosy];
Print["Hustota rozdelenia strát:"]
Plot[{PDF[bmwsmooth,x],PDF[jnjsmooth,x],PDF[attsmooth,x]},{x,-0.06,0.06}, AxesOrigin->{0,0}, Frame->True,FrameStyle->Directive[15],PlotRange->{{-0.06,0.06},{0,65}},PlotLegend->{"BMW","Johnson&Johnson","AT&T"},LegendPosition->{0,-0.25}]

Print["Špicatosť dát:"]
spicatostdat=Table[Kurtosis[dataD],{dataD,{-bmwvynosy,-jnjvynosy,-attvynosy}}]//TableForm
Print["Špicatosť jadrového odhadu hustôt:"]
spicatostjadrodh=Table[Kurtosis[dataK],{dataK,{bmwsmooth,jnjsmooth,attsmooth}}]//TableForm

Hodnoty mier rizika - BMW

TableForm[Table[{α,var=Quantile[bmwsmooth,α],var2=Quantile[-bmwvynosy,α],Expectation[x\[Conditioned]x>var,x\[Distributed]bmwsmooth],Mean[Select[-bmwvynosy,#>var2&]]},{α,{0.9,0.95,0.99,0.999}}],TableHeadings->{{"BMW"},{"α","VaR","VaR2","CVaR","CVaR2"}}]

Hodnoty mier rizika - Johnson&Johnson

TableForm[Table[{α,var=Quantile[jnjsmooth,α],var2=Quantile[-jnjvynosy,α],Expectation[x\[Conditioned]x>var,x\[Distributed]jnjsmooth],Mean[Select[-jnjvynosy,#>var2&]]},{α,{0.9,0.95,0.99,0.999}}],TableHeadings->{{"Johnson","   &","Johnson"},{"α","VaR","VaR2","CVaR","CVaR2"}}]

Hodnoty mier rizika - AT&T

TableForm[Table[{α,var=Quantile[attsmooth,α],var2=Quantile[-attvynosy,α],Expectation[x\[Conditioned]x>var,x\[Distributed]attsmooth],Mean[Select[-attvynosy,#>var2&]]},{α,{0.9,0.95,0.99,0.999}}],TableHeadings->{{"AT&T"},{"α","VaR","VaR2","CVaR","CVaR2"}}]

Metóda Monte Carlo

Simulácia dát a odhad jadrovej hustoty.

bmwmonte=RandomVariate[bmwsmooth,100000];
jnjmonte=RandomVariate[jnjsmooth,100000];
attmonte=RandomVariate[attsmooth,100000];
bmwmontedist=SmoothKernelDistribution[bmwmonte];
jnjmontedist=SmoothKernelDistribution[jnjmonte];
attmontedist=SmoothKernelDistribution[attmonte];
Print["Hustota rozdelenia strát:"]
Plot[{PDF[bmwmontedist,x],PDF[jnjmontedist,x],PDF[attmontedist,x]},{x,-0.06,0.06}, AxesOrigin->{0,0}, Frame->True,FrameStyle->Directive[15],PlotRange->{{-0.06,0.06},{0,65}},PlotLegend->{"BMW","Johnson&Johnson","AT&T"},LegendPosition->{0,-0.25}]

Print["Špicatosť simulovaných dát:"]
spicatostdat=Table[Kurtosis[dataD],{dataD,{bmwmonte,jnjmonte,attmonte}}]//TableForm
Print["Špicatosť jadrového odhadu hustôt simulovaných dát:"]
spicatostjadrodh=Table[Kurtosis[dataK],{dataK,{bmwmontedist,jnjmontedist,attmontedist}}]//TableForm

Hodnoty mier rizika - BMW

TableForm[Table[{α,varm =Quantile[bmwmontedist,α],varm2=Quantile[bmwmonte,α],Expectation[x\[Conditioned]x>varm,x\[Distributed]bmwmontedist],Mean[Select[bmwmonte,#>varm2&]]},{α,{0.9,0.95,0.99,0.999}}],TableHeadings->{{"BMW"},{"α","VaR","VaR2","CVaR","CVaR2"}}]

Hodnoty mier rizika - Johnson&Johnson

TableForm[Table[{α,varm =Quantile[jnjmontedist,α],varm2=Quantile[jnjmonte,α],Expectation[x\[Conditioned]x>varm,x\[Distributed]jnjmontedist],Mean[Select[jnjmonte,#>varm2&]]},{α,{0.9,0.95,0.99,0.999}}],TableHeadings->{{"Johnson","&","Johnson"},{"α","VaR","VaR2","CVaR","CVaR2"}}]

Hodnoty mier rizika - AT&T

TableForm[Table[{α,varm =Quantile[attmontedist,α],varm2=Quantile[attmonte,α],Expectation[x\[Conditioned]x>varm,x\[Distributed]attmontedist],Mean[Select[attmonte,#>varm2&]]},{α,{0.9,0.95,0.99,0.999}}],TableHeadings->{{"AT&T"},{"α","VaR","VaR2","CVaR","CVaR2"}}]

Pozn.: Nie je použitý SeedRandom, a teda hodnoty sú po každom spustení mierne odlišné.

Parametrické metódy

Normálne rozdelenie

Odhad parametrov.

bmwnorm=EstimatedDistribution[-bmwvynosy,NormalDistribution[μ,σ]]
jnjnorm=EstimatedDistribution[-jnjvynosy,NormalDistribution[μ,σ]]
attnorm=EstimatedDistribution[-attvynosy,NormalDistribution[μ,σ]]
Print["Hustota rozdelenia strát:"]
Plot[{PDF[bmwnorm,x],PDF[jnjnorm,x],PDF[attnorm,x]},{x,-0.06,0.06}, AxesOrigin->{0,0}, Frame->True,FrameStyle->Directive[15],PlotRange->{{-0.06,0.06},{0,65}},PlotLegend->{"BMW","Johnson&Johnson","AT&T"},LegendPosition->{0,-0.25}]

Hodnoty mier rizika - BMW

TableForm[Table[{α,Quantile[bmwnorm,α],cvar[α,Quantile[bmwnorm,α],PDF[bmwnorm,x]]},{α,{0.9,0.95,0.99,0.999}}],TableHeadings->{{"BMW"},{"α","VaR","CVaR"}}]

Hodnoty mier rizika - Johnson&Johnson

TableForm[Table[{α,Quantile[jnjnorm,α],cvar[α,Quantile[jnjnorm,α],PDF[jnjnorm,x]]},{α,{0.9,0.95,0.99,0.999}}],TableHeadings->{{"Johnson","&","Johnson"},{"α","VaR","CVaR"}}]

Hodnoty mier rizika - AT&T

TableForm[Table[{α,Quantile[attnorm,α],cvar[α,Quantile[attnorm,α],PDF[attnorm,x]]},{α,{0.9,0.95,0.99,0.999}}],TableHeadings->{{"AT&T"},{"α","VaR","CVaR"}}]

Laplaceovo rozdelenie

Odhad parametrov.

bmwlapl=EstimatedDistribution[-bmwvynosy,LaplaceDistribution[μ,β]]
jnjlapl=EstimatedDistribution[-jnjvynosy,LaplaceDistribution[μ,β]]
attlapl=EstimatedDistribution[-attvynosy,LaplaceDistribution[μ,β]]
Print["Hustota rozdelenia strát:"]
Plot[{PDF[bmwlapl,x],PDF[jnjlapl,x],PDF[attlapl,x]},{x,-0.06,0.06}, AxesOrigin->{0,0}, Frame->True,FrameStyle->Directive[15],PlotRange->{{-0.06,0.06},{0,80}},PlotLegend->{"BMW","Johnson&Johnson","AT&T"},LegendPosition->{0,-0.25}]

Hodnoty mier rizika - BMW

TableForm[Table[{α,Quantile[bmwlapl,α],cvar[α,Quantile[bmwlapl,α],PDF[bmwlapl,x]]},{α,{0.9,0.95,0.99,0.999}}],TableHeadings->{{"BMW"},{"α","VaR","CVaR"}}]

Hodnoty mier rizika - Johnson&Johnson

TableForm[Table[{α,Quantile[jnjlapl,α],cvar[α,Quantile[jnjlapl,α],PDF[jnjlapl,x]]},{α,{0.9,0.95,0.99,0.999}}],TableHeadings->{{"Johnson","&","Johnson"},{"α","VaR","CVaR"}}]

Hodnoty mier rizika - AT&T

TableForm[Table[{α,Quantile[attlapl,α],cvar[α,Quantile[attlapl,α],PDF[attlapl,x]]},{α,{0.9,0.95,0.99,0.999}}],TableHeadings->{{"AT&T"},{"α","VaR","CVaR"}}]

Studentovo t rozdelenie

Odhad parametrov.

bmwstud=EstimatedDistribution[-bmwvynosy,StudentTDistribution[μ,σ,ν]]
jnjstud=EstimatedDistribution[-jnjvynosy,StudentTDistribution[μ,σ,ν]]
attstud=EstimatedDistribution[-attvynosy,StudentTDistribution[μ,σ,ν]]
Print["Hustota rozdelenia strát:"]
Plot[{PDF[bmwstud,x],PDF[jnjstud,x],PDF[attstud,x]},{x,-0.06,0.06}, AxesOrigin->{0,0}, Frame->True,FrameStyle->Directive[15],PlotRange->{{-0.06,0.06},{0,65}},PlotLegend->{"BMW","Johnson&Johnson","AT&T"},LegendPosition->{0,-0.25}]

Print["Špicatosť dát:"]
spicatoststud=Table[Kurtosis[datastud],{datastud,{bmwstud,jnjstud,attstud}}]//TableForm

Hodnoty mier rizika - BMW

TableForm[Table[{α,Quantile[bmwstud,α],cvar[α,Quantile[bmwstud,α],PDF[bmwstud,x]]},{α,{0.9,0.95,0.99,0.999}}],TableHeadings->{{"BMW"},{"α","VaR","CVaR"}}]

Hodnoty mier rizika - Johnson&Johnson

TableForm[Table[{α,Quantile[jnjstud,α],cvar[α,Quantile[jnjstud,α],PDF[jnjstud,x]]},{α,{0.9,0.95,0.99,0.999}}],TableHeadings->{{"Johnson","&","Johnson"},{"α","VaR","CVaR"}}]

Hodnoty mier rizika - AT&T

TableForm[Table[{α,Quantile[attstud,α],cvar[α,Quantile[attstud,α],PDF[attstud,x]]},{α,{0.9,0.95,0.99,0.999}}],TableHeadings->{{"AT&T"},{"α","VaR","CVaR"}}]

Asymetrické Laplaceovo rozdelenie

Definícia rozdelenia.

ALD[θ_,τ_,κ_]=ProbabilityDistribution[{"PDF",Piecewise[{{((κ(Sqrt[2]))/(τ(1+(κ^2))))Exp[-((κ(Sqrt[2]))/τ)(x-θ)],x≥θ},{((κ(Sqrt[2]))/(τ(1+(κ^2))))Exp[-((Sqrt[2])/(κ τ))(θ-x)], x<θ}}]},{x,-∞,∞},Assumptions->τ>0&&κ>0&&θ∈Reals];

Odhad parametrov.

bmwald=EstimatedDistribution[-bmwvynosy,ALD[θ,τ,κ],ParameterEstimator->"MethodOfCentralMoments"]
bmwaldpar=FindDistributionParameters[-bmwvynosy,ALD[θ,τ,κ],ParameterEstimator->"MethodOfCentralMoments"]
jnjald=EstimatedDistribution[-jnjvynosy,ALD[θ,τ,κ],ParameterEstimator->"MethodOfCentralMoments"]
jnjaldpar=FindDistributionParameters[-jnjvynosy,ALD[θ,τ,κ],ParameterEstimator->"MethodOfCentralMoments"]
attald=EstimatedDistribution[-attvynosy,ALD[θ,τ,κ],ParameterEstimator->"MethodOfCentralMoments"]
attaldpar=FindDistributionParameters[-attvynosy,ALD[θ,τ,κ],ParameterEstimator->"MethodOfCentralMoments"]
Print["Hustota rozdelenia strát:"]
Plot[{PDF[bmwald,x],PDF[jnjald,x],PDF[attald,x]},{x,-0.06,0.06}, AxesOrigin->{0,0}, Frame->True,FrameStyle->Directive[15],PlotRange->{{-0.06,0.06},{0,85}},PlotLegend->{"BMW","Johnson&Johnson","AT&T"},LegendPosition->{0,-0.25}]

Print["Špicatosť dát:"]
spicatostasymlapl=Table[Kurtosis[dataasymlapl],{dataasymlapl,{bmwald,jnjald,attald}}]//TableForm

Hodnoty mier rizika - BMW

TableForm[Table[{α,Quantile[bmwald,α],cvar[α,Quantile[bmwald,α],PDF[bmwald,x]]},{α,{0.9,0.95,0.99,0.999}}],TableHeadings->{{"BMW"},{"α","VaR","CVaR"}}]

Hodnoty mier rizika - Johnson&Johnson

TableForm[Table[{α,Quantile[jnjald,α],cvar[α,Quantile[jnjald,α],PDF[jnjald,x]]},{α,{0.9,0.95,0.99,0.999}}],TableHeadings->{{"Johnson&Johnson"},{"α","VaR","CVaR"}}]

Hodnoty mier rizika - AT&T

TableForm[Table[{α,Quantile[attald,α],cvar[α,Quantile[attald,α],PDF[attald,x]]},{α,{0.9,0.95,0.99,0.999}}],TableHeadings->{{"AT&T"},{"α","VaR","CVaR"}}]

Porovnanie jednotlivých odhadov

Print["Hodnoty logaritmickej vierohodnostnej funkcie: "]
{Table[LogLikelihood[dist,-bmwvynosy],{dist,{bmwnorm,bmwlapl,bmwstud1,bmwald}}],
Table[LogLikelihood[dist,-jnjvynosy],{dist,{jnjnorm,jnjlapl,jnjstud1,jnjald}}],
Table[LogLikelihood[dist,-attvynosy],{dist,{attnorm,attlapl,attstud1,attald}}]}

Viacrozmerné rozdelenia

Aktivácia dát

bmw=FinancialData["F:BMW","Return",{{2010,1,1},{2012,6,29}}];
jnj=FinancialData["JNJ","Return",{{2010,1,1},{2012,6,29}}];
att=FinancialData["T","Return",{{2010,1,1},{2012,6,29}}];
datumy=Intersection[Map[First,bmw],Map[First,jnj],Map[First,att]];
bmwdata=Map[Last,Select[bmw,MemberQ[datumy,First[#]]&]];
jnjdata=Map[Last,Select[jnj,MemberQ[datumy,First[#]]&]];
attdata=Map[Last,Select[att,MemberQ[datumy,First[#]]&]];
tstatistic[r_,n_]:=(r/(Sqrt[1-(r^2)]))(Sqrt[n-2]);

Rozdelenia pre skrátené dáta.

bmwstudent=EstimatedDistribution[-bmwdata,StudentTDistribution[μ,σ,ν]]
jnjlaplace=EstimatedDistribution[-jnjdata, LaplaceDistribution[μ,β]]
attstudent=EstimatedDistribution[-attdata, StudentTDistribution[μ,σ,ν]]

Map[Length,{bmwdata,jnjdata,attdata}]

Vzájomná závislosť medzi dátami

Print["Korelačná matica: "]
(datacorr=Correlation[{-bmwdata,-jnjdata,- attdata}//Transpose])//MatrixForm

Print["p-hodnoty: "]
dataphod=Table[StudentTPValue[tstatistic[ρ,620],618,TwoSided->True],{ρ,{0.47602732204139164`,0.4296407343919191`,0.589528749450289`}}]

Optimalizácia portfólia

Print["Vektor stredných hodnôt (pre výnosy): "]
(datameans=Map[Mean,{bmwdata,jnjdata,attdata}])//MatrixForm
Print["Kovariančná matica (pre výnosy): "]
(datacov=Covariance[{-bmwdata,-jnjdata,- attdata}//Transpose])//MatrixForm
xx={bmw1,jnj1,att1};
opt=Minimize[{xx.datacov.xx,{Thread[xx≥0],Total[xx]==1}//Flatten,xx.datameans==0.0008},xx];
Print["Váhy určujúce zložky portfólia: "]
vahy={bmw1,jnj1,att1}/.Last[opt]

Print["Očakávaný výnos portfólia: "]
ocvynos=xxx.datameans
Print["Riziko: "]
riziko=xxx.datacov.xxx//Sqrt

Metóda variancie-kovariancie

varcov=EstimatedDistribution[Transpose[{-bmwdata,-jnjdata,-attdata}],MultinormalDistribution[{μ1,μ2,μ3},{{σ11,σ12,σ13},{σ12,σ22,σ23},{σ13,σ23,σ33}}]];

Print["Vektor stredných hodnôt: "]
varcovstredhod=({-0.0010923452964737154`,-0.000422995757713685`,-0.0009141455280133766`})//MatrixForm
Print["Kovariančná matica: "]
varcovcovmat={{0.0004948640106390557`,0.00009614632536190685`,0.0000971835674149757`},{0.00009614632536190685`,0.0000824357797172694`,0.00005442593952865026`},{0.0000971835674149757`,0.00005442593952865026`,0.00010339246823231403`}}//MatrixForm

Simulácia dát.

SeedRandom[20120727];
varcovsim=RandomVariate[varcov,100000];

varcovdata=xxx.Transpose[varcovsim];
Print["Simulované dáta: "]
varcov3D=ListPointPlot3D[varcovsim,PlotStyle->PointSize[Tiny],AxesStyle->Directive[18],PlotStyle->Darker[Blue]]
Print["Histogram strát z portfólia: "]
Histogram[varcovdata,Frame->True,Axes->False,FrameStyle->Directive[13],ChartStyle->EdgeForm[None]]
Print["Hodnoty mier rizika: "]
varcovvar=TableForm[Table[{α,Quantile[varcovdata,α],(qα=Quantile[varcovdata,α];Mean[Select[varcovdata,#>qα&]])},{α,{0.90,0.95,0.99,0.999}}],TableHeadings->{None,{"α", "VaR", "CVaR"}}]

Gaussova kopula

gausscopula=CopulaDistribution[{"Multinormal",datacov},{bmwstudent,jnjlaplace,attstudent}];

Studentova kopula

studentcopula=EstimatedDistribution[{-bmwdata,-jnjdata,-attdata}//Transpose,CopulaDistribution[{"MultivariateT",datacov,ν},{bmwstudent,jnjlaplace,attstudent}]];

Print["Počet stupňov voľnosti ν: "]
ν=0.2068937655408236`

Claytonova kopula

claytoncopula=EstimatedDistribution[{-bmwdata,-jnjdata,-attdata}//Transpose,CopulaDistribution[{"Clayton",c},{bmwstudent,jnjlaplace,attstudent}]];

Print["Parameter θ: "]
θ=1.5986785509492427`

Gumbelova-Hougaardova kopula

gumbhougcopula=EstimatedDistribution[{-bmwdata,-jnjdata,-attdata}//Transpose,CopulaDistribution[{"GumbelHougaard",α},{bmwstudent,jnjlaplace,attstudent}]];

Print["Parameter θ: "]
θ=1.435921083922107`

Simulácia dát.

SeedRandom[20120727];
gumbhougcopulasim=RandomVariate[gumbhougcopula,100000];

gumbhougcopuladata=xxx.Transpose[gumbhougcopulasim];
Print["Simulované dáta: "]
gumbhougcopula3D=ListPointPlot3D[gumbhougcopulasim,PlotStyle->PointSize[Tiny],AxesStyle->Directive[18],PlotStyle->Darker[Blue]]
Print["Histogram strát z portfólia: "]
gumbhougcopulahist=Histogram[gumbhougcopuladata,Frame->True,Axes->False,FrameStyle->Directive[13],ChartStyle->EdgeForm[None]]
Print["Hodnoty mier rizika: "]
gumbhougcopulavar=TableForm[Table[{α,Quantile[gumbhougcopuladata,α],(qα=Quantile[gumbhougcopuladata,α];Mean[Select[gumbhougcopuladata,#>qα&]])},{α,{0.90,0.95,0.99,0.999}}],TableHeadings->{None,{"α", "VaR", "CVaR"}}]

Print["Špicatosť dát: "]
Kurtosis[gumbhougcopuladata]

Porovnanie jednotlivých odhadov

Print["Hodnoty logaritmickej vierohodnostnej funkcie: "]
Table[LogLikelihood[dist,{-bmwdata,-jnjdata,-attdata}//Transpose],{dist,{varcov,gausscopula,studentcopula,claytoncopula,gumbhougcopula}}]

Grafy simulácií dvojrozmerných kopúl

Gaussova kopula

gauss1=CopulaDistribution[{"Binormal",-0.5},{NormalDistribution[],NormalDistribution[]}];
SeedRandom[20122807]; gauss1sim=RandomVariate[gauss1,5000];
gauss1list=ListPlot[gauss1sim,PlotRange->{{-4,4},{-4,4}},Frame->True,FrameStyle->Directive[30],AspectRatio->1,FrameLabel->"ρ = -0.5"]
gauss2=CopulaDistribution[{"Binormal",0},{NormalDistribution[],NormalDistribution[]}];
SeedRandom[20122807]; gauss2sim=RandomVariate[gauss2,5000];
gauss2list=ListPlot[gauss2sim,PlotRange->{{-4,4},{-4,4}},Frame->True,FrameStyle->Directive[30],AspectRatio->1,FrameLabel->"ρ = 0"]
gauss3=CopulaDistribution[{"Binormal",0.5},{NormalDistribution[],NormalDistribution[]}];
SeedRandom[20122807]; gauss3sim=RandomVariate[gauss3,5000];
gauss3list=ListPlot[gauss3sim,PlotRange->{{-4,4},{-4,4}},Frame->True,FrameStyle->Directive[30],AspectRatio->1,FrameLabel->"ρ = 0.5"]

Studentova kopula

student1=CopulaDistribution[{"MultivariateT",{{1,-0.5},{-0.5,1}},3},{NormalDistribution[],NormalDistribution[]}];
SeedRandom[20122807];student1sim=RandomVariate[student1,5000];
student1list=ListPlot[student1sim,PlotRange->{{-4,4},{-4,4}},Frame->True,FrameStyle->Directive[30],AspectRatio->1,FrameLabel->"ν = 3, ρ = -0.5"]
student2=CopulaDistribution[{"MultivariateT",{{1,0},{0,1}},3},{NormalDistribution[],NormalDistribution[]}];
SeedRandom[20122807];student2sim=RandomVariate[student2,5000];
student2list=ListPlot[student2sim,PlotRange->{{-4,4},{-4,4}},Frame->True,FrameStyle->Directive[30],AspectRatio->1,FrameLabel->"ν = 3, ρ = 0"]
student3=CopulaDistribution[{"MultivariateT",{{1,0.5},{0.5,1}},3},{NormalDistribution[],NormalDistribution[]}];
SeedRandom[20122807];student3sim=RandomVariate[student3,5000];
student3list=ListPlot[student3sim,PlotRange->{{-4,4},{-4,4}},Frame->True,FrameStyle->Directive[30],AspectRatio->1,FrameLabel->"ν = 3, ρ = 0.5"]
student4=CopulaDistribution[{"MultivariateT",{{1,-0.5},{-0.5,1}},15},{NormalDistribution[],NormalDistribution[]}];
SeedRandom[20122807];student4sim=RandomVariate[student4,5000];
student4list=ListPlot[student4sim,PlotRange->{{-4,4},{-4,4}},Frame->True,FrameStyle->Directive[30],AspectRatio->1,FrameLabel->"ν = 15, ρ = -0.5"]
student5=CopulaDistribution[{"MultivariateT",{{1,0},{0,1}},15},{NormalDistribution[],NormalDistribution[]}];
SeedRandom[20122807];student5sim=RandomVariate[student5,5000];
student5list=ListPlot[student5sim,PlotRange->{{-4,4},{-4,4}},Frame->True,FrameStyle->Directive[30],AspectRatio->1,FrameLabel->"ν = 15, ρ = 0"]
student6=CopulaDistribution[{"MultivariateT",{{1,0.5},{0.5,1}},15},{NormalDistribution[],NormalDistribution[]}];
SeedRandom[20122807];student6sim=RandomVariate[student6,5000];
student6list=ListPlot[student6sim,PlotRange->{{-4,4},{-4,4}},Frame->True,FrameStyle->Directive[30],AspectRatio->1,FrameLabel->"ν = 15, ρ = 0.5"]

Claytonova kopula

clayton1=CopulaDistribution[{"Clayton",1},{NormalDistribution[],NormalDistribution[]}];
SeedRandom[20122807];clayton1sim=RandomVariate[clayton1,5000];
clayton1list=ListPlot[clayton1sim,PlotRange->{{-4,4},{-4,4}},Frame->True,FrameStyle->Directive[30],AspectRatio->1,FrameLabel->"θ = 1"]
clayton2=CopulaDistribution[{"Clayton",0.5},{NormalDistribution[],NormalDistribution[]}];
SeedRandom[20122807];clayton2sim=RandomVariate[clayton2,5000];
clayton2list=ListPlot[clayton2sim,PlotRange->{{-4,4},{-4,4}},Frame->True,FrameStyle->Directive[30],AspectRatio->1,FrameLabel->"θ = 2"]
clayton3=CopulaDistribution[{"Clayton",0.2},{NormalDistribution[],NormalDistribution[]}];
SeedRandom[20122807];clayton3sim=RandomVariate[clayton3,5000];
clayton3list=ListPlot[clayton3sim,PlotRange->{{-4,4},{-4,4}},Frame->True,FrameStyle->Directive[30],AspectRatio->1,FrameLabel->"θ = 5"]

Gumbelova-Hougaardova kopula

gumbhoug1=CopulaDistribution[{"GumbelHougaard",2},{NormalDistribution[],NormalDistribution[]}];
SeedRandom[20122807];gumbhoug1sim=RandomVariate[gumbhoug1,5000];
gumbhoug1list=ListPlot[gumbhoug1sim,PlotRange->{{-4,4},{-4,4}},Frame->True,FrameStyle->Directive[30],AspectRatio->1,FrameLabel->"θ = 2"]
gumbhoug2=CopulaDistribution[{"GumbelHougaard",4},{NormalDistribution[],NormalDistribution[]}];
SeedRandom[20122807];gumbhoug2sim=RandomVariate[gumbhoug2,5000];
gumbhoug2list=ListPlot[gumbhoug2sim,PlotRange->{{-4,4},{-4,4}},Frame->True,FrameStyle->Directive[30],AspectRatio->1,FrameLabel->"θ = 4"]
gumbhoug3=CopulaDistribution[{"GumbelHougaard",6},{NormalDistribution[],NormalDistribution[]}];
SeedRandom[20122807];gumbhoug3sim=RandomVariate[gumbhoug3,5000];
gumbhoug3list=ListPlot[gumbhoug3sim,PlotRange->{{-4,4},{-4,4}},Frame->True,FrameStyle->Directive[30],AspectRatio->1,FrameLabel->"θ = 6"]