You are on page 1of 22

9/8/13

CES Demand Functions: Hints and Formulae

Constant Elasticity of Substitution Functions: Some Hints and Useful Formulae


Notes prepared for GAMS General Equilibrium Workshop held December, 1995 in Boulder Colorado Thomas F. Rutherford University of Colorado

Contents
The Basics The Calibrated Share Form Excercises Flexibility and Non-Separable CES functions Two NNCES calibrations for a 3-input cost functions A Comparison of Locally-Identical Functions Numerical calibration of NNCES given KLEM elasticities Calibrating Labor Supply and Savings Demand A Maquette Illustrating Labor Supply & Savings Demand Calibration Return to the MPSGE home page The Basics In many economic textbooks the constant elasticity of substitution (CES) utility function is defined as:

It is a fairly routine but tedious calculus excercise to demonstrate that the associated demand functions are:

and .

The corresponding indirect utility function has is:

www.gams.com/solvers/mpsge/cesfun.htm

1/22

9/8/13

CES Demand Functions: Hints and Formulae

Note that U(x,y) is linearly homogeneous:

This is a convenient cardinalization of utility, because percentage changes in U are equivalent to percentage Hicksian equivalent variations in income. Because U is linearly homogeneous, V is homogeneous of degree one in M and degree -1 in p. In the representation of technology, we have an analogous set of relationships, based on the cost and compensated demand functions. If we have a CES production function of the form: , the unit cost function then has the form: , and associated demand functions are: , and . In most large-scale applied general equilibrium models, we have many function parameters to specify with relative ly few observations. The conventional approach is to calibrate functional parameters to a single benchmark equilibrium. For example, if we have benchmark estimates for output, labor, capital inputs and factor prices , we calibrate function coefficients by inverting the factor demand functions:

and . The Calibrated Share Form Calibration formulae for CES functions are messy and difficult to remember. Consequently, the specification of
www.gams.com/solvers/mpsge/cesfun.htm 2/22

9/8/13

CES Demand Functions: Hints and Formulae

function coefficients is complicated and error-prone. For applied work using calibrated functions, it is much easier to use the "calibrated share form" of the CES function. In the calibrated form, the cost and demand functions explicitly incorporate benchmark factor demands benchmark factor prices the elasticity of substitution benchmark cost benchmark output benchmark value shares In this form, the production function is written:

The only calibrated parameter, , represents the value share of capital at the benchmark point. The corresponding cost functions in the calibrated form is written:

where

and the compensated demand functions are:

and . Normalizing the benchmark utility index to unity, the utility function in calibrated share form is written:

Defining the unit expenditure function as:

the indirect utility function is:


www.gams.com/solvers/mpsge/cesfun.htm 3/22

9/8/13

CES Demand Functions: Hints and Formulae

and the demand functions are:

and

The calibrated form extends directly to the n-factor case. An n-factor production function is written:

and has unit cost function:

and compensated factor demands:

Excercises: (i) Show that given a generic CES utility function:

can be represented in share form using:

for any value of t > 0. (ii) Consider the utility function defined:

www.gams.com/solvers/mpsge/cesfun.htm

4/22

9/8/13

CES Demand Functions: Hints and Formulae

A benchmark demand point with both prices equal and demand for y equal to twice the demand for x . Find values for which are consistent with optimal choice at the benchmark. Select these parameters so that the income elasticity of demand for x at the benchmark point equals 1.1. (iii) Consider the utility function:

which is maximized subject to the budget constraint:

in which M is interpreted as non-wage income, w is the market wage rate. Assume a benchmark equilibrium in which prices for x and L are equal, demands for x and L are equal, and non-wage income equals one-half of expenditure on x . Find values of and consistent with these choices and for which the price elasticity of labor supply equals 0.2. (iv) Consider a consumer with CES preferences over two goods. A price change makes the benchmark consumption bundle unaffordable, yet the consumer is indifferent. Graph the choice. Find an equation which determines the elasticity of substitution as a function of the benchmark value shares. (You can write down the equation, but it cannot be solved in closed form.) (v) Consider a model with three commodities, x , y and z. Preferences are CES. Benchmark demands and prices are equal for all goods. Find demands for x , y and z for a doubling in the price of x as a function of the elasticity of substitution. (iv) Consider the same model in the immediately preceeding question, except assume that preferences are instead given by:

Determine

from the benchmark, and find demands for x , y and z if the price of x doubles.

Flexibility and Non-Separable CES functions We let denote the user price of the ith input, and let and be the cost-minizing demand for the ith input.

The reference price and quantities are

. One can think of set i as {K,L,E,M} but the methods we

employ may be applied to any number of inputs. Define the reference cost, and reference value share for ith input by and , where

and
www.gams.com/solvers/mpsge/cesfun.htm 5/22

9/8/13

CES Demand Functions: Hints and Formulae

. The single-level constant elasticity of substitution cost function in "calibrated share form" is written:

Compensated demands may be obtained from Shephard's lemma:

Cross-price Allen-Uzawa elasticities of substitution (AUES) are defined as:

where

For single-level CES functions: . The CES cost function exibits homogeneity of degree one, hence Euler's condition applies to the second derivatives of the cost function (the Slutsky matrix):

or, equivalently:

The Euler condition provides a simple formula for the diagonal AUES values:

As an aside, note that convexity of the cost function implies that all minors of order 1 are negative, i.e.
www.gams.com/solvers/mpsge/cesfun.htm 6/22

9/8/13

CES Demand Functions: Hints and Formulae

