# Loop over certain antizipation horizons

**URL:** <https://forum.dynare.org/t/loop-over-certain-antizipation-horizons/5443>\
**Category:** Dynare help (legacy posts)\
**Created:** [14 April 2016 09:01 UTC](https://forum.dynare.org/t/loop-over-certain-antizipation-horizons/5443 "2016-04-14T09:01:17Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![anmeer](https://forum.dynare.org/letter_avatar_proxy/v4/letter/a/977dab/32.png) [@anmeer](https://forum.dynare.org/u/anmeer)\
**Post date:** [14 April 2016 09:01 UTC](https://forum.dynare.org/t/loop-over-certain-antizipation-horizons/5443/1 "2016-04-14T09:01:17Z")

</div>

Hello everyone,

I am working on a very basic NK model and currently want to examine the effects of anticipated cost shocks. Running loops over parameters isn’t the problem. But now I would like to know if there is any possibility to run a loop over different anticipation horizons (i.e. 1,2,3,4,8), to simplify programming. The code is attached.

I would appreciate any help and tips.  
[nkm1.txt](https://forum.dynare.org/uploads/default/original/2X/7/726fe79d789428ec937622f01c08fb12ac858b83.txt) (766 Bytes)

---

_[View the full topic](https://forum.dynare.org/t/loop-over-certain-antizipation-horizons/5443)._
