
    M/PhZ                    H   d dl mZ d dlmZ d dlZd dlZd dlZd dlm	Z	 d dl
mZ d dlmZ d dlmZ d dlmZmZ d d	lmZ d d
lmZ d dlmZmZmZmZ g dZd6dZd7dZd8dZ	 	 	 d9d:d!Z 	 d;d"Z!d# Z"d$ Z#d% Z$d& Z%d' Z&d( Z'd) Z(d* Z)d+ Z*d, Z+d- Z,d. Z-d/ Z.d0 Z/d1 Z0d2 Z1d<d5Z2dS )=    )annotations)lrangeN)	DataFrame)offsets)	to_offset)Literal)_is_recarray_is_using_pandas)ValueWarning)NDArray)
array_like	bool_likeint_likestring_like)lagmat	lagmat2ds	add_trendduplication_matrixelimination_matrixcommutation_matrixvecvechunvecunvechfreq_to_periodcFskipc                N   t          |d          }t          |dd          }t          |dd          }g d}|dk    r|                                 S |d	k    r|d
d         }d}n1|dk    s|dk    r|d
d         }|dk    r
|dd         }d}n|dk    rd}t          |           rddlm} t          |          t          | d
          }|rDt          | t          j
                  rt          j        |           } n)|                                 } nt          j        |           } t          |           }t          j        t          j        d|dz   t          j                  |dz             }	t          j        |	          }	|dk    r|	d
d
df         }	d	|v r#|rd }
|                     |
d          }n?t          j        t          j        |           d          }|dk    }|| d         dk    z  }|}t          j        |          r|dk    r| j        dk    rd}nkt          j        | j        d                   |         }t          | t          j                  r| j        }d                    d |D                       }d| d}| d| d}t5          |          |dk    r|dd
         }|	d
d
dd
f         }	|rdnd}|r@t          j        |	| j        |          }	|	| g} t          j        | d
d
|         d          } n!|	| g} t          j        | d
d
|                   } | S ) a  
    Add a trend and/or constant to an array.

    Parameters
    ----------
    x : array_like
        Original array of data.
    trend : str {'n', 'c', 't', 'ct', 'ctt'}
        The trend to add.

        * 'n' add no trend.
        * 'c' add constant only.
        * 't' add trend only.
        * 'ct' add constant and linear trend.
        * 'ctt' add constant and linear and quadratic trend.
    prepend : bool
        If True, prepends the new data to the columns of X.
    has_constant : str {'raise', 'add', 'skip'}
        Controls what happens when trend is 'c' and a constant column already
        exists in x. 'raise' will raise an error. 'add' will add a column of
        1s. 'skip' will return the data without change. 'skip' is the default.

    Returns
    -------
    array_like
        The original data with the additional trend columns.  If x is a
        pandas Series or DataFrame, then the trend column names are 'const',
        'trend' and 'trend_squared'.

    See Also
    --------
    statsmodels.tools.tools.add_constant
        Add a constant column to an array.

    Notes
    -----
    Returns columns as ['ctt','ct','c'] whenever applicable. There is currently
    no checking for an existing trend.
    prependtrend)nr   tctcttoptionshas_constant)raiseaddr   )constr    trend_squaredr!   r   N   r   r#   r"      r$   )recarray_exception)dtypec                t    	 t          j        |           dk    ot          j        | dk              S #  Y dS xY w)Ng        F)npptpany)ss    X/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/statsmodels/tsa/tsatools.pysafe_is_constz add_trend.<locals>.safe_is_const~   s=    !6!99+@qCx0@0@@! 55s   /2 7axisr(   zx is constant.z, c                ,    g | ]}t          |          S  str.0r   s     r5   
<listcomp>zadd_trend.<locals>.<listcomp>   s    +D+D+DqCFF+D+D+D    z3x contains one or more constant columns. Column(s) z are constant.z Adding a constant with trend='z' is not allowed.r   indexcolumns)r   r   copyr	   statsmodels.tools.sm_exceptionsr.   NotImplementedErrorr
   
isinstancepdSeriesr   r1   
asanyarraylenvanderarangefloat64fliplrapplyr2   r3   ndimshaperD   join
ValueErrorrC   concatcolumn_stack)xr    r   r'   rD   
trendorderr.   	is_pandasnobstrendarrr6   	col_constptp0col_is_constnz_constbase_err
const_colsmsgorders                      r5   r   r   '   s   P ++Gw0LMMMEn.F  L
 211G||vvxx	#"1"+

	$%3,,"1"+C<<aclG

	%
