# How to set date in historical decomposition dynare

**URL:** <https://forum.dynare.org/t/how-to-set-date-in-historical-decomposition-dynare/14334>\
**Category:** ML/Bayesian estimation\
**Created:** [16 August 2019 13:51 UTC](https://forum.dynare.org/t/how-to-set-date-in-historical-decomposition-dynare/14334 "2019-08-16T13:51:38Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![hovo](https://forum.dynare.org/letter_avatar_proxy/v4/letter/h/c67d28/32.png) [@hovo](https://forum.dynare.org/u/hovo)\
**Post date:** [16 August 2019 13:51 UTC](https://forum.dynare.org/t/how-to-set-date-in-historical-decomposition-dynare/14334/1 "2019-08-16T13:51:38Z")

</div>

I want to put quarterly dates starting in 200Q2 on horizontal axis of graphs of my shock decompositions?  
How could I do this?

ts = dseries(‘fsdat\_simul.m’);

data(series=ts, first\_obs=1950Q3, last\_obs=2000Q3);

disp(‘First date is $1950Q3’)

This doesn’t work

---

<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 August 2019 07:29 UTC](https://forum.dynare.org/t/how-to-set-date-in-historical-decomposition-dynare/14334/2 "2019-08-17T07:29:49Z")

</div>

Please provide the full codes.

---

<div class="post-metadata">

**Author:** ![hovo](https://forum.dynare.org/letter_avatar_proxy/v4/letter/h/c67d28/32.png) [@hovo](https://forum.dynare.org/u/hovo)\
**Post date:** [19 August 2019 05:33 UTC](https://forum.dynare.org/t/how-to-set-date-in-historical-decomposition-dynare/14334/3 "2019-08-19T05:33:14Z")

</div>

I’m sorry for my late reply.

[data.m](https://forum.dynare.org/uploads/short-url/c9PoWopDyOnCUHgMO5fmr5eVCmf.m) (1.0 KB)

[rbc\_level\_lag.mod](https://forum.dynare.org/uploads/short-url/gWJOMOhYkeVXtIV3Uo0NBhs84UY.mod) (3.6 KB)

---

<div class="post-metadata">

**Author:** ![hovo](https://forum.dynare.org/letter_avatar_proxy/v4/letter/h/c67d28/32.png) [@hovo](https://forum.dynare.org/u/hovo)\
**Post date:** [20 August 2019 13:37 UTC](https://forum.dynare.org/t/how-to-set-date-in-historical-decomposition-dynare/14334/4 "2019-08-20T13:37:25Z")

</div>

Dear @jpfeifer , I fixed the previous problem.  
But I want to do the same thing with smoothed shocks. Is it possible?

---

<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:** [22 August 2019 08:45 UTC](https://forum.dynare.org/t/how-to-set-date-in-historical-decomposition-dynare/14334/5 "2019-08-22T08:45:17Z")

</div>

I would recommend you simply construct the graph from the output in `oo_.SmoothedShocks`

---

<div class="post-metadata">

**Author:** ![kacou225](https://forum.dynare.org/letter_avatar_proxy/v4/letter/k/f14d63/32.png) [@kacou225](https://forum.dynare.org/u/kacou225)\
**Post date:** [19 June 2020 06:40 UTC](https://forum.dynare.org/t/how-to-set-date-in-historical-decomposition-dynare/14334/7 "2020-06-19T06:40:28Z")

</div>

can i know how you fix the problem related to the historical decomposition?

---

<div class="post-metadata">

**Author:** ![hovo](https://forum.dynare.org/letter_avatar_proxy/v4/letter/h/c67d28/32.png) [@hovo](https://forum.dynare.org/u/hovo)\
**Post date:** [19 June 2020 07:01 UTC](https://forum.dynare.org/t/how-to-set-date-in-historical-decomposition-dynare/14334/8 "2020-06-19T07:01:07Z")

</div>

go to C:\dynare\4.5.7\matlab, open plot\_shock\_decomposition.m, In line 82 replace

initial\_date = dates(‘1Y’) with for example initial\_date = dates(‘2004’); and keep your .mod file and

modified plot\_shock\_decomposition.m file in the same directory (folder)
