Page 1 of 1

data manipulation using the @holiday command

Posted: Tue Feb 12, 2019 1:09 pm
by BT454
Hi all,
I'd like to use the @holiday function to create a series that is binary for all US/North American banking holidays (1 = holiday, 0 = non holiday). I can return a series for just one holiday (i.e. @holiday(christmas), but not for multiple holidays in one series. Is this possible? If so, can you provide the syntax?
Thanks,
Bob

Re: data manipulation using the @holiday command

Posted: Tue Feb 12, 2019 1:47 pm
by EViews Matt
Hello,

You can combine multiple holidays (or any dummy series) with the logical "or" operator. For example,

Code: Select all

series h = @holiday("easter") or @holiday("thanksgiving") or @holiday("christmas")

Re: data manipulation using the @holiday command

Posted: Tue Feb 12, 2019 2:12 pm
by BT454
Thanks!

Re: data manipulation using the @holiday command

Posted: Tue Dec 15, 2020 3:43 pm
by BT454
Hi all!
Circling back to this command. Is this list up to date?
http://www.eviews.com/help/helpintro.ht ... vereg.html

"..Available holiday keywords are: "easter", "labor", "newyear", "memorial", "taxday", "christmas", "july4th", "february", "thanksgiving", "mlking", "veterans", and "columbus"..."

many of these keywords crash my prg.
Thanks!
Bob

Re: data manipulation using the @holiday command

Posted: Tue Dec 15, 2020 4:09 pm
by EViews Gareth
It is.

Re: data manipulation using the @holiday command

Posted: Tue Dec 15, 2020 4:15 pm
by BT454
Thank you!
This code for instance crashes and gives me a missing data error

close @wf
%startrange = "1/1/2010"
%endrange = @datestr(@dateadd(@dateval(@date),1,"m"))
wfcreate(wf=holidays, page=data) d7 %startrange %endrange
series hdays = @holiday("newyear")

I'm sure i'm doing something wrong. I'm just not sure what it is since the code works with easter, christmas, and thanksgiving.
any help is appreciated, as always. Thank you again!

Re: data manipulation using the @holiday command

Posted: Tue Dec 15, 2020 4:35 pm
by EViews Gareth
The docs you referenced are for a completely different command. The @holiday function does not support those holidays.

Re: data manipulation using the @holiday command

Posted: Tue Dec 15, 2020 4:49 pm
by BT454
That'll do it. Is there a list of holidays supported by the @holiday command?
Thanks again!
Bob

Re: data manipulation using the @holiday command

Posted: Tue Dec 15, 2020 5:23 pm
by EViews Gareth
Yes, under the documentation for the @holiday command.
http://eviews.com/help/helpintro.html#p ... %23ww68064

Re: data manipulation using the @holiday command

Posted: Wed Dec 16, 2020 1:07 pm
by BT454
Thanks!

Re: data manipulation using the @holiday command

Posted: Fri Dec 18, 2020 1:22 pm
by BT454
Hi!
I noticed in this post there "are 4 holidays listed that are supported by @holiday. Christmas, Thanksgiving, Easter, and Chinese New Year. Just making sure I'm not missing any.
Thanks again!

Re: data manipulation using the @holiday command

Posted: Fri Dec 18, 2020 1:51 pm
by EViews Gareth
Correct