Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

freq argument options in statsmodels tsa AR and ARMA models

In the statsmodels time series analysis AR and ARMA models, the freq argument can be "a Pandas offset or ‘B’, ‘D’, ‘W’, ‘M’, ‘A’, or ‘Q’."

What do ‘B’, ‘D’, ‘W’, ‘M’, ‘A’, and ‘Q’ mean? I'm guessing that D is 'daily', W is 'weekly', M is 'monthly', A is 'annually', and that Q is 'quarterly', but I can't figure out what B is, and I can't find any documentation that confirms (or disconfirms) my guesses.

like image 944
Noah Motion Avatar asked Feb 10 '23 05:02

Noah Motion


1 Answers

It is documented in their super class statsmodels.tsa.base.tsa_model.TimeSeriesModel.

"""
Timeseries model base class

Parameters
----------
endog
exog
dates
freq : str {'B','D','W','M','A', 'Q'}
    'B' - business day, ie., Mon. - Fri.
    'D' - daily
    'W' - weekly
    'M' - monthly
    'A' - annual
    'Q' - quarterly

"""
like image 155
kay Avatar answered Feb 13 '23 03:02

kay