. Hence, there must be at least one positive off-diagonal element in each row of the AUES or Slutsky matrices. When there are only two factors, then the off-diagonals must be negative. When there are three factors, then only one pair of negative goods may be complements. Let: k

be the reference the index of second-level nest denote the fraction of good i inputs assigned to the k th nest denote the benchmark value share of total cost which enters through the k th nest denote the top-level elasticity of substitution denote the elasticity of substitution in the k th aggregate denote the price index associated with aggregate k , normalized to equal unity in the benchmark, i.e.:

The two-level nested, nonseparable constant-elasticity-of-substitution (NNCES) cost function is then defined as: .

Demand indices for second-level aggregates are needed to express demand functions in a compact form. Let denote the demand index for aggregate k , normalized to unity in the benchmark; i.e.

Compensated demand functions are obtained by differentiating each nest in which the commodity enters, so:

. In this derivative, one term arise for

Simple differentiation shows that benchmark cross-elasticities of substitution have the form:

Given the benchmark value shares


www.gams.com/solvers/mpsge/cesfun.htm

and the benchmark cross-price elasticities of substitution,

, we can
7/22

9/8/13

CES Demand Functions: Hints and Formulae

solve for values of

and

. We compute these parameters using a constrained nonlinear

programming algorithm, CONOPT, which is available through GAMS, the same programming environment in which the equilibrium model is specified. Perroni and Rutherford (EER, 1994) prove that calibration of the NNCES form is possible for arbitrary dimensions whenever the given Slutsky matrix is negative semi-definite. The two-level (NxN) function is flexible for three inputs; and although we have not proven that it is flexible for 4 inputs, the only difficulties we have encountered have resulted from indefinite calibration data points. Two GAMS programs are listed below. The first illustrates two analytic calibrations of the three-factor cost function. The second illustrates the use of numerical methods to calibrate a four-factor cost function.

$TITLE Two nonseparable CES calibrations for a 3-input cost function.

*= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = * M o d e l s p e c i f i cd a t ad e f i n e dh e r e : S E T I P r o d u c t i o ni n p u ta g g r e g a t e s/A , B , C/ ; A L I A S( I , J ) ;

P A R A M E T E R T H E T A ( I ) A U E S ( I , J ) B e n c h m a r kv a l u es h a r e s/ A0 . 2 ,B0 . 5 ,C0 . 3 /

B e n c h m a r kc r o s s e l a s t i c i t i e s( o f f d i a g o n a l s )/ A . B 2 A . C 0 . 0 5 B . C 0 . 5/ ; *= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

* *

U s ea na n a l y t i cc a l i b r a t i o no ft h et h r e e f a c t o rC E Sc o s t f u n c t i o n :

A B O R T $ ( C A R D ( I )N E3 )" E r r o r :n o tat h r e e f a c t o rm o d e l ! " ; * F i l li no f f d i a g o n a l s :

A U E S ( I , J ) $ A U E S ( J , I ) = A U E S ( J , I ) ; * V e r i f yt h a tt h ec r o s se l a s t i c i t i e sa r es y m m e t r i c :

A B O R T $ S U M ( ( I , J ) ,A B S ( A U E S ( I , J ) A U E S ( J , I ) ) )"A U E Sv a l u e sn o n s y m m e t r i c ? " ; * C h e c kt h a ta l lv a l u es h a r e sa r ep o s i t i v e :

A B O R T $ ( S M I N ( I ,T H E T A ( I ) )L E0 )"Z e r ov a l u es h a r e sa r en o tv a l i d : " , T H E T A ; * F i l li nt h ee l a s t i c i t ym a t r i c e s :

A U E S ( I , I )=0 ;A U E S ( I , I )=S U M ( J ,A U E S ( I , J ) * T H E T A ( J ) ) / T H E T A ( I ) ;D I S P L A YA U E S ; S E T N K ( N ) P o t e n t i a ln e s t i n g/ N 1 * N 3 / N e s t i n ga g g r e g a t e su s e di nt h em o d e l
8/22

www.gams.com/solvers/mpsge/cesfun.htm

9/8/13

CES Demand Functions: Hints and Formulae

I 1 ( I ) I 2 ( I ) I 3 ( I )

G o o df u l l ya s s i g n e dt of i r s tn e s t G o o df u l l ya s s i g n e dt os e c o n dn e s t G o o ds p l i tb e t w e e nn e s t s ;

S C A L A R A S S I G N E D/ 0 / ; P A R A M E T E R E S U B ( * , * ) S H R ( * , I , N ) S I G M A ( N ) S ( I , N ) G A M M A *

A l t e r n a t i v ec a l i b r a t e de l a s t i c i t i e s A l t e r n a t i v ec a l i b r a t e ds h a r e s S e c o n dl e v e le l a s t i c i t i e s N e s t i n ga s s i g n m e n t s( i nm o d e l ) T o pl e v e le l a s t i c i t y( i nm o d e l ) ;

F i r s tt h eL e o n t i e fs t r u c t u r e :

