Agent-Based Macroeconomics

Transcription

Agent-Based Macroeconomics
Agent-Based Macroeconomics
Constructive Modeling of Decentralized Market Economies

Presenter:
 Leigh Tesfatsion
Professor of Econ, Math, and Electrical & Comp Eng
Iowa State University
Ames, Iowa 50011-1070
http://www2.econ.iastate.edu/tesfatsi/
[email protected]
Last Revised: 7 April 2016
1
Presentation Outline
 Complexity of economic systems
 What is Agent-based Comp Economics (ACE )?
 ACE modeling of macroeconomic systems
 Illustrations:
• An ACE Two-Sector Trading World
• EURACE: ACE Modeling of the European Union
• Macroeconomies as constructively rational games
 Advantages & disadvantages of ACE modeling
2
Complexity of Economic Systems
 Distributed local interactions
 Two-way feedbacks mediated by interactions
Micro  Agent Interactions  Macro
 Strategic behavior
behavioral uncertainty
 Network effects and path dependence
 Critical role of institutional constraints
3
Increasing mainstream interest in
modeling these complexities

Behavioral Economics
From Princeton U Press BE Book Series:
“Behavioral Economics …uses facts, models, and
methods from neighbouring sciences such as
psychology, sociology, anthropology and biology to
establish descriptively accurate findings about human
cognitive ability and social interaction and to explore
the implications of these findings for economic behavior.”

Four Recent Nobel Prizes:
George Akerloff (2001), Daniel Kahneman & Vernon L. Smith (2002),
Thomas C. Schelling (2005), and Elinor Ostrom (2009)
4
Why has it taken so long?

Lack of tools permitting quantitative modeling of
complex economic systems in a compelling,
tractable, & testable way.

Seeming promise of rational expectations that
economic outcomes can be studied & understood
as the result of purely rational deliberations by
individual agents
 no need for detailed understanding of human
cognition and social interactions
 but soon ran into major problems (multiple RE
solutions, subjective uncertainty in multi-agent game situations,…)
5
Potential of computational experiments
for studying complex economic systems
Early recognition by Robert Lucas, Jr., “Studies in
Business Cycle Theory” (1987): pp. 271 & 288
"One of the functions of theoretical economics is to
provide fully articulated, artificial economic systems that
can serve as laboratories in which policies that would be
prohibitively expensive to experiment with in actual
economies can be tested out at a much lower cost.”
“Our task as I see it…is to write a FORTRAN program that
will accept specific economic policy rules as `input' and will
generate as `output' statistics describing the operating
characteristics of time series we care about, which are
predicted to result from these policies."
6
A major extension of this vision
 Modern Agent-Oriented Programming (AOP) is
designed for complex interactive systems.
 Agent-based Computational Economics (ACE)
= Study of economic processes computationally
modeled as dynamic systems of interacting agents
 ACE uses AOP to study virtual economic worlds via
computational experiments.
 Commonly used AOP languages: Java, Python, …
http://www2.econ.iastate.edu/tesfatsi/acecode.htm
7
Further possibilities:
A spectrum of experimental approaches
100% human
x
Humans with
computer access
Human-controlled
computer avatars
Mix of humans
and computer agents
Tethered
Not Tethered
Human-calibrated
computer agents
Computer agents with
real-world data
streaming
100% computer agents
evolved from initial
conditions (ACE)
8
What is ACE ?
Agent-Based Computational Economics (ACE)
 Computational
study of economic processes
modeled as dynamic systems of interacting agents.
Goal:
 Empirically-based
economic theories in which
“market clearing”, “correct expectations,” and other
coordinated states are possible outcomes rather
than restrictions imposed a priori .
9
Meaning of “agent” in ACE
Agent = Encapsulated bundle of data and methods
acting within a computationally constructed world.
 Agents can represent:
- Individuals (consumers, traders, entrepreneurs,…)
- Social groupings (households, communities,…)
- Institutions (markets, corporations, gov’t agencies,…)
- Biological entities (crops, livestock, forests,…)
- Physical entities (weather, landscape, electric grids,…)
10
ACE agent types…cont’d
Decision-Making (DM) agents can exhibit
 Backward-looking adaptation (reactive learning)
 Goal-directed adaptation (anticipatory learning)
 Social communication (talking with each other !! )
 Endogenous formation of interaction networks

