|
GAUSS and OpenMaple
Size up the Economy
New application from Econotron arms GAUSS
with Maple symbolics
When the Ministry of Finance announces
that the nations GDP will grow by 2.1% in 2004,
few people realize what a colossal undertaking this one
number represents. An army of economists has fed reams
of data into an optimization model. A supercomputer running
a package called GAUSS has crunched on the model for
days and performed millions of computations to distill
this one value that is presented to the nation. Every
time the data or the assumptions in the model change,
the economists must re-run the computations.
A new application called Symbolic Tools from Econotron Software, Inc.
is about to turn those days into hours. Symbolic Tools links the symbolic
power of Maple 9 with the numerical power of GAUSS to solve optimization
problems with unprecedented speed. OpenMaple, the new Maple API in Maple
9, makes the alliance possible.
Economists make their predictions by fitting model parameters to economic
data. They usually perform the fitting with a least-squares or maximum-likelihood
technique, which ultimately involves solving an optimization problem.
Typical problems in econometrics have hundreds of decision variables
and constraints. For example, to compute the flow of 10 goods among 20
countries, one would build a trade-flow model with 10 ¥ 20 = 200
trade-flow parameters. Each of these parameters has to be estimated,
typically by minimizing some objective function, such as the total cost
of transport. The tool of choice for solving such large-scale problems
in econometrics is GAUSS. Akin to MATLAB, GAUSS is a matrix programming
language, which is ideal for econometrics, and is designed for heavy
numerical computations.
In a typical optimization problem, GAUSS spends 80-90% of its time evaluating
the derivatives of the objective function and constraint equations. This
is because GAUSS has no symbolic differentiator and must approximate
the first and second derivatives using finite-differencing methods. Finite
differencing levies a hefty computational toll: for a problem with n
decision variables, each approximation of the second-derivative matrix
(i.e. the hessian) requires of the order of n2 evaluations of the objective
function.
However, if GAUSS knew the symbolic formulas for the derivatives in advance,
evaluation of the derivatives would take far less time and yield more
accurate results, thus reducing the solution time significantly. The
process of deriving these analytical derivatives from the objective function
is called automatic differentiation (AD). The time savings and improved
accuracy gained by using AD are well known. The hard part is to make
AD work seamlessly on complex functions such as GARCH, a stochastic process
that models financial time series.
Dr. Jon Breslaw, founder of Econotron Software, saw the possibility in
using Maples symbolic differentiation to implement AD in a GAUSS
environment. If economists could run a model in hours instead of days,
they would be free to run multiple scenarios or experiment with more
sophisticated models that could make more accurate predictions about
the economy.
Econotron Softwares new Symbolic Tools application has made this
a reality. With Symbolic Tools, GAUSS applications can obtain exact formulas
from Maple instead of having to approximate them. In this way, Symbolic
Tools cuts the running time of optimization routines in GAUSS 10-15 fold.
The benefits are not limited to optimization problems. Symbolic Tools
extends the capabilities of GAUSS with indefinite integration, exact
solutions to equations and differential equations, and, in fact, the
entire mathematical functionality of Maple 9.
The OpenMaple API and Maples code generation are the key technologies
inside Symbolic Tools. To enable automatic differentiation, Symbolic
Tools parses and passes the objective function and constraints from GAUSS
to Maple 9, with OpenMaple serving as the translator between the two.
Maple then computes the functions derivatives symbolically using
the Gradient and Hessian routines in the VectorCalculus package.
Finally, Maple translates the derivatives to optimized C code, which
Symbolic Tools parses and passes back to GAUSS as a compiled procedure.
Dr. Breslaw graduated from Cambridge University in the UK in 1967 and
earned his doctorate in economics at the University of California, Berkeley
in 1974. He was a professor at Concordia University in Montréal
for 25 years and founded Econotron Software in 1978. Econotron creates
custom software and user interfaces for applications in econometrics,
finance, education and the arts. Academics and researchers in over 40
countries use its products.
GAUSS is produced by Aptech Systems, Inc., which also distributes Symbolic
Tools and other Econotron products. For more information, visit the Aptech
web site at www.aptech.com.,
and the Econotron site at www.econotron.com.
|