A 6FFFFFF!"4555 D))I a## 	QAAAAM!q66Dy
	!TAXRZ000*q. H y""H||AAAqD>
e|| 	!! ! ! q11II6"-**333D19L#qtqy1H I6) 	+w&&6Q;;/HH i
33I>G!!R\22 ,"#)!%+D+DG+D+D+D!E!EJ6%6 6 6  "ZZ%ZZZ oo%''!!""+#AAAqrrE? AAbE (<IIIqMIa%jq)))qMOAgggJ''Hr@   r,   Tc                :   t          |d          }t          |d          }t          | dd          } |d}|dk     r| j        d         |z   }| j        dk    r| dddf         } | dd|f         }|d	u r|dz   }ne|d
u r| j        d         }nS|dk     r| j        d         |z   dz   }|| j        d         k    r'| j        d         }t          j        dt                     |}t          ||d          }t          |          }t          || j        d                   }	|rU||v r)|
                    |                    |                     n(|	
                    |	                    |                     t          j        | |d|f         || |d|	f         f          S )a  
    Returns an array with lags included given an array.

    Parameters
    ----------
    x : array_like
        An array or NumPy ndarray subclass. Can be either a 1d or 2d array with
        observations in columns.
    col : int or None
        `col` can be an int of the zero-based column index. If it's a
        1d array `col` can be None.
    lags : int
        The number of lags desired.
    drop : bool
        Whether to keep the contemporaneous variable for the data.
    insert : bool or int
        If True, inserts the lagged values after `col`. If False, appends
        the data. If int inserts the lags at int.

    Returns
    -------
    array : ndarray
        Array with lags

    Examples
    --------

    >>> import statsmodels.api as sm
    >>> data = sm.datasets.macrodata.load()
    >>> data = data.data[['year','quarter','realgdp','cpi']]
    >>> data = sm.tsa.add_lag(data, 'realgdp', lags=2)

    Notes
    -----
    Trims the array both forward and backward, so that the array returned
    so that the length of the returned array is len(`X`) - lags. The lags are
    returned in increasing order, ie., t-1,t-2,...,t-lags
    lagsdroprX   r-   )rR   Nr   r,   TFz<insert > number of variables, inserting at the last positionBoth)trim)r   r   r   rS   rR   warningswarnr   r   r   poprC   r1   rW   )
