File:Girsanov.png

Page contents not supported in other languages.
This is a file from the Wikimedia Commons
From Wikipedia, the free encyclopedia

Original file(1,212 × 714 pixels, file size: 62 KB, MIME type: image/png)

Summary

Description
English: 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.
Date
Source created with GNU R, see source below
Author Martin Keller-Ressel (uploaded by Thomas Steiner)
Permission
(Reusing this file)
Martin Keller-Ressel put it under the GFDL
PNG development
InfoField
 
This chart was created with R.
Source code
InfoField

R 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()

Licensing

GNU head 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.
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported 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.
This licensing tag was added to this file as part of the GFDL licensing update.

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

depicts

7 July 2006

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current12:43, 7 July 2006Thumbnail for version as of 12:43, 7 July 20061,212 × 714 (62 KB)Thire{{Information| |Description = visualisation of the girsanov theorem by a change of measure of a brownian motion which removes the (negiave) drift |Source = chreated with GNU R, see source below |Date = 7. july 2006 |Author = Martin Keller-Ressel (uploaded
The following pages on the English Wikipedia use this file (pages on other projects are not listed):

Global file usage

The following other wikis use this file: