Copulas 3

6
Copulas: Part II ... a continuation of Part I We're talking about generating joint distributions for two variables, say x and y, with prescribed properties. >Just two? Pay attention! Before we run, we walk. For example, we introduced the 1parameter family of Frank's Copulas: [F1] where (for the moment) each of x and y lie in [0,1] ... and so does C(x,y). We also wrote this as: [F2] Note that if u and v are uniformly distributed random variables on [0,1], then C(x,y) is the probability that u ≤ x and v ≤ y. That is: C(x,y) = Prob[u ≤x, v≤y]. Figure 1 To generate Frank's Copula, we introduce (ta DUM!): g(z) = log[ (1 e dz ) / (1 e d )] Then we generate Frank's Copula via: [A] g(C) = g(x) + g(y) That is: log[(1 e dC ) / (1 e d )] = log[(1 e dx )/ (1 e d )] log[(1 e dy ) / (1 e d )] If we solve this for C, we'll get [F1]. >And what does that gguy look like? Like Figure 2a. See? It's just a simple, monotone (decreasing) function on [0,1]. Indeed, for z near 0, g(z) behaves like log[z]. Figure 2a Of course, that's not the only such g(z) one can invent. How about: g(z) = (1/d) (1 z d ) See Figure 2b? It's also monotone ... but decreasing (for d > 1). If we write g(C) = g(x) + g(y) and solve for C,

description

n/a

