有关现值汉密尔顿函数的注解
Part 3. The Essentials of Dynamic OptimisationIn macroeconomics the majority of problems involve optimisation over time. Typically a representative agent chooses optimal magnitudes of choice variables from an initial time until infinitely far into the future. There are a number of methods to solve these problems. In discrete time the problem can often be solved using a Lagrangean function. However in other cases it becomes necessary to use the more sophisticated techniques ofOptimal Control Theory or Dynamic Programming. This handout provides an introduction to optimal control theory.Special Aspects of Optimisation over Time? Stock - Flow variable relationship.All dynamic problems have a stock-flow structure. Mathematically the flow variables are referred to as control variables and the stock variables as state variables. Not surprisingly the control variables are used to affect (or steer) the state variables. For example in any one period the amount of investment and the amount of money growth are flow variables that affect the stock of output and the level of prices which are state variables.? The objective function is additively seperable. This assumption makes the problem analytically tractable. In essenceit allows us to separatethe dynamic problem into a sequence of separate (in the objective function) one period optimisation problems. Don't be confused, the optimisation problems are not separate because of the stock-flow relationships, but the elements of the objective function are. To be more precise the objective function is expressed as a sum of functions (i.e. integral or sigma form) each of which depends only on the variables in that period. For example utility in a given period is independent of utility in the previous period.1. Lagrangean TechniqueWe can apply the Lagrangean technique in the usual way.Notationyt = State variable(s)t Control variable(s)The control and state variables are related according to some dynamic equation,yt 1 yt f yt, t,t(1)Choosing t allows us to alter the change in yt . If the above is a production function we choose t investment to alter yt 1yt the change in output over the period.Why does time enter on its own? This would represent the trend growth rate of output.We might also have constraints that apply in each single period such as,G yt, t,t 0(2)The objective function in discrete time is of the form,f yt, t,t t 0The first order conditions with respect to yt are,1. Optimal Control TheorySuppose that our objective is maximise the discounted utility from the use of an exhaustible resource over a given time interval. In order to optimise we would have to choose the optimal rate of extraction. That is we would solve the following problem,TMax U S E e tdtE0subject to,dS dtS S(0)S T freeWhere S t denotes the stock of a raw material and E t the rate of extraction. By choosing the optimal rate of extraction we can choose the optimal stock of oil at each period of time and so maximise utility. The rate of extraction is called the control variable and the stock of the raw material the state variable. By finding the optimal path for the control variable we can find the optimal path for the state variable. This is how optimal control theory works.The relationship between the stock and the extraction rate is defined by a differential equation (otherwise it would not be a dynamic problem). This differential equation is called the equation of motion . The last two are conditions are boundary conditions. The first tells us the current stock, the last tells us we are free to choose the stock at the end of the period. If utility is always increased by using the raw material this must be zero. Notice that the time period is fixed. This is called a fixed terminal time problem.The Maximum PrincipleIn general our prototype problem is to solve,MaxV uytF t, y, u dtt, y, uTo find the first order conditions that define the extreme values we apply a set of condition known as the maximum principle.Step 1. Form the Hamiltonian function defined as,H t, y, u, F t, y, u t f t, y, uStep 2. Find,Max H (t, y, u,) uOr if as is usual you are looking for aninterior solution, apply the weaker condition,H(t,y, ,u) 0 uAlong with,Ht,y,u?yHt,y,u?yT 0Step 3. Analyse these conditions.Heuristic Proof of the Maximum PrincipleIn this section we can derive the maximum principle , a set of first order conditions that characterise extreme values of the problem under consideration.The basic problem is defined by,T MaxV F t, y, u dt u0f t,y,u ty 0 y0To derive the maximum principle we use attempt to solve the problem using the 'Calculus of Variations'. Essentially the approach is as follows. The dynamic problem is to find the optimal time path for y t , although that we can use u t to steer y t . It ought to be obvious that,W川 not do. This simply finds the best choice in any one period without regard to any future periods. Think of the trade off between consumption and saving. We need to choose the paths of the control (state) variable that gives us the highest value of the integral subject to the constraints. So we need to optimise in every time period, given the linkages across periods and the constraints. The Calculus of Variations is a way to transform this into a static optimisation problem.To do this let u t denote the optimal path of the control variable and consider each possible path asvariations about the optimal path.u t u t Pt(3)In this case is a small number (the maths sense) andP t is a perturbing curve. It simply means all paths can be written as variations about the optimal path. Since we can write the control path this way we can also (must) write the path of the state variable and boundary points in the same way.yt yt qt(4)T T TyTyTyT(6)The trick is that all of the possible choice variables that define the integral path are now functions of . As varies we can vary the whole path including the endpoints so this trick essentially allows us to solve the dynamic problem as a function of as a static problem. That is to find the optimum (extreme value) path we choose the value of that satisfies,V一0given to (6).Since every variable has been written as a function of , is the only necessary condition for an optimum that we need. When this condition is applied it yields the various conditions that are referred to as thmaximum principle.In order to show this we first rewrite the problem in a way that allows us to include the Hamiltonian function,MaxVuTF t, y,u 0t f t, y,u y dtWe can do this becausethe term inside the brackets is always zero provided the equation of motion is satisfied. Alternatively as,T?MaxV H t, y, u t ydt u0Integrating (by parts)1 the second term in the integral we obtain,(2)T?MaxV H t, y,u t y t dt 0 y0T yTu0Now we apply the necessary condition (7) given (3) to (6).Recall that to differentiate an Integral by a Parameter we use Leibniz's rule, (page 9). After simplification this yields,tT T T yT 0Hq t p t dt H t, y, u, uThe 3 components of this integral provide the conditions defining the optimum. In particular,Hp t dt 0 urequires that,andWhich is a key part of the maximum principle.The Transversality ConditionT1 Just let?.T ?ydty0 ydtTo derive the transversality condition we have to analyse the two terms,H t,y,u, t T T T yT 0For out prototype problem (fixed terminal time) we must have T 0. Therefore the transversality condition is simply that,The first two conditions always apply for 'interior' solutions but the transversality condition has to be defined by the problem at hand. For more on this see Chiang pages 181-184.The Current Value HamiltonianIt is very common in economics to encounter problems in which the objective function includes the following function e t . It is usually easier to solve these problems using the current value Hamiltonian. For example an optimal consumption problem may have an objective function looking something like,U Ct e tdt 0Where representsthe rate of time discount. In general the Hamiltonian for such problems will be of the form,H t,y,u, F t, y,u e t t f t, y,uThe current value Hamiltonian is defined by,Hcv F t, y,u m t f t, y, u(1)Where m t t e t. The advantage of the current value Hamiltonian is that the system defined by the first order equations is usually easier to solve. In addition to (1) an alternative is to write,Hcv F t,y,u e t m t f t,y,u e t(2)The Maximum ConditionsWith regard to (2) the first two conditions are unchanged. That is,H HcvH H版and - (3)The third condition is also essentially the same since,However it is usual to write this in terms of m . Since,me tme tWe can write the third condition as,H cvThe endpoint can similarly be stated in terms of m since m e t the T 0 means that,mT T e T 0Or, m T e T 0conditionRamsey model of optimal savingIn the macroeconomics class you have the following problem,Choose consumption to maximise, U B e tu ct dt t 0Where1 g subject to the following constraint,? k t f k t c t g k tIn this example u c t , y k t . The Hamiltonian is,H Be tu C t t f k t c t n gThe basic conditions give us,H tBe u c t t 0c tPlus,Hklt f k t ng t(2)k t f k t c t g k tNow we must solve these. Differentiate the right-hand side of (1) with respect to time. This gives you t which can then be eliminated from (2). The combined condition can then be rewritten as,This is the Euler equation. If you assume the instantaneous utility function is CRRA as in class and you calculate the derivatives you should get the same expression.