how to calculate Value At Risk VaR

For technical questions regarding estimation of single equations, systems, VARs, Factor analysis and State Space Models in EViews. General econometric questions and advice should go in the Econometric Discussions forum.

Moderators: EViews Gareth, EViews Moderator

rambo424
Posts: 1
Joined: Sat Feb 06, 2010 8:39 am

how to calculate Value At Risk VaR

Postby rambo424 » Sat Feb 06, 2010 8:49 am

hi everybody!
:D i'm a student and i've got some problems with VaR because I'm using Eviews 5 and it's not working at all!! these are my dates, could someone give a look at them?? Please help me as soon as possible because I'm preparing an exam :oops: :)
The title I'm using is Bulgari and I need to calculate the Var for the two schemes BULL & BEAR. Here we go:


smpl 1 1264
genr r_bulgari=dlog(g_bulgari)
genr rm=@movav (r_bulgari,22)
genr scr=(r_bulgari-@mean (r_bulgari))^2
genr mv=@movav(scr,22)
genr z=((r_bulgari-@mean(r_bulgari))/sqr(mv))
genr zq=@quantile(z,0.05)
genr h=@obsnum
genr var=h*@mean(r_bulgari)+zq*sqr(h*@elem(mv,"1264"))
graph rischio.line var

for!i=3 to 1264
smpl!i !i
IF r_bulgari(!i-1)<0 then genr i1=1
genr r1=r_bulgari
genr it=1
else genr i2=1
genr r2=r_bulgari
genr it=0
end_if
next
genr vm1=mv*i1
genr vm2=mv*i2
graph Ciao.line vm1 vm2
genr rm1=rm*i1
genr rm2=rm*i2
genr zq1=@quantile((r1-@mean(r1))/sqr(vm1))
genr zq2=@quantile((r2-@mean(r2))/sqr(vm2))
genr varm=p*var1+(1-p)var2

Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 1 guest