E S U B ( " L T F " , " G A M M A " )=S M A X ( ( I , J ) ,A U E S ( I , J ) ) ; E S U B ( " L T F " , N )=0 ; L O O P ( ( I , J ) $ ( ( A U E S ( I , J )E QE S U B ( " L T F " , " G A M M A " ) ) * ( N O TA S S I G N E D ) ) , I 1 ( I )=Y E S ; I 2 ( J )=Y E S ; A S S I G N E D=1 ; ) ; I 3 ( I )=Y E S $ ( ( N O TI 1 ( I ) ) * ( N O TI 2 ( I ) ) ) ; D I S P L A YI 1 , I 2 , I 3 ; L O O P ( ( I 1 , I 2 , I 3 ) , S H R ( " L T F " , I 1 , " N 1 " )=1 ; S H R ( " L T F " , I 2 , " N 2 " )=1 ; S H R ( " L T F " , I 3 , " N 1 " )=T H E T A ( I 1 ) * ( 1 A U E S ( I 1 , I 3 ) / A U E S ( I 1 , I 2 ) )/ (1-T H E T A ( I 3 )*( 1 A U E S ( I 1 , I 3 ) / A U E S ( I 1 , I 2 ) )) ; S H R ( " L T F " , I 3 , " N 2 " )=T H E T A ( I 2 ) * ( 1 A U E S ( I 2 , I 3 ) / A U E S ( I 1 , I 2 ) )/ (1-T H E T A ( I 3 )*( 1 A U E S ( I 2 , I 3 ) / A U E S ( I 1 , I 2 ) )) ; S H R ( " L T F " , I 3 , " N 3 " )=1-S H R ( " L T F " , I 3 , " N 1 " )-S H R ( " L T F " , I 3 , " N 2 " ) ; ) ; A B O R T $ ( S M I N ( ( I , N ) ,S H R ( " L T F " , I , N ) )L T0 )" B e n c h m a r kA U E Si si n d e f i n i t e . " ; * N o w ,t h eC E Sf u n c t i o n :

E S U B ( " C E S " , " G A M M A " )=S M A X ( ( I , J ) ,A U E S ( I , J ) ) ; E S U B ( " C E S " , " N 1 " )=0 ; L O O P ( ( I 1 , I 2 , I 3 ) , S H R ( " C E S " , I 1 , " N 1 " )=1 ; S H R ( " C E S " , I 2 , " N 2 " )=1 ; E S U B ( " C E S " , " N 2 " )=( A U E S ( I 1 , I 2 ) * A U E S ( I 1 , I 3 ) A U E S ( I 2 , I 3 ) * A U E S ( I 1 , I 1 ) )/ ( A U E S ( I 1 , I 3 ) A U E S ( I 1 , I 1 ) ) ; S H R ( " C E S " , I 3 , " N 1 " )= ( A U E S ( I 1 , I 2 ) A U E S ( I 1 , I 3 ) )/( A U E S ( I 1 , I 2 ) A U E S ( I 1 , I 1 ) ) ; S H R ( " C E S " , I 3 , " N 2 " )=1-S H R ( " C E S " , I 3 , " N 1 " ) ; ) ; A B O R T $ ( S M I N ( N ,E S U B ( " C E S " , N ) )L T0 ) " B e n c h m a r kA U E Si si n d e f i n i t e ? " ; A B O R T $ ( S M I N ( ( I , N ) ,S H R ( " C E S " , I , N ) )L T0 )" B e n c h m a r kA U E Si si n d e f i n i t e ? " ;

P A R A M E T E R

P R I C E ( I ) P R I C EI N D I C E SU S I N GT OV E R I F YC A L I B R A T I O N A U E S C H K ( * , I , J ) C H E C KO FB E N C H M A R KA U E SV A L U E S ;

P R I C E ( I )=1 ;
www.gams.com/solvers/mpsge/cesfun.htm 9/22

9/8/13

CES Demand Functions: Hints and Formulae

$ o n t e x t $ M O D E L : C H K C A L I B $ S E C T O R S : Y D ( I ) $ C O M M O D I T I E S : P Y P ( I ) P F X $ C O N S U M E R S : R A $ P R O D : Y s : G A M M A K . T L : S I G M A ( K ) O : P Y Q : 1 I : P ( I ) # ( K ) Q : ( T H E T A ( I ) * S ( I , K ) ) $ P R O D : D ( I ) O : P ( I ) Q : T H E T A ( I ) I : P F X Q : ( T H E T A ( I ) * P R I C E ( I ) ) $ D E M A N D : R A D : P F X E : P F X Q : 2 E : P Y Q : 1 $ O F F T E X T $ S Y S I N C L U D Em p s g e s e tC H K C A L I B S C A L A RD E L T A/ 1 . E 5 / ; S E T F U N C T I O N/ L T F ,C E S / ;

!P R O D U C T I O NF U N C T I O N

!P R O D U C T I O NF U N C T I O NO U T P U T !F A C T O R SO FP R O D U C T I O N !A G G R E G A T EP R I C EL E V E L

K . T L :

A L I A S( I , I I ) ; L O O P ( F U N C T I O N , K ( N )=Y E S $ S U M ( I ,S H R ( F U N C T I O N , I , N ) ) ; G A M M A=E S U B ( F U N C T I O N , " G A M M A " ) ; S I G M A ( K )=E S U B ( F U N C T I O N , K ) ; S ( I , K )=S H R ( F U N C T I O N , I , K ) ; L O O P ( I I , P R I C E ( J )=1 ;P R I C E ( I I )=1+D E L T A ; $ I N C L U D EC H K C A L I B . G E N S O L V EC H K C A L I BU S I N GM C P ; A U E S C H K ( F U N C T I O N , J , I I )=( D . L ( J ) 1 )/( D E L T A * T H E T A ( I I ) ) ; ) ) ; A U E S C H K ( F U N C T I O N , I , J )=A U E S C H K ( F U N C T I O N , I , J )-A U E S ( I , J ) ;
www.gams.com/solvers/mpsge/cesfun.htm 10/22

