Académique Documents
Professionnel Documents
Culture Documents
Computational Economics
Dietmar Maringer
WWZ, University of Basel
Spring 2012
(1)
y
x
f
(x)
lim
x 0 x
dx
f (x + )
f (x )
f 0 (x)
x+
x +
x
x
multi-dimensional functions
gradient: list of all first order derivatives
f =
f
x1
f
xn
h
f (x1 +,x2 ,...,xn )2f (x1 ,x2 ,...,xn )
(2)
f 0 (x + ) f 0 (x )
(x + ) (x )
f (x++)f (x+)
2
f (x+)f (x)
2
(x + ) (x )
f (x + 2) + f (x 2) 2f (x)
=
(2)2
f (x + ) + f (x ) 2f (x)
where = 2
likewise for higher derivatives
(3)
H=
2 f
x21
..
.
2 f
xn x1
2 f
xi xj
2 f
x1 xn
..
.
2 f
x2n
2 f
xi xj
2 f
= x x
j i
(4)
f +
xi +
xj
f
f
f +
xj +
f +
f +
f ++
( f + +f 2f
+2
1 f
2
alternative 1
2f
+f
f ++ +f + 2f +
2
alternative 2
f +f f f
f + +f f + f
+
12
2
2
++ + +
2 f
f +f f f
f +f f f
12
+
2
2
xi xj
1 f ++ +f f + f +
alternative 1
alternative 2
average alt.s 1 and 2
(5)
Application Example
local approximation with Taylor Series Approximation
approximation for region around a given value x0
approximate function value at x = x0 + with a polynomial
f (x) = f (x0 + ) = f (x0 ) + f 0 (x0 ) +
f 00 (x0 ) +
+ +
f 000 (x0 ) +
n (n)
f (x0 ) + Rn
n!
(6)
f3
f2 +f3
2
f2
w
a
= x1
x2
f2 +f3
2
x3
=bx4
(7)
f (x)dx =
n Z xi+1
X
i=1 xi
n
X
i=1
R xi+1
xi
f (x)dx w
f (x)dx
f1
fn+1
fi + fi+1
= w
+ f2 + + fn +
2
2
2
f (x)dx
n
X
(xi+1 xi )
i=1
fi + fi+1
2
(8)
Z 2
0
f (x)dx =?
p
5
|x|
Z 3
=
f (x)dx =?
A = r 2
A r2
=
=
A 4r2 4
A
= = 4
A
r
1
y
1
1
D Maringer, Computational Economics
(9)
additional literature
Gilli, M., Maringer, D., and Schumann, E. (2011).
Numerical Methods and Optimization in Finance.
Academic Press.
Judd, K. L. (1998).
Numerical Methods in Economics.
MIT Press.
Miranda, M. J. and Fackler, P. L. (2002).
Applied Computational Economics and Finance.
MIT Press.
(10)