[R-SIG-Finance] Artificial price series
Horace.Tso at pgn.com
Tue Apr 12 21:02:41 CEST 2011
Mark, except in some rare instances, evidence is clear that financial prices are anything but brownian motion. And i think that's the reason Worik notices in some qualitative way random walk simulation appears unreal. One of the key differences is real price series have jumps. All these recent papers by Ait-Sahalia (2010, 2009, 2008, 2004) and others have shown one is better off with a semimartingale model with some compound Poisson process.
In fact, the guy is arguing whether brownian motion is even necessary to model high frequency data (Annals of Statistics 2010, Vol. 38, No. 5, 3093-3128).
From: r-sig-finance-bounces at r-project.org [mailto:r-sig-finance-bounces at r-project.org] On Behalf Of Mark Leeds
Sent: Tuesday, April 12, 2011 11:05 AM
To: Mark Breman
Cc: r-sig-finance at stat.math.ethz.ch; David St John
Subject: Re: [R-SIG-Finance] Artificial price series
Hi: if you can assume that returns follow brownian motion, then, in his book
Simulation and Infernce for Stochastic Differential equations on pg 26,
Stefano Iacus shows how to generate the trajectory of the stock price of
S_N starting at S_0 and using increments of deltaT. The code below is from
the book directory of his sde package and is labelled ex1.10.R. If you don't
have his book, the explanation for below is also in Hull and any other
decent derivatives text.
r <- 1
sigma <- 0.5
x <- 10
N <- 100 # number of end points of the grid including T
T <- 1 # length of the interval [0,T] in time units
Delta <- T/N # time increment
W <- numeric(N+1) # initialization of the vector W
t <- seq(0,T, length=N+1)
for(i in 2:(N+1))
W[i] <- W[i-1] + rnorm(1) * sqrt(Delta)
S <- x * exp((r-sigma^2/2)*t + sigma*W)
plot(t,S,type="l",main="geometric Brownian motion")
On Tue, Apr 12, 2011 at 1:28 PM, Mark Breman <breman.mark at gmail.com> wrote:
> Hi David,
> That's what i like so much about following this list: you regularly read
> about things you never knew existed!
> This package looks great David.
> 2011/4/12 David St John <dstjohn at math.uic.edu>
> > Make sure to use bootstrap() for returns data and generateSample() for
> > price
> > data. bootstrap() only makes sense for a stationary series. The
> > stationarity assumptions make it desirable to sample from the returns.
> > generateSample() creates returns from prices, bootstraps them, then
> > calculates the random prices from the bootstrapped returns.
> > -David
> > [[alternative HTML version deleted]]
> > _______________________________________________
> > R-SIG-Finance at r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> > -- Subscriber-posting only. If you want to post, subscribe first.
> > -- Also note that this is not the r-help list where general R questions
> > should go.
> [[alternative HTML version deleted]]
> R-SIG-Finance at r-project.org mailing list
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions
> should go.
[[alternative HTML version deleted]]
R-SIG-Finance at r-project.org mailing list
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should go.
More information about the R-SIG-Finance