Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forecasting using a Moving Average/Median #7828

Open
cgarciga opened this issue Oct 29, 2021 · 1 comment
Open

Forecasting using a Moving Average/Median #7828

cgarciga opened this issue Oct 29, 2021 · 1 comment

Comments

@cgarciga
Copy link

Maybe I'm just not seeing it in the tsa api, but is there a function that forecasts e.g. observation $T+1$ by taking an average or median of the last $T-p:T$ observations for some positive integer $p$ (and for $p=0$ just take a random walk)? I know it's trivial, but it would be a nice convenience to avoid having to write a function for this myself :)

@bashtage
Copy link
Member

There isn't one, but I think you can easily make these using pandas rolling and then a shift.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants