Displaying 1 result from an estimated 1 matches for "gpsim1".
Did you mean:
dpsims
2003 Jul 13
1
Problems Simulating (PR#3471)
...and Returns that are defined as
Rt = [P(t)-P(t-1)]/P(t-1). The returns have Normal distribution
=> Rt is has N(mu=0.14, sigmaSquared=0.2) distribution.
To do the task above, I use the following files:
c:\ProgramFiles\R\rw1050\Code1.txt
consists of the following text:
====================
gpsim1_function(t,runs,mu,delta,stdev){
jold=0
xx_rep(0,t*runs)
for(i in 1:runs){
ind=(i-1)*t
xx[ind+1]=1
for(j in 2:t) {
xx[ind+j]_xx[ind+j-1]*
exp(rnorm(n=1,mean=mu*delta*delta,sd=stdev*delta))
}
}
xx
}
=======================
File "experiment4commands.txt" has text:
source("code1.txt...