economics, intertemporal problem



Hello,
I study economics and i want to solve the basic
intertemporal problem of savings.
It goes like this:

Maximization: sum(from t=0 to T) of beta^(t)*(-exp(c(t)))
where c(t) represent consumption in time t.

subject to: s(t+1)=(1+r)s(t)+w(t+1)-c(t+1)
from t=0,1...(T-1)

w(t)=1 for t<R and w(t)=0 for t=>R

What is the way to approach the problem:
I have done a simple optimization of T consumption
variables. It doesnt give very exact results. I have
checked that the Euler condition (first order condition)is
not accomplished in every moment.
For solving this problem i collapse the T restrictions to
only one.
Here is my program:

clear all;clc;i=1;
T=100
R=60
beta=0.9
r=0.2
% Collapsing Restriction
for i=1:T
betas(i)=beta^(i-1)
rs(i)=(1/(1+r))^(i-1);
if i<R
Ws(i)=1;
else
Ws(i)=0;
end
end
Aeq=[rs;zeros(T-1,T)];
beq=[rs*Ws';zeros(T-1,1)];

% Maximization
lb=zeros(T,1);
options = optimset
('LargeScale','off','DiffMaxChange',0.001,'DiffMinChange',1
0^(-15),'MaxFunEvals',10000,'MaxIter',10000);
[c,fval] = fmincon(@(c) -1*betas*(-exp(-c)),c0,[],
[],Aeq,beq,lb,[],[],options);
.



Relevant Pages

  • Re: Publish America Victim.
    ... The economy isn't measured by what isn't flowing through it. ... trade - which is simply fancy eco-speak for saving and borrowing. ... negative savings rate - you are borrowing from your future self. ... some forgone consumption in the future. ...
    (rec.arts.sf.written)
  • Re: economics, intertemporal problem
    ... I have done a simple optimization of T consumption ... I think you might have a much easier time solving this via ... numerical dynamic programming. ... % Collapsing Restriction ...
    (comp.soft-sys.matlab)
  • Re: New cash ISA allowance
    ... Because Gordy is a good old Keynesian, in his world savings and deferred ... consumption are bad for the economy and need to be penalised. ...
    (uk.finance)