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
Creating a variable containing number of decimal points of another variable's valuesHi, I have a variable measuring speed. The values are double and vary in the number of decimal point…
Multiple Regression analysis: Explanatory Variable as percentageIn STATA when I do a regression analysis and the y variable is expressed in a percentage, I normally…
Instrumental Variable HelpHi, I'm having trouble with a new instrumental variable. So I'm trying to find some causality, betw…
Code that picks up sudden spikes in prices Code: * Example generated by -dataex-. To install: ssc install dataex clear input double op …
Dropping individuals when missing observations and change in variableHi, I am running panel data analysis in Stata and work with Survey data from Germany. The period co…
Subscribe to:
Post Comments (Atom)
0 Response to Monte Carlo Simulation to generate garch process
Post a Comment