9/8/13

CES Demand Functions: Hints and Formulae

D I S P L A YA U E S C H K ; * E v a l u a t et h ed e m a n df u n c t i o n s :

$ L I B I N C L U D Eq a d p l o t S E TP RA l t e r n a t i v ep r i c el e v e l s/ P R 0 * P R 1 0 / ; P A R A M E T E R D E M A N D ( F U N C T I O N , I , P R ) D P L O T ( P R , F U N C T I O N )

D e m a n df u n c t i o n s P l o t t i n go u t p u ta r r a y ;

L O O P ( I I , L O O P ( F U N C T I O N , K ( N )=Y E S $ S U M ( I ,S H R ( F U N C T I O N , I , N ) ) ; G A M M A=E S U B ( F U N C T I O N , " G A M M A " ) ; S I G M A ( K )=E S U B ( F U N C T I O N , K ) ; S ( I , K )=S H R ( F U N C T I O N , I , K ) ; L O O P ( P R , P R I C E ( J )=1 ; P R I C E ( I I )=0 . 2*O R D ( P R ) ; $ I N C L U D EC H K C A L I B . G E N S O L V EC H K C A L I BU S I N GM C P ; D E M A N D ( F U N C T I O N , I I , P R )=D . L ( I I ) ; D P L O T ( P R , F U N C T I O N )=D . L ( I I ) ; ) ; ) ; $ L I B I N C L U D Eq a d p l o tD P L O TP RF U N C T I O N ) ; D I S P L A YD E M A N D ;

A Comparison of Locally-Identical Functions Figure 1: Demand Function Comparison -- Good A

www.gams.com/solvers/mpsge/cesfun.htm

11/22

9/8/13

CES Demand Functions: Hints and Formulae

Figure 2: Demand Function Comparison -- Good B

Figure 3: Demand Function Comparison -- Good C

$TITLE Numerical calibration of NNCES given KLEM elasticities

S E T I P r o d u c t i o ni n p u ta g g r e g a t e s/K ,L ,E ,M / ; A L I A S( I , J ) ; *= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = * M o d e l s p e c i f i cd a t ad e f i n e dh e r e : P A R A M E T E R T H E T A ( I )

B e n c h m a r kv a l u es h a r e s/ K0 . 2 ,L0 . 4 ,E0 . 0 5 ,M0 . 3 5 /


12/22

www.gams.com/solvers/mpsge/cesfun.htm

9/8/13

CES Demand Functions: Hints and Formulae

B e n c h m a r kc r o s s e l a s t i c i t i e s( o f f d i a g o n a l s )/ K . L 1 K . E 0 . 1 K . M 0 L . E 0 . 3 L . M 0 E . M 0 . 1/ ; *= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = S C A L A RE P S I L O N * M i n i m u mv a l u es h a r et o l e r a n c e/ 0 . 0 0 1 / ;

A U E S ( I , J )

F i l li no f f d i a g o n a l s :

A U E S ( I , J ) $ A U E S ( J , I ) = A U E S ( J , I ) ; * V e r i f yt h a tt h ec r o s se l a s t i c i t i e sa r es y m m e t r i c :

A B O R T $ S U M ( ( I , J ) ,A B S ( A U E S ( I , J ) A U E S ( J , I ) ) )"A U E Sv a l u e sn o n s y m m e t r i c ? " ; * C h e c kt h a ta l lv a l u es h a r e sa r ep o s i t i v e :

A B O R T $ ( S M I N ( I ,T H E T A ( I ) )L E0 )"Z e r ov a l u es h a r e sa r en o tv a l i d : " , T H E T A ; * F i l li nt h ee l a s t i c i t ym a t r i c e s :

A U E S ( I , I )=0 ;A U E S ( I , I )=S U M ( J ,A U E S ( I , J ) * T H E T A ( J ) ) / T H E T A ( I ) ;D I S P L A YA U E S ; *= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = * S E T D e f i n ev a r i a b l e sa n de q u a t i o n sf o rN N C E Sc a l i b r a t i o n : N K ( N ) N e s t sw i t h i nt h et w o l e v e lN N C E Sf u n c t i o n/ N 1 * N 4 / , N e s t sw h i c ha r ei nu s e ;

V A R I A B L E S S ( I , N ) S H A R E ( N ) S I G M A ( N ) G A M M A O B J

F r a c t i o no fg o o dIw h i c he n t e r st h r o u g hn e s tN , V a l u es h a r eo fn e s tN , E l a s t i c i t yo fs u b s t i t u t i o nw i t h i nn e s tN , E l a s t i c i t yo fs u b s t i t u t i o na tt h et o pl e v e l , O b j e c t i v ef u n c t i o n ;

P O S I T I V EV A R I A B L E SS ,S H A R E ,S I G M A ,G A M M A ; E Q U A T I O N S S D E F ( I ) T D E F ( N ) E L A S T ( I , J ) O B J D E F

N e s ts h a r e sm u s ts u mt oo n e , N e s ts h a r ei nt o t a lc o s t , C o n s i s t e n c yw i t hg i v e nA U E Sv a l u e s , M a x i m i z ec o n c e n t r a t i o n ;

E L A S T ( I , J ) $ ( O R D ( I )G TO R D ( J ) ) . . A U E S ( I , J )= E = G A M M A+

