Can anyone tell what's wrong with my simulation:
////////////////////////////////////////the Code:
clear all
program define MonteCarlo, rclass
import excel "C:\Users\altal\OneDrive\Desktop\Udemy\ma1.xls x", sheet("ma1") firstrow
quietly gen time =_n
quietly tsset time
scalar a0 = 0.01
scalar alpha = 0.05
scalar beta = 0.6
gen v=rnormal(0,1)
gen h=rnormal(0,1)
generate e=sqrt(h)*v
replace h=a0+(alpha*(v[_n-1]^2)+ beta)*h[_n-1]
arch y, arch(1/1) garch(1/1)
end
simulate _cons [ARCH]L1.arch [ARCH]L1.garch, reps(500): MonteCarlo
summarize _cons [ARCH]L1.arch [ARCH]L1.garch
////////////////////////////////////
thanks in advance
Related Posts with Monte Carlo Simulation to generate garch process
Expand value within groupDear all, I am currently working on a patient consultations database from 2016 to 2021. My purpose …
What's the principle behind twoway graph's legend and its label optionDear Stata users, I have an interesting finding regards to twoway graph's legend option, put it pre…
VolatilityHello guys, I have two variables that I need to transform into volatility. For example, I have the …
cvlasso lambda list truncated starting in v14I am using cvlasso and it seems to be truncating the number of lambda's generated when the lminratio…
Two different colours when using histogram, byHi all, I am trying to generate two histograms with the following code. histogram lines, discrete …
Subscribe to:
Post Comments (Atom)
0 Response to Monte Carlo Simulation to generate garch process
Post a Comment