Autonomy:
Self-activation and self-determination based on
private internal data and methods as well as on
external data streams (including from real world)
11
Illustration: Agent hierarchy for an ACE macro model
with “is a” ↑ and “has a” ↓ agent relations
Base Agents
Derived
Agents
12
Importance of agent encapsulation
 Real-world economies consist of distributed entities
with limited info & comp capabilities.
ACE forces adherence to this constraint.
 An ACE model is a collection of data and methods encapsulated into
separate bundles (“agents”) with access restrictions.
 A method encapsulated in a particular agent can only be implemented
using this agent’s particular resources (data, CPU time, reasoning
powers,…)
 Encapsulation (access restriction) can make an
agent partially/wholly unpredictable to other agents.
13
ACE permits endogenous change
and creative leaps

Agents in ACE worlds only acquire new data about their
world constructively (thru interactions).

Yet they can have non-constructive beliefs (inborn or
acquired) that influence their decision making.

And they can make creative leaps, forming new ideas
(hypotheses) for testing that do not follow simply from logical
or empirical-data extrapolations.

Example: Agents can use evolutionary algorithms
that make use of mutation & recombination operations to
generate genuinely new ideas (e.g., new decision choices).
14
Addressing system uncertainty through
ACE experimental design

Uncertain aspects of system under ACE study ?
Make them experimental treatment factors

Three basic types of treatment factors:



Structural conditions
Institutional arrangements
Behavioral dispositions of agents (e.g. learning methods)

Multiple runs conducted for each setting of the
treatment factors (multiple random seeds)

Focus on distribution of possible outcomes for
each setting of the treatment factors
15
ACE culture-dish analogy
 ACE modeler constructs a virtual economic world
populated by various agent types.
 Modeler sets initial agent attributes
(experimental treatment factors).
 Modeler then steps back to observe how the
world develops in real (CPU) time without
further external intervention (no imposed market
clearing, no assumed correct expectations,…).
 World events driven by agent interactions.
16
ACE culture dish analogy…
Initial World Conditions
(Experimental Treatment Factors)
Macro to Micro
Feedback Loop
World Develops Over Time
(Culture Dish of Agents)
Macro Regularities
Micro to Macro
Feedback Loop
17
Four main strands of ACE research
 Empirical Understanding
(possible explanations for empirical regularities)

Normative Understanding
(institutional design, policy selection, …)


Qualitative Insight/Theory Generation
(self-organization of decentralized markets, …)
Methodological Advancement
(representation, visualization, empirical validation, …)
18
ACE and Empirical Regularities
Key Issue: Is there a causal explanation for
persistently observed empirical regularities?
ACE Approach:
 Construct an agent-based world capturing salient
aspects of the empirical situation.
 Investigate whether the empirical regularities can be
reliably generated as outcomes in this world.
Example:
ACE financial market research seeking
explanation of several “stylized facts” in combination.
http://www2.econ.iastate.edu/tesfatsi/afinance.htm
19
ACE and Institutional Design
Key Issue:
Does an institutional design ensure efficient,
fair, & orderly outcomes over time even if participants
attempt to “game” it for own advantage?
ACE Approach:

Construct an agent-based world capturing salient aspects
of the institutional design.

Introduce DM agents with behavioral dispositions, needs,
goals, beliefs, feasible action sets... Let world evolve.
Observe and evaluate resulting outcomes.
EXAMPLES: Design of auctions, stock exchanges, electricity markets,
automated Internet markets (B2B, job markets, eBay,…)
http://www2.econ.iastate.edu/tesfatsi/aapplic.htm
20
ACE and Qualitative Analysis
Illustrative Issue: Performance capabilities of
macroeconomies based on decentralized markets?
(Adam Smith, F. von Hayek, Keynes, J. Schumpeter, ...)
ACE Approach:

Construct an agent-based world qualitatively capturing key
aspects of the economy (firms, consumers, banks,
government, circular flow, limited information, …)

