
    .i#
                        d dl m Z mZ d dlZd dlZd dlmc mZ d dl	m
Z
mZmZ  ej                  ddg      d        Z ej                  g d      d	        Z ej                  ddg      d
        Z ej                  ddg      d        Z ej                  ddg      d        Z ej                  ddg      d        Z ej                  ddg      d        Z ej                   ej*                  d ej,                  d      ej.                  j0                  g      dg      d        Z ej                   ej*                  d ej,                  d      ej.                  j0                  g      ddg      d        Z ej                  d ed       ej6                  dd      g      d        Zej                  d        Zej                  d        Z ej                  g d      d        Zy)     )datetime	timedeltaN)	DataFrameSeriesbdate_rangeTF)paramsc                     | j                   S )z&raw keyword argument for rolling.applyparamrequests    Z/var/www/app/trading-bot/venv/lib/python3.12/site-packages/pandas/tests/window/conftest.pyrawr           ==    )summeanmedianmaxminvarstdkurtskewcountsemc                     | j                   S Nr
   r   s    r   arithmetic_win_operatorsr      s      ==r   c                     | j                   S r   r
   r   s    r   centerr!   +       ==r      c                     | j                   S r   r
   r   s    r   min_periodsr%   0   r"   r   c                     | j                   S )zadjust keyword argument for ewmr
   r   s    r   adjustr'   5   r   r   c                     | j                   S )z"ignore_na keyword argument for ewmr
   r   s    r   	ignore_nar)   ;   r   r   c                     | j                   S )znumeric_only keyword argumentr
   r   s    r   numeric_onlyr+   A   r   r   numba)markscythonc                     | j                   S )z)engine keyword argument for rolling.applyr
   r   s    r   enginer0   G   s     ==r   )r,   T)r.   T)r.   Fc                     | j                   S )z2engine and raw keyword arguments for rolling.applyr
   r   s    r   engine_and_rawr2   R   s     ==r   z1 day)daysDc                     | j                   S )z2Halflife argument for EWM when times is specified.r
   r   s    r   halflife_with_timesr6   `   r   r   c            
          t         j                  j                  d      j                  d      } t        j                  dd      }t         j
                  | |<   t        | t        t        ddd      d            }|S )	zMake mocked series as fixture.   d      (     r#   periodsindex)	nprandomdefault_rngstandard_normalarangenanr   r   r   )arrlocsseriess      r   rI   rI   f   sa     ))


"
2
23
7C99RDCIC{8D!Q+?MNFMr   c            
          t        t        j                  j                  d      j	                  d      t        t        ddd      d            S )zMake mocked frame as fixture.r8   )r9   
   r<   r#   r9   r=   r?   )r   rA   rB   rC   rD   r   r    r   r   framerM   p   sA     
		a 00;(4A.< r   )Nr#   r8      rK   c                     | j                   S )z4step keyword argument for rolling window operations.r
   r   s    r   steprP   y   r   r   ) r   r   numpyrA   pytestpandas.util._test_decoratorsutil_test_decoratorstdpandasr   r   r   fixturer   r   r!   r%   r'   r)   r+   r   
skip_if_nomark
single_cpur0   r2   timedelta64r6   rI   rM   rP   rL   r   r   <module>r]      sK  
   ) )  e}% &
  e}% & ay! " e}% &
 e}% &
 e}% &
 W]R]]7%;V[[=S=S$TU
 MBMM'$:FKK<R<R#S	
 	
 !2NBNN1c4JKL M
     *+ ,r   