NBERCYCLES Procedure |
@NBERCYCLES generates dummy variables for quarterly, monthly, weekly or daily data based upon the NBER business cycle reference dates. (For weekly or daily data, this uses the first of the month for peaks and the last of the month for troughs).
@NBERCYCLES( options ) start end
Parameters
|
start, end |
range over which to define dummies [standard workspace] |
Options
PEAKS=(output) 0-1 dummy series which is 1 for cycle peaks
TROUGHS=(output) 0-1 dummy series which is 1 for cycle troughs
UP=(output) 0-1 dummy series which is 1 from trough date + 1 until next peak date
DOWN=(output) 0-1 dummy series which is 1 from peak date + 1 until next trough date
Source
National Bureau of Economic Research, Inc.
1050 Massachusetts Avenue
Cambridge MA 02138
USA
Example
This creates a quarterly dummy variable with 1's in the NBER expansions between 1960Q1 and 2009Q4. It then transforms them to a 1, -1 dummy.
cal(q) 1960
@nbercycles(up=expansion) 1960:1 2009:4
*
* Start with ystar of +/-1
*
set ystar = %if(expansion,1.0,-1.0)
This generates UP and DOWN dummies for the expansions and contractions, and uses the contraction dummy as background shading on a graph.
@nbercycles(up=up,down=down)
graph(footer="Smoothed Real Activity Factor",shade=down)
# indicator
Copyright © 2026 Thomas A. Doan