S U M ( K ,( S I G M A ( K ) G A M M A ) * S ( I , K ) * S ( J , K ) / S H A R E ( K ) ) ; T D E F ( K ) . . S H A R E ( K )= E =S U M ( I ,T H E T A ( I )*S ( I , K ) ) ;
13/22

www.gams.com/solvers/mpsge/cesfun.htm

9/8/13

CES Demand Functions: Hints and Formulae

S D E F ( I ) . . * *

S U M ( N ,S ( I , N ) )= E =1 ;

M a x i m i z ec o n c e n t r a t i o na tt h es a m et i m ek e e p i n gt h ee l a s t i c i t i e s t ob er e a s o n a b l e : O B J= E =S U M ( ( I , K ) , S ( I , K ) * S ( I , K ) ) -S Q R ( G A M M A )-S U M ( K ,S Q R ( S I G M A ( K ) ) ) ;

O B J D E F . .

M O D E L

C E S C A L I B/ E L A S T ,T D E F ,S D E F ,O B J D E F / ;

A p p l ys o m eb o u n d st oa v o i dd i v i d eb yz e r o :

S H A R E . L O ( N )=E P S I L O N ; S C A L A R S O L V E D F l a gf o rh a v i n gs o l v e dt h ec a l i b r a t i o np r o b l e m/ 0 / M I N S H R M i n i m u ms h a r ei nc a n d i d a t ec a l i b r a t i o n ; S E T * * * T R I E S C o u n t e ro nt h en u m b e ro fa t t e m p t e dc a l i b r a t i o n s/ T 1 * T 1 0 / ;

W eu s et h er a n d o mn u m b e rg e n e r a t o rt os e l e c ts t a r t i n gp o i n t s , s oi ti sh e l p f u lt oi n i t i a l i z et h es e e ds ot h a tt h er e s u l t s w i l lb er e p r o d u c i b l e :

O P T I O NS E E D = 0 ; L O O P ( T R I E S $ ( N O TS O L V E D ) , * I n i t i a l i z et h es e to fa c t i v en e s t sa n dt h eb o u n d s : K ( N )=Y E S ; S . L O ( I , N )=0 ; S . U P ( I , N )=1 ; S H A R E . L O ( N )=E P S I L O N ; S H A R E . U P ( N )=1 ; S I G M A . L O ( N )=0 ; S I G M A . U P ( N )=+ I N F ; * I n s t a l las t a r t i n gp o i n t : S H A R E . L ( K ) S . L ( I , K ) G A M M A . L S I G M A . L ( K ) * =M A X ( U N I F O R M ( 0 , 1 ) ,E P S I L O N ) ; =U N I F O R M ( 0 , 1 ) ; =U N I F O R M ( 0 , 1 ) ; =U N I F O R M ( 0 , 1 ) ;

D r o pa n yb a s i si n f o r m a t i o ns ot h a tw es t a r tf r o ms c r a t c h : S D E F . M ( I ) =0 ;T D E F . M ( K ) =0 ;E L A S T . M ( I , J ) =0 ;

S O L V EC E S C A L I BU S I N GN L PM A X I M I Z I N GO B J ; S O L V E D=1 $ ( C E S C A L I B . M O D E L S T A TL E2 ) ; * W eh a v eas o l u t i o n-n o ws e ei fi ti sn o to nab o u n d : I F( S O L V E D , M I N S H R=S M I N ( K ,S H A R E . L ( K ) )-E P S I L O N ;


www.gams.com/solvers/mpsge/cesfun.htm 14/22

9/8/13

CES Demand Functions: Hints and Formulae

I F( M I N S H RE Q0 , * * D r o pn e s t sw h i c hh a v es h a r e se q u a lt oE P S I L O Ni nt h ec u r r e n t s o l u t i o n : K ( N ) $ ( S H A R E . L ( N )E QE P S I L O N )=N O ; S . F X ( I , N ) $ ( N O TK ( N ) )=0 ; S H A R E . F X ( N ) $ ( N O TK ( N ) )=0 ; S I G M A . F X ( N ) $ ( N O TK ( N ) )=0 ; D I S P L A Y" R e c a l i b r a t i n gw i t ht h ef o l l o w i n gn e s t s : " , K ; S O L V EC E S C A L I BU S I N GN L PM A X I M I Z I N GO B J ; I F( C E S C A L I B . M O D E L S T A TG T2 ,S O L V E D=0 ; ) ; M I N S H R=S M I N ( K ,S H A R E . L ( K ) )-E P S I L O N ; I F( M I N S H RE Q0 ,S O L V E D=0 ; ) ; ) ; ) ; ) ; I F( S O L V E D , D I S P L A Y" F u n c t i o nc a l i b r a t e d : " , G A M M A . L , S I G M A . L , S H A R E . L , S . L ; E L S E D I S P L A Y" F u n c t i o nc a l i b r a t i o nf a i l s ! " ; ) ; $ O N T E X T * = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = S o l u t i o nf r o mM I N O S 5o b t a i n e do nt h es e c o n dt r y ,f o l l o w i n ga n I T E R A T I O NI N T E R R U P To nt h ef i r s t : 1 5 1F u n c t i o nc a l i b r a t e d :

1 5 1V A R I A B L E G A M M A . L

0 . 3 0 0E l a s t i c i t yo f s u b s t i t u t i o na tt h e t o pl e v e l

1 5 1V A R I A B L E S I G M A . L

E l a s t i c i t yo fs u b s t i t u t i o nw i t h i nn e s tN

N 37 . 8 0 4