Introduce traders with behavioral dispositions, needs, goals,
beliefs, … . Let the world evolve & observe results.
ACE Macro Resource Site: (Annotated pointers to
research papers, software, and research groups)
http://www2.econ.iastate.edu/tesfatsi/amulmark.htm
21
ACE Macro Modeling: Illustrative Exercise
(http://www2.econ.iastate.edu/tesfatsi/hbintlt.pdf)
Starting Point:
Two-Sector Walrasian Equilibrium Economy
Exercise:
•
Remove all imposed equilibrium conditions (e.g., market
clearing, rational expectations assumptions,...)
•
Introduce minimal agent-driven production, pricing, and
trade processes needed to re-establish complete circular
flow among firms and consumers
•
Experiment to see if/when resulting economy is able to
attain an “equilibrium” state over time of some form
22
Starting point:
Two-sector Walrasian equilibrium economy
H2
B1
H1
B3
B2
Fictitious
Walrasian
Auctioneer
pB
pB, pH, DivB, DivH
H3
SupplyH(pH), DivH(pH)
SupplyB(pB), DivB(pB)
Bean
Firms
H4
Hash
Firms
pH
Demand(pB,pH,DivB,DivH)
ConsumerShareholders
23
Plucking out the fictitious auctioneer
B1
B3
H2
H1
H3
B2
Bean
Firms
Firm-Consumer
Connections??
ConsumerShareholders
H4
Hash
Firms
24
Without the fictitious auctioneer…
Careful attention must now be paid to


Market Organization

Who trades with whom? [e.g. business-to-business (B2B)
transactions, business-to-consumer (B2C) transactions, etc.]

In what types of market structures does this trading take place?
[e.g. double auctions, single-sided auctions, exchanges, bilateral
trades, etc.]
Learning Behavior and Strategic Interaction

Price/quantity discovery processes

Formation of buyer-seller interaction networks
25
Key types of market procurement processes
that must be carried out
 Terms-of-Trade: Set production and price levels
 Seller-Buyer Matching:
• Identify potential sellers/buyers
• Compare/evaluate opportunities
• Make demand bids/supply offers
• Select specific sellers/buyers
• Negotiate seller/buyer contracts
 Trade: Transactions carried out
 Settlement: Payment processing and shake-out
 Manage: Long-term seller/buyer relations
26
Can ACE help?
How might Agent-based Computational Economics
(ACE) modeling tools facilitate the study of
decentralized market economies?
27
Illustration: ACE Hash-and-Beans
(H&B) Economy
B1
Supply
Offers
SO=(q,p)
B3
B2
ManySeller
Posted
Bean
Auction
DivB
B(0)
Bean
Firms
SOB1
H2
H1
H4
H3
H(0) Hash Firms
SOH1
SOH4
ManySeller
Posted
Hash
Auction
Consumer-Shareholders
k=1,…,K(0)
DivH
SOB2
SOB3
SOH2
SOH3
28
ACE H&B Economy:
Agent hierarchy
World
Market
Consumer
Hash
Market
Bean
Market
Joe
Ivan
…
Marie
…
…
Firm
Hash
…
Bean
…
29
Overview of activity flow in the
ACE H&B Economy
World agent constructed. World constructs & configures
Market, Firm, & Consumer agents and starts a World “clock”.
Firms receive clock time signal and post
quantities/prices in H & B markets
loop
Consumers receive clock time signal and begin
price discovery process
Firms/consumers match, trade, calculate
profits/utilities, & update wealth levels
Firms and consumers update their
expectations & behavioral strategies
30
Activity flow for firms
 Each firm f starts out (T=0) with money Mf(0) and a
production capacity Capf(0)
 Firm f’s pro-rated sunk cost SCf(T) for T  0 is
proportional to its current capacity Capf(T)
 At beginning of each T  0, firm f selects a supply
offer = (production level, unit price)
 At end of T  0, firm f is solvent if it has
NetWorth(T)=[Profit(T) + Mf(T) + ValCapf(T)] > 0
 If solvent, firm f allocates its profits (+ or -) between
Mf, CAPf, & dividend payments.
31
Activity flow for consumer-shareholders
 Each consumer k starts out (T=0) with a lifetime money
endowment profile
( Mkyouth , Mkmiddle , Mkold )
 In each T  0, consumer k’s utility is measured by
Uk(T)=(hash(T) - hk*)k • (beans(T) - bk*)[1-k]
 In each T  0, consumer k seeks to secure maximum utility
by searching for beans and hash to buy at lowest
possible prices.
 At end of each T  0, whether consumer k lives or dies
depends on whether or not he secures at least his
subsistence needs (bk*, hk*).
32
Experimental design treatment factors
 Initial number of consumers [ K(0) ]
 Initial number/size of firms [ H(0), B(0), Capf(0)]
 Firm learning (supply offers & profit allocations)





Firm cost functions
Firm initial money holdings [ Mf(0) ]
Firm rationing protocols (for excess demand)
Consumer learning (price discovery & demand bids)
Consumer money endowment profiles
(rich, poor,  ,  , life cycle u-shape)
 Consumer preferences ( values)
 Consumer subsistence needs (b*,h*)
33
World Agent
Public Access:
// Public Methods
The World Event Schedule, i.e., a system clock that
permits inhabitants to time and synchronize activities
(e.g., opening/closing of H & B markets);
Protocols governing firm collusion;
Protocols governing firm insolvency;
Methods for receiving data;
Methods for retrieving World data.
Private Access:
// Private Methods
Methods for gathering, storing, and sending data;
// Private Data
World attributes (e.g., spatial configuration);
World inhabitants (H & B markets, firms, consumers);
World inhabitants’ methods and data.
34
Market Agent
Public Access:
// Public Methods
getWorldEventSchedule(clock time);
Protocols governing the public posting of supply offers;
Protocols governing matching, trades, and settlements;
Methods for receiving data;
Methods for retrieving Market data.
Private Access:
// Private Methods
Methods for gathering, storing, and sending data.
// Private Data
Data recorded about firms (e.g., supplies, sales);
Data recorded about consumers (e.g., demands, purchases);
Address book (communication links).
35
Consumer Agent
Public Access:
// Public Methods
getWorldEventSchedule(clock time);
getWorldProtocols (stock share ownership);
getMarketProtocols (price discovery process, trade process);
Methods for receiving data;
Methods for retrieving stored Consumer data.
Private Access:
// Private Methods
Methods for gathering, storing, and sending data;
Method for determining own budget constraint;
Method for searching for lowest prices (LEARNING);
Methods for changing my methods (LEARNING TO LEARN).
// Private Data
Data about self (history, utility function, current wealth,…);
Data about external world (posted supply offers, …);
Address book (communication links).
36
Firm Agent
Public Access:
// Public Methods
getWorldEventSchedule(clock time);
getWorldProtocols (collusion, insolvency);
getMarketProtocols (posting, matching, trade, settlement);
Methods for receiving data;
Methods for retrieving Firm data.
Private Access:
// Private Methods
Methods for gathering, storing, and sending data;
Methods for calculating own expected/actual profit outcomes;
Method for allocating own profits to shareholders;
Method for updating own supply offers (LEARNING);
Methods for changing my methods (LEARNING TO LEARN).
// Private Data
Data about self (history, profit function, current wealth,…);
Data about external world (rivals’ supply offers, demands,…);
37
Address book (communication links).
Interesting issues for exploration
 Initial conditions  carrying capacity?
(How many firms/consumers survive over the long run?)
 Initial conditions  market clearing?
(Supplies adequate to meet demands?)
 Initial conditions  market efficiency?
(No wastage of physical resources or utility?)
 Standard firm concentration measures at T=0 
good predictors of long-run firm market power?
 Importance for market performance of learning vs. market
structure ? (Gode/Sunder, JPE, 1993)
38
ACE Hash-and-Beans Economy Implementation
(C. Cook, 2005, C#/.Net, Incomplete Project)
39
An Extended ACE Hash & Beans Economy
Marc Oeffner’s implementation of Agent Island
(Thesis, 2008, Julius-Maximilians-Universitat Wurzburg )
Thesis/Code (SeSAm) Available At:
http://www2.econ.iastate.edu/tesfatsi/amulmark.htm
40
Equity and loan financing in Agent Island
Direct Finance:
Purchase of initial public
offerings of securities, e.g.,
stocks (equities), bonds,…
Indirect Finance:
Loans obtained through
a financial intermediary,
such as a bank
41
Daily activity flow in Agent Island
42
Sample outcomes for Agent Island
NOTES: CEI = Circuit Equilibrium Indicator measuring excess planned
expenditures (>0) or excess planned receipts (<0)
s = household financial savings
43
Period 1 (Shock Time)
Period 2 (After Shock Time)
inflation
0
0
Real GDP
0
0
Investment
demand
0
0
Sample PDFs for outcome changes due to a 1% increase in the credit44
interest rate occurring in period 1 and maintained in future periods
EURACE@Unibi Project: Large-Scale ACE Macro Modeling of EU
www2.econ.iastate.edu/tesfatsi/eurace-unibi-model-2011-v1.pdf
45
46
47
Other Work on Agent-Based Macroeconomics
http://www2.econ.iastate.edu/tesfatsi/amulmark.htm
Example: E. Sinitskaya & L. Tesfatsion, “Macroeconomies as Constructively
Rational Games,” Journal of Economic Dynamics and Control, Vol. 61, 2015,
152-182. Working Paper version online at:
http://www2.econ.iastate.edu/tesfatsi/MacroConstructiveRationalityWP.SinitskayaTesfatsion.pdf
Sequence of Activities During a Typical Period t
48
Example: E. Sinitskaya & L. Tesfatsion, JEDC, 2015
 3 tested types of locally-constructive decision rules: (RL,FL,EO)
 2 tested types of Explicit Optimization (EO) rules:
 EO-ADP = Adaptive dynamic programming (ADP) optimization
 EO-FH = Rolling fixed-horizon (FH) intertemporal optimization
49
Example: E. Sinitskaya & L. Tesfatsion, JEDC, 2015
Average single-period utility attained by CONSUMERS under
different decision-rule combinations for firms F and consumers
C for selected parameterized cases Nk, k=10, 21, 31, … . A
darker color indicates a higher attained average utility level.
50
Example: E. Sinitskaya & L. Tesfatsion, JEDC, 2015
Avgerge single-period profits attained by FIRMS under different
decision-rule combinations for firms F and consumers C for
selected parameterized cases Nk, k=10, 21, 31, … . A darker
color indicates a higher attained average profit level.
51
Key Findings: E. Sinitskaya & L. Tesfatsion, JEDC, 2015
 Good performance requires decision-makers to
engage both in the exploitation of their current
information and in searches for new information.
 Simpler decision rules can outperform more
sophisticated decision rules, but only if the simpler
rules entail memory lengths permitting some degree
of adaptive foresight.
 The best performance is attained when consumers
and firms all use rolling fixed-horizon (EO-FH)
decision rules. That is, (F:EO-FH, C:EO-FH)
 is a Pareto-optimal equilibrium for F’s & C’s
 is a Nash equilibrium for F’s and C’s
52
Potential Disadvantages of ACE
for Macroeconomic Modeling
 Intensive experimentation is often needed to
generate “complete” outcome distributions.
 Empirical validation issues: How to test outcome
distributions against actual empirical realizations?
http://www2.econ.iastate.edu/tesfatsi/EmpValid.htm
 Robustness of simulated outcomes to use of
alternative hardware and software platforms needs
to be assured.
 Acquiring needed computer modeling skills can take
significant effort. (The increasing availability of agent-based
modeling toolkits helps -- see the following site.)
http://www2.econ.iastate.edu/tesfatsi/abmread.htm
53
Potential Advantages of ACE
for Macroeconomic Modeling
 Permits systematic experimental study of economic
systems with detailed empirical grounding of initial
conditions in terms of structures, institutions, and
behavioral dispositions.
 No need to impose fictitious coordination devices
(equilibrium assumptions, rational expectations, single
representative consumers, single composite goods,…)
 Facilitates creative experimentation (sensitivity of
outcomes to alternative structural constraints, new types
of institutions, alternative modes of behavior… )
54
On-Line Resources
 Overview Paper: Paul Borrill & Leigh Tesfatsion, “Agent-Based
Modeling: The Right Mathematics for the Social Sciences?,” in Elgar
Companion to Recent Economic Methodology, Edward Elgar, 2012
http://www2.econ.iastate.edu/tesfatsi/ABMRightMath.PBLTWP.pdf
 ACE Macroeconomic Research:
http://www2.econ.iastate.edu/tesfatsi/amulmark.htm
 ACE Website Homepage
http://www2.econ.iastate.edu/tesfatsi/ace.htm
 ACE Handbook: Leigh Tesfatsion & Kenneth L. Judd,
Handbooks in Economics Series, North-Holland, 2006
http://www2.econ.iastate.edu/tesfatsi/hbace.htm
55
56