Dear all,

I would like to implement traditional Competitive Equilibrium SOE model and Ramsey Optimal SOE model. Then do some very simple macro volatility and welfare calculations.

Sketch of my codes:

They are all in one document.

`CESOE.m`

, `CESOE.mod`

`RamSOE.m`

, `RamSOE.mod`

, `FindSS.m`

, `FindSS2.m`

`figure_irfs_TFP.m`

`table_vol_welf.m`

perhaps will add `AllinOne.m`

(MainFile) to run them in one button.

Here is my question:

I set some basic setting and calibration in `CESOE.m`

, out-sourced from mod.

I run CESOE.m first. During execution, it will call CESOE.mod.

After running mod, it turns back, and save (still executed in CESOE.m)

`oo_CESOE = oo_`

this object will be used for graphing.

Next,

Just before running `RamSOE.m`

, I erase all the information

that executed during CESOE.m, except oo_CESOE

(such that variables and values in CESOE will not affect RamSOE)

After runing, I expect to retain something like

`oo_RamSOE = oo_`

As a result,

I hope the workspace in MATLAB will have both

`oo_CESOE`

and `oo_RamSOE`

How can I do that? or whatâ€™s the problem, if I cannot do that?

It seems that the second Dynare mod, RamSOE.mod, will be influenced by CESOE,

if I do not clear workspace. However if I clear, then oo_CESOE will loseâ€¦

Really frustrated!!