Image:Girsanov.png
From Wikipedia, the free encyclopedia

Size of this preview: 800 × 471 pixel
Image in higher resolution (1212 × 714 pixel, file size: 62 KB, MIME type: image/png)
![]() | This is a file from the Wikimedia Commons. The description on its description page there is shown below. |
Description |
Visualisation of the Girsanov theorem — The left side shows a Wiener process with negative drift under a canonical measure P; on the right side each path of the process is colored according to its likelihood under the martingale measure Q. The density transformation from P to Q is given by the Girsanov theorem. |
---|---|
Source |
created with GNU R, see source below |
Date |
7. july 2006 |
Author |
Martin Keller-Ressel (uploaded by Thomas Steiner) |
Permission |
Martin Keller-Ressel put it under the GFDL |
R-source code:
set.seed(145) par("mar"=c(4,2,2,2)) npath <- 30 N <- 1000 t <- seq(0,1,length=N+1) sigma = 0.5 nu = - 0.7 hue = 0.03 dampen = 0.25 BM.norm <- matrix(rnorm(npath*N,sd=1/sqrt(N),mean=0),ncol = npath) BM.norm <- rbind(0,apply(BM.norm,2,cumsum)) tmat <- matrix(rep(t,npath),ncol=npath,byrow=FALSE) BM <- sigma*BM.norm + tmat*nu weights.orig <- matrix(1,ncol=npath,nrow=1) png(file="girsanov.png",height=714,width=1212) par(mfrow=c(1,2)) plot.new() plot.window(xlim = c(0,1),ylim=range(BM)) col.orig <- hsv(h=hue,s=0.6*weights.orig,v=.95) for(i in 1:npath) { lines(t,BM[,i],cex=1.5,col=col.orig[i]) } box(col="grey",cex=1.5) title(sub="30 paths of a Brownian motion with negative drift",line=2,col.sub="grey10") girsanov.weights <- exp(dampen * (-nu/sigma*BM.norm[N,] - 0.5*(nu/sigma)^2)) girsanov.weights <- (girsanov.weights - min(girsanov.weights)) / diff(range(girsanov.weights)) col.girsanov <- hsv(h=hue,s=girsanov.weights,v=0.95) plot.new() plot.window(xlim = c(0,1),ylim=range(BM)) for(i in 1:npath) { lines(t,BM[,i],cex=1.5,col=col.girsanov[i]) } title(sub="The same paths reweighted according to the Girsanov formula",line=2,col.sub="grey10") box(col="grey",cex=1.5) dev.off()
File links
The following pages on the English Wikipedia link to this file (pages on other projects are not listed):
Retrieved from "http://en.wikipedia.org../../../g/i/r/Image%7EGirsanov.png_9b1f.html"