Page 1 of 1

### News Impact Curve

Posted: Tue May 26, 2009 11:18 am
Below is an example code for plotting the News Impact Curve (NIC). The code first simulates an EGARCH(1,1) model, and then generates the graph of (a version of) NIC. Main purpose of the code is to give the basic idea behind the NIC and therefore should be modified for more specific cases. And the usual disclaimer applies.

Code: Select all

`'News Impact Curve Example for EGARCH(1,1) Model'Obtaining a feasible curve depends on the significance of parameter values,'which you may fail to obtain in each run.'*************************************************************************************'THIS SECTION SIMULATES AND ESTIMATES AN EGARCH(1,1) MODEL'*************************************************************************************'Decide a range and create a workfile!range = 200wfcreate u !range'Assign initial values to seriessmpl @first @firstseries res = 1series gar =1series y = 1'Simulate an EGARCH(1,1) modelcoef(5) thetatheta(1) = 2theta(2) = .1theta(3) = .5theta(4) = .3theta(5) = .6 for !i=1 to !range-1   smpl !i+1 !i+1   gar = exp(theta(2) + theta(3)*@abs(res(-1)/gar(-1)) + theta(4)*(res(-1)/gar(-1)) + theta(5)*log(gar(-1)))   res = @sqrt(gar)*nrnd  y = theta(1)+resnextsmpl @alldelete gar res'Estimate the EGARCH(1,1) model with the above generated seriesequation eq01.arch(1,1,egarch) y c'Retrieve residuals, conditional variance and standardized errorseq01.makeresids res_eqeq01.makegarch gar_eqseries z = res_eq/@sqrt(gar_eq)'Replace the estimated coefficent values with the old ones.for !i=1 to eq01.@ncoef  theta(!i) = eq01.@coef(!i)next'*************************************************************************************'THIS IS THE ACTUAL PART THAT GENERATES THE NEWS IMPACT CURVE'*************************************************************************************!uvar = @mean(gar_eq) 'An estimate of unconditional variance!np = 100 'Number of points!lb =-2*@round(@max(@abs(z))) 'Lower bound!ub =2*@round(@max(@abs(z))) 'Upper bound!s = (!ub-!lb)/(!np-1) 'Step sizematrix(!np,2) nic 'Generate a matrix to store the components'First observations of standardized error and conditional variancenic(1,1)=!lbnic(1,2)=exp(theta(2) + theta(3)*@abs(!lb-!s) + theta(4)*(!lb-!s) + theta(5)*log(!uvar))'Generate the components, columns being the standardized error and conditional variance, respectively.for !i=2 to !np   nic(!i,1) = !lb+(!i-1)*!s   nic(!i,2) = exp(theta(2) + theta(3)*@abs(nic(!i-1,1)) + theta(4)*(nic(!i-1,1)) + theta(5)*log(!uvar))next'Plot the News Impact Curve (NIC)nic.xypairdelete gar_eq res_eq z`

### Re: News Impact Curve

Posted: Tue Aug 05, 2014 5:56 pm
I'm not that clear with the steps but this is what I do.

1. Estimate the EGARCH model

2. Procs/Make Garch Variance Series, and name it garch01

3. Procs/Make Residual Series (ordinary), and name it resid1

4. Genr z=resid1/sqr (garch01) -- in this case, " resid1" is "u" and garch01 is actually the σ.

5. Use Excel to rearrange the series z from small to large, and name a new series "sig"

6. Command line --- series log(s)=α*abs(sig)-γ*(sig)

7. Open sig and s as a group, and then view-graph- xy line. (I would make the y-axis as conditional volatility instead of conditional variance)

In this way, I always find the positive impact is greater, however, in my EGARCH model, γ is negative and there should be a greater negative impact. Is there something wrong with my steps?