Ask Your Question
0

How to elegantly transform a model in a recursive equation

asked 2023-06-11 11:31:31 +0100

Cyrille gravatar image

updated 2023-06-11 15:30:42 +0100

I would like to know if there is an elegant way to develop a model as :

$$ \begin{array}{l} C_t=cY_{t-1}+C_0,\ I_t= I_0 + \gamma (C_t - C_{t-1}), \ Y_t=C_t+I_t \end{array} $$

to obtain a resursive equation in $Y_t$ which can be put in a natural format to be solved by rsolve(). I can do it in a brute force way. The problem is to cope with the time index.

My problem is the following

Y = Function('Y')
C = Function('C')
I = Function('I')
C(t)=c*Y(t-1)+C_0
I(t)= I_0 - γ* (C(t) - C(t-1))
Y(t)=C(t)-I(t)
A(t)=C(t)-C(t-1)
show(A(t))

Until there no problems. But I do not know you to substite the value of A(t) in I(t)

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2023-06-11 14:18:12 +0100

Max Alekseyev gravatar image

updated 2023-06-11 14:18:47 +0100

By a couple of substitutions: $$C_t = c(C_{t-1} + I_0 + \gamma(C_{t-1} - C_{t-2})) + C_0$$ $$=c(1+\gamma)C_{t-1} - c\gamma C_{t-2} + cI_0 + C_0,$$ which then translates into that for $Y$: $$Y_t = c(1+\gamma)Y_{t-1} - c\gamma Y_{t-2} + C_0+I_0.$$ Is this what you want?

edit flag offensive delete link more

Comments

Yes. My problem is to cope with the indexes from the begining .

Cyrille gravatar imageCyrille ( 2023-06-11 15:06:28 +0100 )edit

Max I do not understand this type of answer. I am perfectly able to write the solution on a paper. What I cannot do is to ask sagemath to do it for me.

Cyrille gravatar imageCyrille ( 2023-06-12 21:02:19 +0100 )edit

If you need to solve one particular equation, then there is nothing wrong in using some paper. If it's not a single equation, then formulate your general problem and we'll see how sagemath can step in.

Max Alekseyev gravatar imageMax Alekseyev ( 2023-06-13 16:24:11 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2023-06-11 11:31:31 +0100

Seen: 450 times

Last updated: Jun 11 '23