1 5 1V A R I A B L E S H A R E . L N 20 . 2 6 6 , N 30 . 0 3 0 ,

V a l u es h a r eo fn e s tN N 40 . 1 0 0

N 10 . 6 0 4 ,

1 5 1V A R I A B L E S . L

F r a c t i o no fg o o dIw h i c he n t e r st h r o u g h n e s tN
15/22

www.gams.com/solvers/mpsge/cesfun.htm

9/8/13

CES Demand Functions: Hints and Formulae

N 1 K L E M

N 2 0 . 7 9 7

N 3 0 . 0 6 9 0 . 0 4 0

N 4 0 . 1 3 3 1 . 0 0 0 0 . 0 6 7

0 . 9 6 0 0 . 6 3 0 0 . 3 0 4

* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = T h ef o l l o w i n gs o l u t i o ni so b t a i n e db yC O N O P To nt h es e c o n dt r y , f o l l o w i n gaL O C A L L YI N F E A S I B L Et e r m i n a t i o no nt h ef i r s tp r o b l e m . N o t i c et h a ti ti si d e n t i c a lt ot h eM I N O S 5s o l u t i o ne x c e p tt h a tt h e n e s t i n ga s s i g m e n t sh a v eb e e np e r m u t e d : 1 4 9F u n c t i o nc a l i b r a t e d :

1 4 9V A R I A B L E G A M M A . L

0 . 3 0 0E l a s t i c i t yo f s u b s t i t u t i o na tt h e t o pl e v e l

1 4 9V A R I A B L E S I G M A . L

E l a s t i c i t yo fs u b s t i t u t i o nw i t h i nn e s tN

N 47 . 8 0 4

1 4 9V A R I A B L E S H A R E . L N 20 . 6 0 4 , N 30 . 2 6 6 ,

V a l u es h a r eo fn e s tN N 40 . 0 3 0

N 10 . 1 0 0 ,

1 4 9V A R I A B L E S . L

F r a c t i o no fg o o dIw h i c he n t e r st h r o u g h n e s tN N 3 0 . 7 9 7 N 4 0 . 0 6 9 0 . 0 4 0

N 1 K L E M 0 . 1 3 3

N 2

0 . 9 6 0 1 . 0 0 0 0 . 0 6 7 0 . 6 3 0 0 . 3 0 4

* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = $ O F F T E X T $ T I T L E N u m e r i c a lV e r i f i c a t i o no ft h et h eA U E SC a l i b r a t i o nR e s u l t s P A R A M E T E R P R I C E ( I ) A U E S C H K ( I , J ) P R I C EI N D I C E SU S I N GT OV E R I F YC A L I B R A T I O N C H E C KO FB E N C H M A R KA U E SV A L U E S ;

P R I C E ( I )=1 ; $ o n t e x t $ M O D E L : C H K C A L I B
www.gams.com/solvers/mpsge/cesfun.htm 16/22

9/8/13

CES Demand Functions: Hints and Formulae

$ S E C T O R S : Y D ( I ) $ C O M M O D I T I E S : P Y P ( I ) P F X $ C O N S U M E R S : R A

!P R O D U C T I O NF U N C T I O N

!P R O D U C T I O NF U N C T I O NO U T P U T !F A C T O R SO FP R O D U C T I O N !A G G R E G A T EP R I C EL E V E L

$ P R O D : Y s : G A M M A . L K . T L : S I G M A . L ( K ) O : P Y Q : 1 I : P ( I ) # ( K ) Q : ( T H E T A ( I ) * S . L ( I , K ) ) $ P R O D : D ( I ) O : P ( I ) Q : T H E T A ( I ) I : P F X Q : ( T H E T A ( I ) * P R I C E ( I ) ) $ D E M A N D : R A D : P F X E : P F X Q : 2 E : P Y Q : 1 $ O F F T E X T $ S Y S I N C L U D Em p s g e s e tC H K C A L I B C H K C A L I B . I T E R L I M=0 ; $ I N C L U D EC H K C A L I B . G E N S O L V EC H K C A L I BU S I N GM C P ; C H K C A L I B . I T E R L I M=2 0 0 0 ; S C A L A RD E L T A/ 1 . E 5 / ; A L I A S( I , I I ) ; L O O P ( I I , P R I C E ( J )=1 ; P R I C E ( I I )=1+D E L T A ;

K . T L :

$ I N C L U D EC H K C A L I B . G E N S O L V EC H K C A L I BU S I N GM C P ; A U E S C H K ( J , I I )=( D . L ( J ) 1 )/( D E L T A * T H E T A ( I I ) ) ; ) ; D I S P L A YA U E S ,A U E S C H K ;

Analytic Calibration of the GEMTAP Final Demand System This material was published in the MUG newsletter, 8/95. Following Ballard, Fullerton, Shoven and Whalley (BFSW), we consider a representative agent whose utility is based upon current consumption, future consumption and current leisure. Changes in "future consumption" in this static framework are associated with changes in the level of savings. There are three prices which jointly
www.gams.com/solvers/mpsge/cesfun.htm 17/22

9/8/13

CES Demand Functions: Hints and Formulae

determine the price index for future consumption. These are: PI the composite price index for investment goods PK the composite rental price for capital services PC the composite price of current consumption. All of these prices equal unity in the benchmark equilibrium. Capital income in each future year finances future consumption, which is expected to cost the same as in the current period, PC (static expectations). The consumer demand for savings therefore depends not only on PI, but also on PK and PC, namely:

