File:Gamma-OU.png
From Wikimedia Commons, the free media repository
Jump to navigation
Jump to search
Size of this preview: 800 × 600 pixels. Other resolutions: 320 × 240 pixels | 640 × 480 pixels | 1,024 × 768 pixels | 1,200 × 900 pixels.
Original file (1,200 × 900 pixels, file size: 8 KB, MIME type: image/png)
File information
Structured data
Captions
DescriptionGamma-OU.png | A gamma-process (levy-process) and an OU process driven by it. and the mean of the invariant distribution |
Date | |
Source | created with GNU R, see source below |
Author | Thomas Steiner |
Permission (Reusing this file) |
Thomas Steiner put it under the CC-by-SA 2.5. |
This file is licensed under the Creative Commons Attribution-Share Alike 2.5 Generic license.
- You are free:
- to share – to copy, distribute and transmit the work
- to remix – to adapt the work
- Under the following conditions:
- attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
- share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
R-source Code:
###################################################### ### OU-levy processes ################################ # trajectory of an OU-process, driven by some levy process (bdlp; here cauchy or gamma) ## starting at time t=0 at Z_0=Z0 until time t=T in "steps" equidistant steps; mean reversion "mr" ## parameters of the distribution of the bdlp are stored in param process.ou<-function(param=c(0,1),mr=1,T=1,steps=500,bdlp="cauchy",Z0=0) { dt=T/(steps-1) ou=array(Z0,dim=steps) if (bdlp=="cauchy") { dLt=rcauchy(steps-1, location=param[1], scale=param[2]*dt) } else if (bdlp=="gamma") { dLt=rgamma(n=steps-1, shape=param[1], scale=param[2]*dt) } for (tm in 1:(steps-1)) { ou[tm+1]=ou[tm]-mr*ou[tm]*dt+dLt[tm] } return (list(time=seq(0,T,length=steps),Lt=c(0,cumsum(dLt)),ou=ou)) } set.seed(29011980) time=seq(0,5.7,length=5000) png("Gamma-OU.png",width=1200, height=900) par(mfrow=c(2,1)) gou=process.ou(param=c(2.1,0.9),mr=1.3,T=max(time),steps=length(time),bdlp="gamma",Z0=1.1) plot(gou$time,gou$Lt,type="p",pch=".",main="Gamma process",col="purple",xlab="",ylab="") plot(gou$time,gou$ou,type="p",pch=".",main="Gamma-OU process",col="purple",xlab="",ylab="") abline(h=2.1*0.9/1.3,lty="dotted",col="darkgrey") #mean of limit-distribution dev.off()
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 15:46, 4 May 2007 | 1,200 × 900 (8 KB) | Thire (talk | contribs) | new version, code online | |
13:54, 4 May 2007 | 1,200 × 900 (12 KB) | Thire (talk | contribs) | now two graphs... | ||
13:53, 4 May 2007 | 1,200 × 900 (12 KB) | Thire (talk | contribs) | {{Information |Description = A gamma-process (levy-process) and an OU process driven by it. and the mean of the invariant distribution |Source = created with GNU R, see source below |Date = 4. may 2007 |Author = Thomas Steiner |Perm |
You cannot overwrite this file.
File usage on Commons
There are no pages that use this file.