# A question about OSR command and policy frontier

**URL:** https://forum.dynare.org/t/a-question-about-osr-command-and-policy-frontier/5959
**Category:** Optimal Policy
**Created:** [2 January 2017 16:37 UTC](https://forum.dynare.org/t/a-question-about-osr-command-and-policy-frontier/5959 "2017-01-02T16:37:50Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![zhanshuo](https://forum.dynare.org/letter_avatar_proxy/v4/letter/z/bc79bd/32.png) [@zhanshuo](https://forum.dynare.org/u/zhanshuo)
#### Post date: [2 January 2017 16:37 UTC](https://forum.dynare.org/t/a-question-about-osr-command-and-policy-frontier/5959/1 "2017-01-02T16:37:50Z")

</div>

Dear all,  
I am now using OSR to calculate the simple optimal rule and plot the policy frontier.  
But I find that all the papers on the topic of policy frontier have given a limitation on variance of the key variable,e.g., in Iacoviello(2005), "I constrain interest rate volatility by imposing an upper bound 25 percent larger than the estimated standard deviation…"  
So how should I put a variance constraint in OSR?  
Thanks.

---

<div class="post-metadata">

### Author: ![zhanshuo](https://forum.dynare.org/letter_avatar_proxy/v4/letter/z/bc79bd/32.png) [@zhanshuo](https://forum.dynare.org/u/zhanshuo)
#### Post date: [7 January 2017 13:53 UTC](https://forum.dynare.org/t/a-question-about-osr-command-and-policy-frontier/5959/2 "2017-01-07T13:53:17Z")

</div>

Anyone knows that?  
Great thanks.

---

<div class="post-metadata">

### Author: ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)
#### Post date: [8 January 2017 19:08 UTC](https://forum.dynare.org/t/a-question-about-osr-command-and-policy-frontier/5959/3 "2017-01-08T19:08:21Z")

</div>

That is not easy to impose. Dynare allows you to impose bounds on the parameters, not on the endogenous objects. In the exampe posted at [[Policy frontier](http://forum.dynare.org/t/policy-frontier/5910/1)) you would probably need to check whether

```auto
var_y(grid_iter)
```

is above a particular value and then set the output to NaN.

---

<div class="post-metadata">

### Author: ![zhanshuo](https://forum.dynare.org/letter_avatar_proxy/v4/letter/z/bc79bd/32.png) [@zhanshuo](https://forum.dynare.org/u/zhanshuo)
#### Post date: [9 January 2017 07:34 UTC](https://forum.dynare.org/t/a-question-about-osr-command-and-policy-frontier/5959/4 "2017-01-09T07:34:57Z")

</div>

Thanks, I will try.  
And could you tell me how to impose constraint on the value of the parameters?

---

<div class="post-metadata">

### Author: ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)
#### Post date: [9 January 2017 09:22 UTC](https://forum.dynare.org/t/a-question-about-osr-command-and-policy-frontier/5959/5 "2017-01-09T09:22:51Z")

</div>

See the manual of the unstable version/4.5 on `osr_params_bounds`

---

<div class="post-metadata">

### Author: ![zhanshuo](https://forum.dynare.org/letter_avatar_proxy/v4/letter/z/bc79bd/32.png) [@zhanshuo](https://forum.dynare.org/u/zhanshuo)
#### Post date: [10 January 2017 06:43 UTC](https://forum.dynare.org/t/a-question-about-osr-command-and-policy-frontier/5959/6 "2017-01-10T06:43:03Z")

</div>

Thanks a lot!  
So is there a guide for how to setup dynare 4.5?  
and can it co-exist with 4.4.3?

---

<div class="post-metadata">

### Author: ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)
#### Post date: [10 January 2017 19:57 UTC](https://forum.dynare.org/t/a-question-about-osr-command-and-policy-frontier/5959/7 "2017-01-10T19:57:00Z")

</div>

The unstable version is available at [dynare.org/download/dynare-unstable/](http://www.dynare.org/download/dynare-unstable/)  
You can select the Dynare version you want to use by providing Matlab with the path to the Matlab subfolder of the respective Dynare version.

---

<div class="post-metadata">

### Author: ![zhanshuo](https://forum.dynare.org/letter_avatar_proxy/v4/letter/z/bc79bd/32.png) [@zhanshuo](https://forum.dynare.org/u/zhanshuo)
#### Post date: [15 January 2017 14:40 UTC](https://forum.dynare.org/t/a-question-about-osr-command-and-policy-frontier/5959/8 "2017-01-15T14:40:09Z")

</div>

Thanks a lot .  
So if I simultaneously add both 4.43 and 4.5 unstable into the matlab path, which version will matlab choose to run ?  
And how could I choose to run one of these two versions if I wanna to manually, if both of them are in my matlab path?

---

<div class="post-metadata">

### Author: ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)
#### Post date: [17 January 2017 10:53 UTC](https://forum.dynare.org/t/a-question-about-osr-command-and-policy-frontier/5959/9 "2017-01-17T10:53:31Z")

</div>

Always only add the one you want to your path. For example, when you use 4.4.3, use something like

```auto
addpath('C:\dynare\4.4.3\matlab')
```

in Matlab to select 4.4.3 (of course with your path)