The price index for savings is unity in the benchmark period. In a counter-factual equilibrium, however, we would expect generally that . When these price indices are not equal, there is a "virtual tax payment" associated with savings demand. Following BFSW, we adopt a nested constant-elasticity-of-substitution function to represent preferences. In this function, at the top level demand for savings (future consumption) trades off with a second CES aggregate of leisure and current consumption. These preferences can be summarized with the following expenditure function:

Preferences are homothetic, so we have defined PU as a linearly homogeneous cost index for a unit of utility. We conveniently scale this price index to equal unity in the benchmark. In this definition, is the benchmark value share for current consumption (goods and leisure). PH is a compositive price for current consumption defined as:

in which

is the benchmark value share for leisure within current consumption.

Demand functions can be written as follows: , , and

Demands are written here in terms of their benchmark values (S0, C0 and income (I and I0).
www.gams.com/solvers/mpsge/cesfun.htm

) and current and benchmark

18/22

9/8/13

CES Demand Functions: Hints and Formulae

There are four components in income. The first is the value of labor endowment (E), defined inclusive of leisure. The second is the value of capital endowment (K). The third is all other income (M). The fourth is the value of "virtual tax revenue" associated with differences between the shadow price of savings and the cost of investment.

The following parameter values are specified exogenously: 1. is the ratio of labor endowment: where L0 is the benchmark labor supply. Given 2. and L0 we have:

is the uncompensated elasticity of labor supply with respect to the net of tax wage, i.e.

3.

is the elasticity of savings with respect to the return to capital:

Shephard's lemma applied at benchmark prices provides the following identities which are helpful in deriving expressions for and :

It is then a relatively routine application of the chain rule to show that:

and

The expression for determining :

does not involve

, so we may first solve for

and use this value in

and

$TITLE A Maquette Illustrating Labor Supply / Savings Demand Calibration


www.gams.com/solvers/mpsge/cesfun.htm 19/22

9/8/13

CES Demand Functions: Hints and Formulae

E x o g e n o u se l a s t i c i t y : U N C O M P E N S A T E DE L A S T I C I T YO FL A B O RS U P P L Y/ 0 . 1 5 / , E L A S T I C I T YO FS A V I N G SW R TR A T EO FR E T U R N/ 0 . 4 0 / , R A T I OO FL A B O RE N D O W M E N TT OL A B O RS U P P L Y/ 1 . 7 5 / ;

S C A L A R X I E T A Z E T A *

B e n c h m a r kd a t a : C O N S U M P T I O N/ 2 . 9 9 8 8 4 5 E + 2 / , S A V I N G S/ 7 0 . 0 2 6 9 8 9 7 4 / , L A B O RS U P P L Y/2 . 3 1 7 2 7 1 E + 2 / , C A P I T A LI N C O M E/ 9 3 . 4 6 9 6 0 5 7 7 / , M A R G I N A LW A G E/ 0 . 6 0 0 0 0 0 0 0 / ;

S C A L A R C 0 S 0 L S 0 K 0 P L 0 *

C a l i b r a t e dp a r a m e t e r s :

S C A L A R E L 0 L A B O RE N D O W M E N T L 0 L E I S U R ED E M A N D M 0 N O N W A G EI N C O M E I E X T E N D E DG R O S SI N C O M E E T A M I N S M A L L E S TP E R M I S S I B L EV A L U EF O RE T A , X I M I N S M A L L E S TP E R M I S S I B L EV A L U EF O RX I , A L P H A C U R R E N TC O N S U M P T I O NV A L U ES H A R E B E T A L E I S U R EV A L U ES H A R EI NC U R R E N TC O N S U M P T I O N S I G M A _ LE L A S T I C I T YO FS U B S T I T U T I O NW I T H I NC U R R E N TC O N S U M P T I O N S I G M A _ SE L A S T I C I T YO FS U B S T I T U T I O N-S A V I N G SV SC U R R E N TC O N S U M P T I O N T S S A V I N G SP R I C EA D J U S T M E N T ; * C o n v e r tl a b o rs u p p l yi n t on e to ft a xu n i t s :

L S 0=L S 0*P L 0 ; * L a b o re n d o w m e n t( e x o g e n o u s ) :

E L 0=Z E T A*L S 0 ; * L e i s u r ed e m a n d :

L 0=E L 0-L S 0 ; * N o n l a b o r ,n o n c a p i t a li n c o m e :

M 0=C 0+S 0-L S 0-K 0 ; * E x t e n d e dg r o s si n c o m e :

I=L 0+C 0+S 0 ; * L e i s u r es h a r eo fc u r r e n tc o n s u m p t i o n :

B E T A= L 0/( C 0+L 0 ) ; * C u r r e n tc o n s u m p t i o nv a l u es h a r e :

A L P H A=( L 0+C 0 )/I ;


www.gams.com/solvers/mpsge/cesfun.htm 20/22

9/8/13

CES Demand Functions: Hints and Formulae

C a l i b r a t e de l a s t i c i t y :

S I G M A _ S=( E T A-K 0/I )/A L P H A ; E T A M I N =K 0/I ; A B O R T $ ( S I G M A _ SL T0 )"E r r o r :c a n n o tc a l i b r a t eS I G M A _ S " ,E T A M I N ; * C a l i b r a t e de l a s t i c i t yo fs u b s t i t u t i o nb e t w e e nl e i s u r ea n dc o n s u m p t i o n :

