Hello Tom,
Thanks for your help.
But now I need to change a serie of Random Walk that I attachment the code, in one serie that include elements seasonal, like this equation
yt = summation of h=1 until h=[s/2] of γt(h),
Where,
yt is a random walk, like that, γt(h) = γt−1(h) + ηt(h), h= 1, ..., [s/2],
nt is a white noise, like that, ηt(h) ∼ IID (0, Σ η(h)), h= 1, ..., [s/2],
I don´t understand how I include h= 1, ..., [s/2], in the random walk and the white noise in order to create the serie simulated
Again, I need a simulate serie of 500 observations, the same that I created
thanks for your help
Regards
Code: Select all
compute n = 500
compute rvar=1.0
set a 1 n = 0.0
set u 1 n = 0.0
do i=1,n
compute a(i)=%ran(rvar)
end do i
compute p = 1
do i=1,p
compute u(i)=%ran(rvar)
end do i
do i=p+2,n
compute u(i)=u(i-1)+a(i)
end do i