Day and night timing in Dynare

Hi everybody.
If we have a model in which every period is divided to two sub-periods, how can we write the code in Dynare? In other words, some markets {bonds and loans for instance} open and close in the firs sub-period and others open and close in the second.
Thank you very much.

I would use your sub-periods a the period for the Dynare *.mod file and use leads and lags of 1 and 2 periods to represent the refined dynamics that you have in mind

Thanks for your reply.
I think this is not the answer. Let me give an example.
The production function is y(t+1/2)=z(t+1/2)*n(t). Where n is labor input and t stands for day and t+1/2 stands for night. So if I write the production function as y(t+1)=z(t+1)*n(t), Dynare concludes that every period production depends on the previous labor input. But in reality we have production just in the second periods (night) not every period!
Maybe I am wrong, but I am a student. Would you please help me more? or give me a code with this timing?
Thanks

I see the problem now. It isn’t a standard problem and there is no standard answer or example. Have you the whole model written done using your period convention?

What exactly is the purpose of the two subperiods? Triggering different information sets for the choices? In that case, you may be able to use the EXPECTATION-operator. See e.g.

Thanks a lot. I think this is exactly what I was searching for. EXPECTATION operator explanation is also present in the Dynare manual for use!
Let me ask one more question to be confident about my understanding. In regular timing this is the labor supply equation: N^(sai)=(W/p)*c^(-sigma).
In the new timing convention, labor market opens and closes in the first sub-period (day), but goods market opens and closes in the second one (night). So, is it true to write the labor supply equation as follows?
(EXPECTATION(-1)(N))^(sai)=(EXPECTATION(-1)(W)/p)*c^(-sigma);
Because W (wage) and N (labor) are set in first subperiod (day) not in the second.
Best wishes to all, especially those who help others.

You need to be much more explicit. Presumably the labor supply determines the amount of labor used in production in the following sub-period.
When is the wage negotiated? Which price is used? Expected price set in next period? Price set in previous period? Same for consumption.
You need to conduct this reasoning for each equation of your model in a consistent manner

Thanks a lot. Really you are right. I tried to rewrite each of the equations in my model based on this guide. But I was confused with labor supply and labor demand equations. Would you please help me again? In addition, as I explained before, goods market takes place in the second sub-period and labor market in the first. But the hard part of the story is that, labor supply is in hand of consumers and is related to consumption via N^(sai)=(W/p)*c^(-sigma), and consumption itself is decided in the second sub-period.
I’m not sure about how good I explained it, but it seems to be inconsistent unless assuming production function as y(t+1)=z(t+1)*n(t).
Thanks

Again, what is the information structure here? Labor supply cannot depend on something that is chosen only at a later point in time. It could only depend on the expected consumption value.

Thanks for your patience.
Information structure is such that in period t, the firm chooses its labor input based on information in period t-1 and is not aware of tech. shock realization in period t. Then, tech. shock will be realized and output will change.
But I’m not sure about consumer information set that can be consistent with the model. First, if I consider it such that the consumer information set is complete and he/she knows about all the variables (including tech. shock) in time t, changing y because of tech. shock (z), makes changes in c because of market clearing condition and finally N (labor supply) , W , p changes due to N^(sai)=(W/p)*c^(-sigma). But it was assumed that N , W cannot change.
Second, if I consider it such that the consumer information set is like the firm and the consumer cannot see tech. shock in period t, any changes in y (due to tech. shock realization) cannot change c because FOCs of consumer will change any they are not optimal!

Sorry, but I don’t understand. Agents can easily form their labor choice using their best guess of what their consumption level may be after the shock realization. That’s also what the standard Euler equation does. Given their locked-in labor choice, they can still reoptimize the consumption level given the new information set. Nothing is “not optimal” in this case.

These are 4 equations of my model in time t and t+1/2 and Dynare equivalence code using EXPECTATION operator. Remember that tech. shock (z) will be realized in the second sub-period (t+1/2). Would you please help me if there is/are problem/s in it?
Thanks

From the above, one can’t see what information agents have in t+1/2 that they don’t have in t.
I’m not yet convinced that you need the distinction between t and t+1/2.

That is exactly information technology shock realization, labor supply and demand take place before realization of technology. After tech. realization, production takes place and so consumption and prices.
Thanks

It isn’t possible to tell you anything when seeing only 4 equations where the technology shock doesn’t appear.
In Dynare, the default information assumptions are:

  • the shocks are observed at the beginning of the period
  • agents know all the variables in t-1
  • agents know the probability distribution of variables in t+1 but not their exact value
    Could you please, for each equation in the model, list the departure from the above assumptions?