arch icon indicating copy to clipboard operation
arch copied to clipboard

Add MAMean (MA(q)) model with volatility & forecasting support

Open premdev1234 opened this issue 8 months ago • 4 comments

This PR introduces an implementation of the Moving Average (MA) mean model—MAMean—as a new subclass of ARCHModel.
It fills a longstanding gap in ARCH’s mean model suite, enabling direct modeling of MA(q) dynamics in return series.


Key Features

  • New Model: MAMean, supporting flexible lag order q, with optional constant term. -API: .fit(), .simulate(), .forecast(), .resids -Volatility support: Tested with GARCH(1,1) (others welcome)
  • Public API Ready: Registered via __init__.py and __all__

🧪 Testing

  • Tested pipeline: MAMean + GARCH(1,1):
  • Smoke‑tested simulation, forecasting, and residual pipelines.
  • Coverage :
    • Parameter handling (lags, bounds)
    • Simulation pipeline
    • Forecast integration

📝 Notes

  • 🔍 Currently validated only against GARCH(1,1) and Future tests with EGARCH, APARCH is encouraged
  • 📐 Design mirrors ARX/HARX, making future extensions trivial
  • 🙌 Happy to iterate on interface, test depth, or documentation if requested

premdev1234 avatar Jun 16 '25 02:06 premdev1234

Hi @bashtage Could you please approve the workflow so the tests can run? Happy to iterate if needed

premdev1234 avatar Jun 23 '25 01:06 premdev1234

Hi @bashtage,

Could you please approve the workflow so that the tests can run? The currently failing tests don’t appear to be caused by this commit, but may instead be due to an environment issue.

Also, a deprecation warning is being raised for the windows-2019 runner:

##[warning]The windows-2019 runner image is being deprecated, consider switching to windows-2022 (windows-latest) or windows-2025 instead. For more details: https://github.com/actions/runner-images/issues/12045

Let me know if I should update the runner image or make any further changes.

Thanks!

premdev1234 avatar Jun 26 '25 05:06 premdev1234

Approved.

I think the runners need to be updated. Ubuntu should be ubuntu-latest

bashtage avatar Jun 26 '25 06:06 bashtage

Based on my analysis, the model performs as expected within the scoped range and is ready to be merged. That said, I’d welcome any further remarks or suggestions you may have. Once this PR is finalized, I plan to extend the implementation to support additional volatility models as well. Thank you...

On Thu, Jun 26, 2025 at 12:24 PM Kevin Sheppard @.***> wrote:

bashtage left a comment (bashtage/arch#778) https://github.com/bashtage/arch/pull/778#issuecomment-3007375455

Approved.

I think the runners need to be updated. Ubuntu should be ubuntu-latest

— Reply to this email directly, view it on GitHub https://github.com/bashtage/arch/pull/778#issuecomment-3007375455, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4YDYZPGNFDCTSL6LP2QGXL3FOKK7AVCNFSM6AAAAAB7MAY6I6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTAMBXGM3TKNBVGU . You are receiving this because you authored the thread.Message ID: @.***>

premdev1234 avatar Jun 27 '25 02:06 premdev1234