rX   colrf   rg   insertcontempins_idxndlags
first_cols	last_colss
             r5   add_lagrt      s   N D&!!DT6""D1c"""A
{ Qwwgaj3v{{aaagJ3iG~~'	5'!*A::WQZ&(1,FAGAJWQZFM!  
 GT///FJw
++I 0*NN:++C001111MM)//#..///?AdeeZ/0&!DEE9<L:MNOOOr@   c                n   t          |d          }t          |d          }| j        dk    rt          |          dk    r| j        } n| j        dk    rt	          d          | j        d         }|dk    r| |                     d          z
  }nt          j        t          j	        t          |                    |dz             }t          j                            |                              |           }| t          j        ||          z
  }| j        dk    rt          |          dk    r|j        }|S )	a  
    Detrend an array with a trend of given order along axis 0 or 1.

    Parameters
    ----------
    x : array_like, 1d or 2d
        Data, if 2d, then each row or column is independently detrended with
        the same trendorder, but independent trend estimates.
    order : int
        The polynomial order of the trend, zero is constant, one is
        linear trend, two is quadratic trend.
    axis : int
        Axis can be either 0, observations by rows, or 1, observations by
        columns.

    Returns
    -------
    ndarray
        The detrended series is the residual of the linear regression of the
        data on the trend of given order.
    rd   r8   r-   r,   z0x.ndim > 2 is not implemented until it is neededr   r7   )N)r   rR   intTrG   rS   meanr1   rM   rN   floatlinalgpinvdot)rX   rd   r8   r[   residtrendsbetas          r5   detrendr      s   , UG$$ED&!!Dv{{s4yyA~~C	
!!>
 
 	
 71:DzzAFFFNN"29U4[[11UQY???y~~f%%))!,,BF64(((v{{s4yyA~~Lr@   forwardexmaxlagrw   ri   .Literal['forward', 'backward', 'both', 'none']originalLiteral['ex', 'sep', 'in']
use_pandasboolreturnKNDArray | DataFrame | tuple[NDArray, NDArray] | tuple[DataFrame, DataFrame]c                P   t          |d          }t          |d          }t          |ddd          }t          |dd	          }| }t          | d
dd          } t	          |d          o|}|dn|}|                                }|r|dv rt          d          d}| j        \  }}	|dv r|	}||k    rt          d          t          j	        ||z   |	|dz   z  f          }
t          dt          |dz                       D ]%}| |
||z
  ||z   |z
  |	||z
  z  |	||z
  dz   z  f<   &|dv rd}n|dv r|}nt          d          |dv rt          |
          }n|}|r|} t          | t                    rLd | j        D             }t          t!          |                    | j        d         k    rt          d          nt#          | j                  g}d |D             }t          |          D ]5}t#          |dz             |                    fd|D                        6t          |
d|         | j        |          }
|
j        |d         }|dv r||         }|                    |d          }n"|
|||df         }|dk    r|
||d|f         }|dk    r||fS |S ) a,	  
    Create 2d array of lags.

    Parameters
    ----------
    x : array_like
        Data; if 2d, observation in rows and variables in columns.
    maxlag : int
        All lags from zero to maxlag are included.
    trim : {'forward', 'backward', 'both', 'none', None}
        The trimming method to use.

        * 'forward' : trim invalid observations in front.
        * 'backward' : trim invalid initial observations.
        * 'both' : trim invalid observations on both sides.
        * 'none', None : no trimming of observations.
    original : {'ex','sep','in'}
        How the original is treated.

        * 'ex' : drops the original array returning only the lagged values.
        * 'in' : returns the original array and the lagged values as a single
          array.
        * 'sep' : returns a tuple (original array, lagged values). The original
                  array is truncated to have the same number of rows as
                  the returned lagmat.
    use_pandas : bool
        If true, returns a DataFrame when the input is a pandas
        Series or DataFrame.  If false, return numpy ndarrays.

    Returns
    -------
    lagmat : ndarray
        The array with lagged observations.
    y : ndarray, optional
        Only returned if original == 'sep'.

    Notes
    -----
    When using a pandas DataFrame or Series with use_pandas=True, trim can only
    be 'forward' or 'both' since it is not possible to consistently extend
    index values.

    Examples
    --------
    >>> from statsmodels.tsa.tsatools import lagmat
    >>> import numpy as np
    >>> X = np.arange(1,7).reshape(-1,2)
    >>> lagmat(X, maxlag=2, trim="forward", original='in')
    array([[ 1.,  2.,  0.,  0.,  0.,  0.],
       [ 3.,  4.,  1.,  2.,  0.,  0.],
       [ 5.,  6.,  3.,  4.,  1.,  2.]])

    >>> lagmat(X, maxlag=2, trim="backward", original='in')
    array([[ 5.,  6.,  3.,  4.,  1.,  2.],
       [ 0.,  0.,  5.,  6.,  3.,  4.],
       [ 0.,  0.,  0.,  0.,  5.,  6.]])

    >>> lagmat(X, maxlag=2, trim="both", original='in')
    array([[ 5.,  6.,  3.,  4.,  1.,  2.]])

    >>> lagmat(X, maxlag=2, trim="none", original='in')
    array([[ 1.,  2.,  0.,  0.,  0.,  0.],
       [ 3.,  4.,  1.,  2.,  0.,  0.],
       [ 5.,  6.,  3.,  4.,  1.,  2.],
       [ 0.,  0.,  5.,  6.,  3.,  4.],
       [ 0.,  0.,  0.,  0.,  5.,  6.]])
    r   r   ri   Tr   backwardbothnoneoptionalr&   r   )r   sepinr%   rX   r-   N)rR   r/   r   )r   r   zEtrim cannot be 'none' or 'backward' when used on Series or DataFramesr   )r   r   zmaxlag should be < nobsr,   )r   r   )r   r   ztrim option not validc                ,    g | ]}t          |          S r:   r;   r=   s     r5   r?   zlagmat.<locals>.<listcomp>  s    333AQ333r@   zSColumns names must be distinct after conversion to string (if not already strings).c                ,    g | ]}t          |          S r:   r;   )r>   rm   s     r5   r?   zlagmat.<locals>.<listcomp>  s    1113s88111r@   c                :    g | ]}t          |          d z   z   S )z.L.r;   )r>   rm   lag_strs     r5   r?   zlagmat.<locals>.<listcomp>  s)    LLL3CHHu,w6LLLr@   rB   )r   r   r7   r   )r   r   r   r   r
   lowerrU   rS   r1   zerosrangerw   rL   rH   r   rD   setr<   nameextendrC   ilocrg   )rX   r   ri   r   r   origrZ   dropidxr[   nvarlmkstartobsstopobs	x_columnsrD   lagrf   leadsr   s                      @r5   r   r   )  s   R fh''F:|44J7	  D 8Z9LMMMH D1c...A t,,;I\66tD::<<D 
T111#
 
 	

 GJD$=  ~~2333	4&=$&1*"56	7	7B1c&1*oo&&    	
D6MA%%
TVaZ!^44	6	
 	

 """	%	%	%0111###b'' 3a## 	&33333I3y>>""agaj00 0   1 QVI11y111== 	N 	NC#'llGNNLLLL)LLLMMMMr(7(|17GDDDwxyy!}$$OE99YQ9//D(7"GHH,-ux''12E5U{r@   c           	     (   t          |d          }t          |dd          }t          |ddd          }||}t          ||          }t          | d          }| j        d	k    r$|rt          j        |           } n2| dddf         } n%| j        d
k    s| j        dk    rt          d          | j        \  }}	|r|rt          | j
        ddd
f         ||dd          }
|
j
        ddd|d	z   f         g}t          d	|	          D ]N}t          | j
        dd|f         ||dd          }
|                    |
j
        dd||d	z   f                    Ot          j        |d	          S |rt          j        |           } t          | ddd
f         ||d          ddd|d	z   f         g}t          d	|	          D ]A}|                    t          | dd|f         ||d          dd||d	z   f                    Bt          j        |          S )a  
    Generate lagmatrix for 2d array, columns arranged by variables.

    Parameters
    ----------
    x : array_like
        Data, 2d. Observations in rows and variables in columns.
    maxlag0 : int
        The first variable all lags from zero to maxlag are included.
    maxlagex : {None, int}
        The max lag for all other variables all lags from zero to maxlag are
        included.
    dropex : int
        Exclude first dropex lags from other variables. For all variables,
        except the first, lags from dropex to maxlagex are included.
    trim : str
        The trimming method to use.

        * 'forward' : trim invalid observations in front.
        * 'backward' : trim invalid initial observations.
        * 'both' : trim invalid observations on both sides.
        * 'none' : no trimming of observations.
    use_pandas : bool
        If true, returns a DataFrame when the input is a pandas
        Series or DataFrame.  If false, return numpy ndarrays.

    Returns
    -------
    ndarray
        The array with lagged observations, columns ordered by variable.

    Notes
    -----
    Inefficient implementation for unequal lags, implemented for convenience.
    maxlag0maxlagexT)r   ri   r   r   Nr,   r   r-   z'Only supports 1 and 2-dimensional data.r   )ri   r   r   r7   )ri   r   )r   r   maxr
   rR   rI   r   rU   rS   r   r   r   appendrV   r1   rK   rW   )rX   r   r   dropexri   r   r   rZ   r[   r   rf   lagslir   s                r5   r   r     s   L w	**G*t<<<H7	  D (##F D))Iv{{ 	QAA!!!T'
AA	
1

BCCCJD$ Z F111a4L&tdt
 
 
 )AAA}1},-.q$ 	? 	?Aqqq!tf4$4  D MM$)AAAv1'<$<=>>>>ya((((	 M! 	qAwTD999!!!]w{]:JKF 1d^^ 
 
