# Fixed rolling regression window

**URL:** <https://discourse.pymc.io/t/fixed-rolling-regression-window/9841>\
**Category:** v5\
**Created:** [July 7, 2022, 11:34am UTC](https://discourse.pymc.io/t/fixed-rolling-regression-window/9841 "2022-07-07T11:34:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dodi](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/dodi/32/5356_2.png) [@dodi](https://discourse.pymc.io/u/dodi)\
**Post date:** [July 7, 2022, 11:34am UTC](https://discourse.pymc.io/t/fixed-rolling-regression-window/9841/1 "2022-07-07T11:34:38Z")

</div>

Hi,

From the rolling regression example utilizing GassianRandomWalks. How can you specify a fixed window rolling forward by one step using the pymc code - as per the classic way to do rolling regressions. Just want to see what the code will look like.

Appreciate any help

---

<div class="post-metadata">

**Author:** ![twiecki](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/twiecki/32/6930_2.png) [@twiecki](https://discourse.pymc.io/u/twiecki)\
**Post date:** [July 19, 2022, 2:19pm UTC](https://discourse.pymc.io/t/fixed-rolling-regression-window/9841/2 "2022-07-19T14:19:52Z")

</div>

As in, you don’t want to have to refit the model on the whole data each time? Sometimes this is called online learning.

Unfortunately that is rather difficult to do, usually SMC samplers are used for that.

Any reason why you can’t refit the entire model?
