Series.seasonDummy
(Series)
Create time series with seasonal dummies
Syntax
outputSeries = Series.seasonDummy(range, dummyPeriods, ...)
Input Arguments
range
[ Dater ]
Date range on which the time series will be created.
dummyPeriods
[ numeric ]
Numeric periods in which the new
outputSeries
will be assigned the value1
in each year of therange
; otherwise, the values will0
; thedummyPeriods
are frequency specific and depend on the date frequency of therange
, e.g. thedummyPeriods
represent quarters for a quarterlyrange
, months for a monthlyrange
, etc.
Any further input arguments (third, fourth, etc.) will be pased into the
Series
constructor as the third, fourth, etc. input arguments (i.e.
the comments
, userData
, etc.)
Output Arguments
outputSeries
[ Series ]
New time series with the value
1
in thedummyPeriods
in each year within therange
, and with0
otherwise.
Description
Examples
x = Series.seasonDummy(mm(2020,01):mm(2029,12), 1)
x = Series.seasonDummy(mm(2020,01):mm(2029,12), [1, 7])