Transcript of Copulas 3

  • Copulas:PartII...acontinuationofPartI

    We'retalkingaboutgeneratingjointdistributionsfortwovariables,sayxandy,withprescribedproperties.

    >Justtwo?Payattention!Beforewerun,wewalk.Forexample,weintroducedthe1parameterfamilyofFrank'sCopulas:

    [F1]

    where(forthemoment)eachofxandyliein[0,1]...andsodoesC(x,y).

    Wealsowrotethisas:

    [F2]

    Notethatifuandvareuniformlydistributedrandomvariableson[0,1],thenC(x,y)istheprobabilitythatuxandvy.Thatis:C(x,y)=Prob[ux,vy]. Figure1

    TogenerateFrank'sCopula,weintroduce(taDUM!):g(z)=log[(1edz)/(1ed)]

    ThenwegenerateFrank'sCopulavia:[A]g(C)=g(x)+g(y)

    Thatis:log[(1edC)/(1ed)]=log[(1edx)/(1ed)]log[(1edy)/(1ed)]

    IfwesolvethisforC,we'llget[F1].

    >Andwhatdoesthatgguylooklike?LikeFigure2a.See?It'sjustasimple,monotone(decreasing)functionon[0,1].Indeed,forznear0,g(z)behaveslikelog[z].

    Figure2a

    Ofcourse,that'snottheonlysuchg(z)onecaninvent.Howabout:g(z)=(1/d)(1zd)

    SeeFigure2b?It'salsomonotone...butdecreasing(ford>1).Ifwewriteg(C)=g(x)+g(y)andsolveforC,

  • wegetClayton'sCopula:C(x,y)=[xd+yd1]1/d

    Then,ofcourse,there'sGumbel'sCopulawhereg(z)=[log(z)]dwherelog(z)We'llcalculatetheDependenceusingCopulas?Whenwe'refinishedwe'llbeabletogeneratexandydatawiththeprescribedMeansandStandardDeviationsandtheprescribedcorrelationor"dependence".

    Althoughwewillusuallybespeakingofstockreturns,thetwosetsofdatamaybetheaverageageofdriversin50states(that'sx1,x2,...x50)andtheannualnumberofautoaccidentsinthose50states(that'sy1,y2,...y50).Ormaybethexandydatarepresenttheannualcostofinsuranceclaimsandthecostoflawyer'sfees.Ormaybetheefficacyofadrugortherelationshipbetween$USDand$CADormaybe...

    >Canwecontinue?Okay,butrememberthatwe'reinterestingintheDependenceofoneontheother.Infact,wecouldeasilylookatthedistributionofthexandydataandinventsomedistributionfunctionthatfitsprettywell.(Normalorlognormal,forexample).Aah,butifwethentrytosimulatethesevariablesbyrandomselectionfromourtwoinventeddistributions,itishighlyunlikelythatwe'llgetanymeaningfulcorrelation.

    Forexample,supposewedothis,assumingthatbothsetslookliketheyarenormallydistributed:

    1. ThexsethasMean=1.0andSD=3.0andtheysethasMean=2.0andSD=4.0.2. Wegenerateahundredvaluesofxandyvariablesbyrandomselectionfromtwonormal

    distributionswiththeseparameters.3. Weplotthepoints(xk,yk)thegetascatterplotandwecalculatesomecorrelation.

    4. Eachtimewedosteps2and3we'llgetdifferentresults

  • >SouseCopulas!Goodidea!

    We'lltalkaboutArchimedeanCopulaswhicharegeneratedvia[A],above,whereChasargumentswhichbothliein[0,1].

    IfF1(x)andF2(y)arethecumulativedistributionfunctionsforthexandydata(xandy,ofcourse,areNOTrestrictedto[0,1]),thenF1(x)andF2(y)willliein[0,1].

    Foragivenxvalue,sayU,what'stheprobabilitythatxU?It'sF1(U)...thecumulativeprobabilitydistributionforthexvariable..Foragivenyvalue,sayV,what'stheprobabilitythatyV?It'sF2(V)...thecumulativeprobabilitydistributionfortheyvariable.

    Andwhat'stheprobabilitythatxUandyV?It'sajoint,cumulativeprobabilityFthatwe'llgenerateusingCopulas,namely:

    [B1]F(U,V)=C(F1(U),F2(V))whereF1(U)andF2(V)aretheprobabilitiesthatxUandyV.

    ThisdescribesajointdistributionfunctionevaluatedatU,Vwheretheindividualdistributions(calledthemarginaldistributions)areF1andF2.IfweselectsomeCopulaandweknow(orassume)distributionsforeachvariable,then[B1]willprovideajointdistribution.

    >Wait!IfF1(U)istheprobabilitythatxUandF2(V)istheprobabilitythatyVthentheprobabilitythatxUandyVisF1(U)F2(V).Goodthinking!Considerthis:

  • Wemakearandomselectionof100jillionvaluesofxand60jilliontimeswefindthatxU.WeconcludethatF1(U)=0.60fromwhichweconcludethat,60%ofthetime,xU.Wealsomakearandomselectionof100jillionvaluesofyandfindthat30jilliontimeswegotyV.WeconcludethatF2(V)=0.30fromwhichweconcludethat,30%ofthetime,yV.Wenowhave100jillionselectionsofbothxandyand60jilliontimeswehadxUso,ofthese,we'dexpect30%willhaveyVand30%of60jillionis18jillionsotheprobabilityofhavingxUandyVis18outof100jillionor0.18whichisF1(U)F2(V)=0.60*0.30.

    >Sowhyallthefussaboutcopulasandjointdistributionsand...?We'duseF=F1F2ifthetwovariableswereindependent.However,we'retalkingabout"dependence"so,havingselectedanx,theyvaluemayberestrictedbecauseofthatdependence.

    >Whydidn'tyousaythatbefore?Hey!I'mjustlearning'boutthisstuff.AfewdaysagoIdidn'tknowacopulafromacupola.

    >Okay,butin[B1],you'reassumingyouknowtheindividualdistributions,right?Yes,inthiscase,but...

    >Andyou'dgetadifferentjointdistributioneverytimeyoudecidetochangecopulas,right?Well,yesbut...

    >IfIjustgaveyouthejointdistribution,wouldyouacceptitorwouldyoupickacopula?Aah,goodpoint!Infact,nomatterwhatjointdistributionFunctionyougaveme,there'llalwaysbeaCopulasatifying[B1].

    >You'rekidding,right?NomatterwhatjointdistributionIinvent?Yes...that'sSklar'sTheorem.Infact:

    ACopulaconnectsagivenjointdistributionFunctiontoitsmarginaldistributions...them'stheindividualdistributionfunctionsF1,F2.TheCopuladescribesthedependencebetweenvariables,regardlessoftheirindividualdistributions.Copulaswereinvented(in1959?)inordertoisolatethedependencestructurebetweenvariables.NomatterwhatF1andF2are,thenumbersF1(U)andF2(V)willbeuniformlydistributedon[0,1]!SincetheargumentsofCarejustuniformlydistributedrandomvariabes(namelyF1(U)andF2(U)),what'sleftistheirdependence.Infact,wecanlinktogetheranytwomarginaldistributions(F1,F2)andanyCopulaandwe'llgetavalidjointdistributionFunction.Infact...

    >Okay!Canwecontinue?Sure.Let's...>Wait!Don'tyoufindthatconfusing?Firstyousayxandy,thenuandv,thenUandV?

  • Here'sapicture...Figure3.xisourrandomvariableandUisaparticularvalueofxandifweask:"What'stheprobabilitythatxU?"theanswerisu=F1(U).

    NotethatxhenceUcanhaveanyvalue,but0u1.

    Figure3

    Morestuff

    We'venotedthatu=F1(U)andv=F2(V)arejustuniformlydistributedvariables,regardlessofthefunctionsF1andF2.

    Further,uandvareuniformlydistributedin[0,1]...sincethey'reprobabilities.Further,ifwesolveforUandVwe'dget:U=F11(u)andV=F21(v)...whereF11andF21aretheinversefunctions.

    >Inversewhat?Ifa=f(b)=b3wherefisthe"cubefunction",andwesolveforb=f1(a)=a1/3,wecallthat"cuberoot"functiontheinverseofthecubefunctionandusethenotationf1.Gotit?Wedothatwheneverwecansolve"backwards",givingthenamef1totheinverseoffandthenameg1totheinverseofgand...uh,thatremindsme.Ifwelookbackat[A],itsays:g(C)=g(x)+g(y).IfwesolveforCwe'dwritethisasC=g1(g(x)+g(y)).

    >Yeah...Igotit.Ihaveabetterexample.LookagainatFigure3.IfweknowUwegettoubygoingNorththenWest,alongtheredlinetou=F1(U).However,ifweknowu,wegoEastthenSouthtoU=F11(u).

    >Igotit!Anyway,wecannowwrite[B1]as:

    [B2]C(u,v)=F(F11(u),F21(v))

    >zzzZZZWe'realmostthere!Ournewequationinvolvesjusttheuniformlydistributedvariablesuandv,see?Tomodelthemwejustselectnumbersatrandomin[0,1]using,forexample,ExcelsRAND()function,see?>zzzZZZ

  • Indeed,wecannowconclude(viaSklar'stheorem)that:

    IfweknowF1andF2,thedistributionsofxandy(whereF1(U)istheprobabilitythatxUandF2(V)istheprobabilitythatyV),andwepickourfavouriteCopula,thenthejointdistributionFisgivenby[B1]:F(U,V)=C(F1(U),F2(V))

    Also:

    IfweknowthejointdistributionFandmarginaldistributionsF1andF2,thenthereisauniqueCopulaaccordingto[B2],namely:C(u,v)=F(F11(u),F21(v))

    Theneatthingis,wecanpickourCopulatomodelthedependencebetweenvariableswithoutconsideringwhichtypeofmarginals.>Huh?Thexvariablemaybenormallydistributedandtheyvariablemaybelognormalormaybeatdistributionormaybeuniformlyormaybe...>Yeah,butwhatCopulaandhowdoyouchangethedependence?HavingchosenyourfavouriteCopula,youchangetheparameter,suchasthedinClayton'sCopula:g(z)=[xd+yd1]1/d

    Aah,butwhatCopula,eh?>That'swhatIsaid!

    forPartIII