Hi everyone

I would like to enter a finite sum in a dynare .mod file, but I don’t now the syntax. I’ve enclosed the formula I want to use. Can anyone help me?

Thanks in advance

Ewoud

Formule eindige som.pdf (287 KB)

Hi everyone

I would like to enter a finite sum in a dynare .mod file, but I don’t now the syntax. I’ve enclosed the formula I want to use. Can anyone help me?

Thanks in advance

Ewoud

Formule eindige som.pdf (287 KB)

Hi,

u can use the dynare macro language for that, try the following syntax

```
//at the beginning of the mod-file
@# define k = 1
@# define K = NumberofLags
//inside the block model
...=1/H*(
@#for k in 1: K
+ omega_@{k}*(p(@{-k})-px(@{-k}))^2
@#endfor
)
;
```

Hope this helps,

Best

Thank you!

The model works now, but only partially because not all variables have the expected values.

For instance “etax” en “etaf” take on the value zero for all time periods, while they should alway sum up to one. Can someone help me with this? Any suggestions?

With Regards

heuristics.mod (1.02 KB)