Returns `n`-period simple moving average of array `arr`.
(arr: pd.Series, n: int)
| 23 | |
| 24 | |
| 25 | def SMA(arr: pd.Series, n: int) -> pd.Series: |
| 26 | """ |
| 27 | Returns `n`-period simple moving average of array `arr`. |
| 28 | """ |
| 29 | return pd.Series(arr).rolling(n).mean() |
no outgoing calls