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
data manipulation using the @holiday command
Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason
-
EViews Matt
- EViews Developer
- Posts: 592
- Joined: Thu Apr 25, 2013 7:48 pm
Re: data manipulation using the @holiday command
Hello,
You can combine multiple holidays (or any dummy series) with the logical "or" operator. For example,
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
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
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
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13611
- Joined: Tue Sep 16, 2008 5:38 pm
Re: data manipulation using the @holiday command
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!
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!
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13611
- Joined: Tue Sep 16, 2008 5:38 pm
Re: data manipulation using the @holiday command
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
That'll do it. Is there a list of holidays supported by the @holiday command?
Thanks again!
Bob
Thanks again!
Bob
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13611
- Joined: Tue Sep 16, 2008 5:38 pm
Re: data manipulation using the @holiday command
Yes, under the documentation for the @holiday command.
http://eviews.com/help/helpintro.html#p ... %23ww68064
http://eviews.com/help/helpintro.html#p ... %23ww68064
Re: data manipulation using the @holiday command
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!
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!
- Attachments
-
- holiday.png (105.51 KiB) Viewed 13710 times
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13611
- Joined: Tue Sep 16, 2008 5:38 pm
Who is online
Users browsing this forum: No registered users and 2 guests
