Page 1 of 1

Differencing in worksheet with NA-filled holidays

Posted: Mon Jan 02, 2017 6:26 pm
by JimForest
I am trying to calculate a change in an an interest rate data series and I am having a problem.

The issue seems to be due to holidays and other days when the market was closed. Data is in 5-day week format.

I tried to work around it by adding an IF condition to the sample statement, doing the following:

Code: Select all

smpl @all IF bond_30_otr_yld<>NA series bond_30_otr_ch_yld=bond_30_otr_yld-bond_30_otr_yld(-1)
Unfortunately, it fills in NA values where there are NAs in the series (day of NA and following day), even when I use the IF condition in the sample statement. Is there an easy work-around? Different differencing command or a function for deleting dates from workfile based on NAs in a series?

Re: Differencing in worksheet with NA-filled holidays

Posted: Mon Jan 02, 2017 7:38 pm
by EViews Gareth
Use Proc->Contract current page to remove NA values from the workfile.

Re: Differencing in worksheet with NA-filled holidays

Posted: Mon Jan 02, 2017 8:18 pm
by JimForest
Thanks Gareth!