File:SQRTDiffusion.png
From testwiki
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: 17 KB, MIME type: image/png)
This file is from Wikimedia Commons and may be used by other projects. The description on its file description page there is shown below.
This graph image could be re-created using vector graphics as an SVG file. This has several advantages; see Commons:Media for cleanup for more information. If an SVG form of this image is available, please upload it and afterwards replace this template with
{{vector version available|new image name}}.It is recommended to name the SVG file “SQRTDiffusion.svg”—then the template Vector version available (or Vva) does not need the new image name parameter. |
| DescriptionSQRTDiffusion.png |
three sample paths of an square root diffuion process (Cox Ingersoll Ross), see SDE in the image Deutsch: Drei Pfade von Wurzel-Diffusionsprozessen |
| Date | 2 May 2012-20 |
| Source | made with the free software R, see the source code at the bottom |
| Author | Thomas Steiner |
| Permission (Reusing this file) |
Thomas Steiner put it under the GFDL |
Licensing
| Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled GNU Free Documentation License.http://www.gnu.org/copyleft/fdl.htmlGFDLGNU Free Documentation Licensetruetrue |
| This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported license. | ||
| ||
| This licensing tag was added to this file as part of the GFDL licensing update.http://creativecommons.org/licenses/by-sa/3.0/CC BY-SA 3.0Creative Commons Attribution-Share Alike 3.0truetrue |
R-Quelltext:
##SQRT-Diffusion mit normalverteiltem Anfangswert
sdiff<-function(kappa=1, theta=1.2, sigma=0.2, init=c(0, 1), from=0, to=2, steps=500*(to-from)) {
t<-seq(from,to,length=steps)
cir<-rnorm(n=1,mean=init[1],sd=sqrt(init[2]))
for (i in (1:(steps-1))) {
cir[i+1]=cir[i] + kappa*(theta-cir[i])*(to-from)/steps + sqrt(cir[i])*sigma*rnorm(n=1,mean=0,sd=sqrt((to-from)/steps))
}
return(cir)
}
cols=c("navy", "darkolivegreen4", "red")
t<-seq(0,2,length=1000)
set.seed(17091945)
png(filename="SQRTDiffusion.png", width=1200, height=900, pointsize=12)
par(bg="lightgrey")
matplot(t,sdiff(init=c(0,0)),type="l", xlab="", ylab="",col=cols[1], lwd=2, ylim=c(0,1.55))
lines(t,sdiff(init=c(1.5,0)),col=cols[2], lwd=2)
lines(t,sdiff(),col=cols[3], lwd=2)
title(main="SQRT - Diffusion", cex.main=2.5)
text(x=1.85,y=0,expression(list(kappa==1, theta==1.2, sigma == 0.2)) )
text(x=1.4,y=0.3,expression(paste("d",X[t]==kappa(theta-X[t]),"dt+",sigma,sqrt(X[t]),"d", W[t])),cex=2.5)
text(x=0,y=0.07, expression(X[0]==0),col=cols[1])
text(x=0,y=1.42, expression(X[0]==2),col=cols[2])
text(x=0.03,y=0.35, expression(paste(X[0], "~N(0,1)") ),col=cols[3])
dev.off()
Captions
Add a one-line explanation of what this file represents
Items portrayed in this file
depicts
20 December 2005
File history
Click on a date/time to view the file as it appeared at that time.
| Date/Time | Thumbnail | Dimensions | User | Comment | |
|---|---|---|---|---|---|
| current | 22:55, 21 December 2005 | 1,200 × 900 (17 KB) | wikimediacommons>Thire |
File usage
The following page uses this file:
Retrieved from "https://en.wiki.beta.math.wmflabs.org/wiki/File:SQRTDiffusion.png"