  We study a class of heterogeneous agent-based models which are based on a
basic set of principles, and the most fundamental operations of an economic
system: trade and product transformations.
  A basic guiding principle is scale invariance, which means that the dynamics
of the economy should not depend on the units used to measure the different
products. We develop the idea of a "near-equilibrium" expansion which allow us
to study the dynamics of fluctuations around economic equilibrium. This is
similar to the familiar "perturbation theory" studied in many areas of physics.
We study some simple models of both centralized and decentralized markets. We
show the relaxation to equilibrium when appropriate. More interestingly, we
study a simple model of a decentralized market that shows a spontaneous
transition into a monetary phase. We use mean field theory analysis to provide
a statistical interpretation of the monetary phase. Furthermore, we show that
such phase can be dynamically unstable. Finally, we study some simple
centralized financial markets, one of which shows a speculative bubble and a
crash.