1QQQT7F===6HqL((	
 	
 	
 	

 ?6"""r@   c                ,    |                      d          S )NF)ravelmats    r5   r   r     s    99S>>r@   c                j    | j                             t          t          |                               S N)rx   take_triu_indicesrL   r   s    r5   r   r     s$    5::mCHH--...r@   c                @    t          j        |           \  }}|| z  |z   S r   )r1   tril_indicesr!   rowscolss      r5   _tril_indicesr   #  #    ##JD$!8d?r@   c                @    t          j        |           \  }}|| z  |z   S r   )r1   triu_indicesr   s      r5   r   r   (  r   r@   c                @    t          j        |           \  }}|| z  |z   S r   )r1   diag_indicesr   s      r5   _diag_indicesr   -  r   r@   c                    t          t          j        t          |                               }||z  t          |           k    sJ |                     ||fd          S )Nr   rd   )rw   r1   sqrtrL   reshape)vr   s     r5   r   r   2  sN    BGCFFOOAq5CFF????99aV39'''r@   c           	     T   ddt          j        ddt          |           z  z             z   z  }t          t          j        |                    }t          j        ||f          }| |t          j        |          <   ||j        z   }|t          j        |          xx         dz  cc<   |S )Ng      ?rA   r,      r-   )	r1   r   rL   rw   roundr   r   rx   r   )r   r   results      r5   r   r   8  s    "rwq1s1vv:~.../Drx~~DXtTl##F$%F2?4  !fhF 2?4  !!!Q&!!!Mr@   c                    t          | d          } t          j        | | dz   z  dz            }t          j        d |D                       j        S )z
    Create duplication matrix D_n which satisfies vec(S) = D_n vech(S) for
    symmetric matrix S

    Returns
    -------
    D_n : ndarray
    r!   r,   r-   c                P    g | ]#}t          |                                          $S r:   )r   r   )r>   rX   s     r5   r?   z&duplication_matrix.<locals>.<listcomp>R  s(    4441VAYY__&&444r@   )r   r1   eyearrayrx   )r!   tmps     r5   r   r   G  sQ     	CA
&a!e!
"
"C8444445577r@   c                    t          | d          } t          t          j        t          j        | | f                              }t          j        | | z            |dk             S )z
    Create the elimination matrix L_n which satisfies vech(M) = L_n vec(M) for
    any matrix M

    Parameters
    ----------

    Returns
    -------
    r!   r   )r   r   r1   trilonesr   )r!   vech_indicess     r5   r   r   U  sR     	CArwrw1v//00L6!a%==*++r@   c                   t          | d          } t          |d          }t          j        | |z            }t          j        | |z                                | |fd          }|                    |                                d          S )z
    Create the commutation matrix K_{p,q} satisfying vec(A') = K_{p,q} vec(A)

    Parameters
    ----------
    p : int
    q : int

    Returns
    -------
    K : ndarray (pq x pq)
    pqr   r   r   r7   )r   r1   r   rN   r   r   r   )r   r   Kindicess       r5   r   r   e  s{     	CACA
q1uAiA&&1vS&99G66'--//6***r@   c           	     2   t          j        | dz            }t          j        | dz            }t          dt          |                     D ]J}||         }t          |          D ]!}||xx         ||||z
  dz
           z  z  cc<   "|d|         |d|<   K|S )z
    Transforms params to induce stationarity/invertability.

    Parameters
    ----------
    params : array_like
        The AR coefficients

    Reference
    ---------
    Jones(1980)
    r-   r,   N)r1   tanhr   rL   )params	newparamsr   jakiters         r5   _ar_transparamsr   z  s     
##I
'&1*

C1c&kk""    aL1XX 	7 	7EJJJ!iE	A666JJJJBQB	"1"r@   c                j   |                                  } |                                  }t          t          |           dz
  dd          D ]Q}| |         }t          |          D ](}| |         || ||z
  dz
           z  z   d|dz  z
  z  ||<   )|d|         | d|<   Rdt          j        |           z  }|S )z
    Inverse of the Jones reparameterization

    Parameters
    ----------
    params : array_like
        The transformed AR coefficients
    r,   r   rA   r-   N)rE   r   rL   r1   arctanh)r   r   r   r   r   
invarcoefss         r5   _ar_invtransparamsr     s     [[]]F
++--C3v;;?Ar**  1I1XX 	 	E -!fQY].C*CCAF
CJJ !Wrr

RZ'''Jr@   c           	        dt          j        |            z
  dt          j        |            z   z                                  }dt          j        |            z
  dt          j        |            z   z                                  }t          dt	          |                     D ]J}||         }t          |          D ]!}||xx         ||||z
  dz
           z  z  cc<   "|d|         |d|<   K|S )z
    Transforms params to induce stationarity/invertability.

    Parameters
    ----------
    params : ndarray
        The ma coeffecients of an (AR)MA model.

    Reference
    ---------
    Jones(1980)
    r,   N)r1   exprE   r   rL   )r   r   r   r   br   s         r5   _ma_transparamsr     s     bffWoo%!bffWoo*=>DDFFIwAw$78
>
>
@
@C 1c&kk""    aL1XX 	7 	7EJJJ!iE	A666JJJJBQB	"1"r@   c                P   |                                  }t          t          |           dz
  dd          D ]Q}| |         }t          |          D ](}| |         || ||z
  dz
           z  z
  d|dz  z
  z  ||<   )|d|         | d|<   Rt          j        d| z
  d| z   z             }|S )z
    Inverse of the Jones reparameterization

    Parameters
    ----------
    params : ndarray
        The transformed MA coefficients
    r,   r   rA   r-   N)rE   r   rL   r1   log)macoefsr   r   r   r   
invmacoefss         r5   _ma_invtransparamsr     s     ,,..C3w<<!#Q++  AJ1XX 	 	E!%.1wq5y1}/E+EEAF
CJJ "1"g&!g+!g+6777Jr@   c                     t          d           d          t          j         fdt          dd          D                       S )a  
    Returns the successive differences needed to unintegrate the series.

    Parameters
    ----------
    x : array_like
        The original series
    d : int
        The number of differences of the differenced series.

    Returns
    -------
    y : array_like
        The increasing differences from 0 to d-1 of the first d elements
        of x.

    See Also
    --------
    unintegrate
    dNc                L    g | ] }t          j        |z
            d          !S )r   )r1   diff)r>   ir   rX   s     r5   r?   z&unintegrate_levels.<locals>.<listcomp>  s.    EEErwq!a%((+EEEr@   r   rA   )r   r1   asarrayr   )rX   r   s   ``r5   unintegrate_levelsr     sT    * 	CA	"1"A:EEEEEU1a__EEEFFFr@   c                D   t          |          dd         }t          |          dk    rI|                    d          }t          t	          j        t          j        || f                   |          S |d         }t	          j        t          j        || f                   S )ay  
    After taking n-differences of a series, return the original series

    Parameters
    ----------
    x : array_like
        The n-th differenced series
    levels : list
        A list of the first-value in each differenced series, for
        [first-difference, second-difference, ..., n-th difference]

    Returns
    -------
    y : array_like
        The original series de-differenced

    Examples
    --------
    >>> x = np.array([1, 3, 9., 19, 8.])
    >>> levels = unintegrate_levels(x, 2)
    >>> levels
    array([ 1.,  2.])
    >>> unintegrate(np.diff(x, 2), levels)
    array([  1.,   3.,   9.,  19.,   8.])
    Nr,   rA   r   )listrL   rl   unintegrater1   cumsumr_)rX   levelsx0s      r5   r   r     s|    4 &\\!!!_F
6{{QZZ^^29RU2q5\22F;;;	B9RU2q5\"""r@   freqstr | offsets.DateOffsetc                   t          | t          j                  st          |           } t          | t          j                  sJ | j                                        } d}| dv s|                     |          rdS | dk    s|                     d          rdS | dk    s|                     d          rd	S | d
k    s|                     d          rdS | dk    rdS | dk    rdS | dk    rdS t          d                    |                     )a$  
    Convert a pandas frequency to a periodicity

    Parameters
    ----------
    freq : str or offset
        Frequency to convert

    Returns
    -------
    int
        Periodicity of freq

    Notes
    -----
    Annual maps to 1, quarterly maps to 4, monthly to 12, weekly to 52.
    )zA-zAS-zY-zYS-zYE-)AYr,   Q)zQ-QSQE   M)zM-MSME   WzW-4   D   B   H   zDfreq {} not understood. Please report if you think this is in error.)	rH   r   
DateOffsetr   	rule_codeupper
startswithrU   format)r   yearly_freqss     r5   r   r     s   $ dG.// dG./////>!!D4LzT__\::q	(:;;q	(:;;r	--r	q	q	r&&,fTll
 
 	
r@   )r   Fr   )Nr,   FT)r,   r   )r   r   F)
r   rw   ri   r   r   r   r   r   r   r   )Nr   r   F)r   r  r   rw   )3
__future__r   statsmodels.compat.pythonr   rj   numpyr1   pandasrI   r   pandas.tseriesr   pandas.tseries.frequenciesr   typingr   statsmodels.tools.datar	   r
   rF   r   statsmodels.tools.typingr   statsmodels.tools.validationr   r   r   r   __all__r   rt   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r:   r@   r5   <module>r&     s   " " " " " " , , , , , ,                " " " " " " 0 0 0 0 0 0       A A A A A A A A 8 8 8 8 8 8 , , , , , ,             @ @ @ @FMP MP MP MP`, , , ,b AJ04!	T T T T Tp EJT# T# T# T#n  / / /  
  
  
( ( (  8 8 8, , , + + +*  .  ,  2  *G G G4# # #D*
 *
 *
 *
 *
 *
r@   