S I G M A _ L=( X I * ( L S 0 / L 0 ) S I G M A _ S * B E T A * ( 1 A L P H A ) A L P H A * B E T A + E L 0 / I ) / ( 1 B E T A ) ; X I M I N=( L 0 / L S 0 )*( -S I G M A _ S*B E T A*( 1 A L P H A )-A L P H A * B E T A+E L 0 / I ) ; A B O R T $ ( S I G M A _ LL T0 )"E r r o r :c a n n o tc a l i b r a t eS I G M A _ L " ,X I M I N ; D I S P L A Y" C a l i b r a t e de l a s t i c i t i e s : " ,S I G M A _ S ,S I G M A _ L ; $ O N T E X T $ M O D E L : C H K C A L $ C O M M O D I T I E S : P L P K P C P S $ S E C T O R S : Y S $ C O N S U M E R S : R A $ P R O D : Y O : P C I : P L I : P K $ P R O D : S O : P S I : P L A : R A T : T S Q : ( K 0 + L S 0 S 0 ) Q : ( L S 0 S 0 ) Q : K 0

$ D E M A N D : R A s : S I G M A _ Sa : S I G M A _ L E : P C Q : M 0 E : P L Q : E L 0 E : P K Q : K 0 D : P S Q : S 0 D : P C Q : C 0 a : D : P L Q : L 0 a : $ O F F T E X T $ S Y S I N C L U D Em p s g e s e tC H K C A L S . L=S 0 ; T S =0 ; * V E R I F YT H EB E N C H M A R K :

C H K C A L . I T E R L I M=0 ; $ I N C L U D EC H K C A L . G E N
www.gams.com/solvers/mpsge/cesfun.htm 21/22

9/8/13

CES Demand Functions: Hints and Formulae

S O L V EC H K C A LU S I N GM C P ; * C H E C KT H EL A B O RS U P P L YE L A S T I C I T Y :

P L . L=1 . 0 0 1 ; C H K C A L . I T E R L I M=0 ; $ I N C L U D EC H K C A L . G E N S O L V EC H K C A LU S I N GM C P ; * C o m p u t ei n d u c e dc h a n g e si nl a b o rs u p p l yu s i n gt h el a b o rm a r k e t * " m a r g i n a l " ,P L . M . T h i sm a r g i n a lr e t u r n st h en e te x c e s ss u p p l yo f * l a b o ra tt h eg i v e np r i c e s . W es t a r t e df r o mab a l a n c e db e n c h m a r k , * w i t hn oc h a n g ei nl a b o rd e m a n d( t h ei t e r a t i o nl i m i tw a sz e r o ) . * H e n c e ,P L . Mr e t u r n st h em a g n i t u d eo ft h ec h a n g ei nl a b o rs u p p l y . * W em u l t i p l yb yt h eb e n c h m a r kw a g e( 1 )a n dd i v i d eb yt h eb e n c h m a r k * l a b o rs u p p l y( L S 0 )t op r o d u c eaf i n i t ed i f f e r e n c ea p p r o x i m a t i o n * o ft h ee l a s t i c i t y : D I S P L A Y" C A L I B R A T I O NC H E C K-T H EF O L L O W I N GV A L U E SS H O U L DB EI D E N T I C A L : " ,X I ; X I=( P L . M/0 . 0 0 1 )*( 1/L S 0 ) ; D I S P L A YX I ; P L . L=1 . 0 ; * C H E C KT H EE L A S T I C I T YO FS A V I N G SW R TR E N T A LR A T EO FC A P I T A L :

P K . L=1 . 0 0 1 ; P S . L=1/1 . 0 0 1 ; T S =1/1 . 0 0 1-1 ; C H K C A L . I T E R L I M=0 ; * * * * * * * * * C o m p u t ee l a s t i c i t yo fs a v i n g sw i t hr e s p e c tt ot h er e n t a lr a t eo f c a p i t a l . T h i sr e q u i r e ss o m er e c u r s i o ni no r d e rt oa c c o u n tf o rt h e e f f e c to fc h a n g e si ns a v i n g so ne f f e c t i v ei n c o m e . W h e nP Ki n c r e a s e s , P Sd e c l i n e s-t h e r ei sa ne f f e c t i v e" s u b s i d y "f o rs a v i n g ,p a i df r o m c o n s u m e ri n c o m e . I no r d e rt oo b t a i nad i f f e r e n c ea p p r o x i m a t i o nf o r t h ee l a s t i c i t yo fs a v i n g sr e s p o n s e ,w en e e dt om a k es u r et h ev i r t u a l t a xp a y m e n t sa r ep r o p e r l yh a n d l e d . I nt h eM P S G Em o d e l ,t h i sm e a n s t h a tt h el e v e lv a l u ef o rSm u s tb ea d j u s t e ds ot h a ti te x a c t l ye q u a l s t h es a v i n g s . W ed ot h i sr e c u r s i v e l y :

S E TI T E R/ I T 1 * I T 5 / ;

P S . M=1 ; L O O P ( I T E R $ ( A B S ( P S . M )G T1 . 0 E 8 ) , $ I N C L U D EC H K C A L . G E N S O L V EC H K C A LU S I N GM C P ; S . L=S . L-P S . M ; ) ; D I S P L A Y" C A L I B R A T I O NC H E C K-T H EF O L L O W I N GV A L U E SS H O U L DB EI D E N T I C A L : " ,E T A ; E T A=( ( S . L-S 0 )/0 . 0 0 1 )*( 1/S 0 ) ; D I S P L A YE T A ;
www.gams.com/solvers/mpsge/cesfun.htm 22/22

You might also like