Differencing in worksheet with NA-filled holidays

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Jason, EViews Steve, EViews Moderator

JimForest
Posts: 83
Joined: Thu Oct 16, 2008 7:53 pm
Location: MA

Differencing in worksheet with NA-filled holidays

Postby JimForest » Mon Jan 02, 2017 6:26 pm

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?

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13312
Joined: Tue Sep 16, 2008 5:38 pm

Re: Differencing in worksheet with NA-filled holidays

Postby EViews Gareth » Mon Jan 02, 2017 7:38 pm

Use Proc->Contract current page to remove NA values from the workfile.
Follow us on Twitter @IHSEViews

JimForest
Posts: 83
Joined: Thu Oct 16, 2008 7:53 pm
Location: MA

Re: Differencing in worksheet with NA-filled holidays

Postby JimForest » Mon Jan 02, 2017 8:18 pm

Thanks Gareth!


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 11 guests