Blog Topics...

3D plotting (1) Academic Life (2) ACE (18) Adaptive Behavior (2) Agglomeration (1) Aggregation Problems (1) Asset Pricing (1) Asymmetric Information (2) Behavioral Economics (1) Breakfast (4) Business Cycles (8) Business Theory (4) China (1) Cities (2) Clustering (1) Collective Intelligence (1) Community Structure (1) Complex Systems (42) Computational Complexity (1) Consumption (1) Contracting (1) Credit constraints (1) Credit Cycles (6) Daydreaming (2) Decision Making (1) Deflation (1) Diffusion (2) Disequilibrium Dynamics (6) DSGE (3) Dynamic Programming (6) Dynamical Systems (9) Econometrics (2) Economic Growth (5) Economic Policy (5) Economic Theory (1) Education (4) Emacs (1) Ergodic Theory (6) Euro Zone (1) Evolutionary Biology (1) EVT (1) Externalities (1) Finance (29) Fitness (6) Game Theory (3) General Equilibrium (8) Geopolitics (1) GitHub (1) Graph of the Day (11) Greatest Hits (1) Healthcare Economics (1) Heterogenous Agent Models (2) Heteroskedasticity (1) HFT (1) Housing Market (2) Income Inequality (2) Inflation (2) Institutions (2) Interesting reading material (2) IPython (1) IS-LM (1) Jerusalem (7) Keynes (1) Kronecker Graphs (3) Krussel-Smith (1) Labor Economics (1) Leverage (2) Liquidity (11) Logistics (6) Lucas Critique (2) Machine Learning (2) Macroeconomics (45) Macroprudential Regulation (1) Mathematics (23) matplotlib (10) Mayavi (1) Micro-foundations (10) Microeconomic of Banking (1) Modeling (8) Monetary Policy (4) Mountaineering (9) MSD (1) My Daily Show (3) NASA (1) Networks (46) Non-parametric Estimation (5) NumPy (2) Old Jaffa (9) Online Gaming (1) Optimal Growth (1) Oxford (4) Pakistan (1) Pandas (8) Penn World Tables (1) Physics (2) Pigouvian taxes (1) Politics (6) Power Laws (10) Prediction Markets (1) Prices (3) Prisoner's Dilemma (2) Producer Theory (2) Python (29) Quant (4) Quote of the Day (21) Ramsey model (1) Rational Expectations (1) RBC Models (2) Research Agenda (36) Santa Fe (6) SciPy (1) Shakshuka (1) Shiller (1) Social Dynamics (1) St. Andrews (1) Statistics (1) Stocks (2) Sugarscape (2) Summer Plans (2) Systemic Risk (13) Teaching (16) Theory of the Firm (4) Trade (4) Travel (3) Unemployment (9) Value iteration (2) Visualizations (1) wbdata (2) Web 2.0 (1) Yale (1)
Showing posts with label ACE. Show all posts
Showing posts with label ACE. Show all posts

Tuesday, November 23, 2010

Computational Model of Trade...

Just need to jot down the specifics of an idea I had about a computational model of trade with endogenous network formation...

The world consists of an exchange economy with N agents arranged in a circle.  Each agent is described by the following parameters:
  1. Parameter, r~U[0,1] describing their level of risk aversion.
  2. Parameter, v~U[a,b] describing their vision.  This vision parameter tells how many agents to the left and right are in an agents neighbourhood.  Vision could also be the same fixed v for all agents to simplify things.  Assume that agent's have perfect information about the endowments etc of all other agents in their neighbourhood/vision.
  3. Each agent is endowed with some amount of two goods sugar and spice.  Endowments could be distributed uniform on some interval.
  4. Agent have the same utility function which takes the amount of sugar and spice as arguments, and also must include risk aversion somehow.  I am open to suggestions as to what utility function would be most appropriate.
Agents would then have to decide whether or not to trade (if they wanted to trade at all) at "home" within their neighbourhood/vision or "abroad" by linking up with some other agent about which they know nothing (except the distributions of risk aversion, vision, etc.).  Of interest to me are the following...
  1. Do agents with higher levels of risk aversion trade at home more often? Do agents with less risk aversion trade abroad more often?
  2. What type of trade networks evolve through this process? Network structure within time steps and network structure aggregated across time steps would be of interest.
  3. What are the equilibrium properties of such a model?  Is there meaningful convergence?  If so, how fast?  Is the equilibrium Pareto efficient/Pareto optimal?
I wrote this down very fast, and no doubt left out details necessary to close the model, but I thought I better write it down lest I forget...

Tuesday, October 5, 2010

Sound Familiar...

For any readers who happen to be interested in economics take a look at the following article on Wikipedia...sound familiar?

I came across a reference to the "ecological fallacy" in Daniel Katz's slides on Schelling's segregation model...

For Those Interested in ABM...

I came across an excellent set of lecture slides from Daniel Katz at Michigan on computational modeling for social sciences, and for those interested in NetLOGO there are an excellent set of introductory tutorials on Youtube

Friday, October 1, 2010

Goldmine of Information on using Python in Social Sciences...

I came across this gem of a post on Zero Intelligence Agents while waiting for Business School IS support to install Python, NetLOGO, and R onto my office computer...

Wednesday, September 8, 2010

Interesting MTG with Informatics Profs...

I just had a very interesting discussion about my research agenda and the possibility of pursuing a significant portion of my PhD work through the School of Informatics.  The profs I spoke with were very excited about my research agenda, as it overlapped significantly with some of their own work.  They also pointed me towards courses on networks and agent-based modelling that start in a few weeks that I will be able to take...

Monday, August 30, 2010

Computational Modeling...

A nice simple set of lecture slides on computational modeling in the social sciences by Ken Kollman at Michigan (although I have to admit that the uninitiated will probably not find them terribly informative)...also I will have limited to no internet this week...expect fewer than normal posts.

Posting will resume apace from Edinburgh next Monday...

Wednesday, August 18, 2010

The Hidden Hazards of Adaptive Behavior...

James passed me this interesting paper on the stability of multivariate systems where agents use adaptive behavior via email.  I did a quick read...heavy on the maths (although I think it is mostly just multivariate calculus and linear algebra). They also went all out on the notation...I haven't seen some of those symbols outside of formal advanced maths texts. It would take quite a bit of work for me to fully grasp the paper as I would need to follow through on the calculations etc. Although plowing through the maths would be a good refresher...

I think his (i.e., James') characterization of the paper in the email is pretty much on target. They seem to formally develop general conditions under which multivariate systems with adaptive expectations are not stable. They find that for the most part, such systems are not stable.  And they stress that their results provide further evidence that equilibrium stability results from models where homogeneous agents are using adaptive behavior (or that are otherwise one-dimensional) should not be generalized to high dimensional or heterogeneous agent models where agents are using adaptive behavior.  The study of multivariate (and heterogeneous agent) systems, would seem to be a study in disequilibrium behavior...

Their results support the other research on multivariate and complex adaptive systems that I have read. From my reading of the literature, multivariate systems (including heterogeneous agent systems), generally speaking, are not stable.  At least in the sense that it is rare that such complex systems settle down to some static equilibrium.  On the other hand many multivariate and complex adaptive systems do exhibit endogenous self-organizing behavior (which I like to think of as a type of stable disequilibrium behavior...although this may not be the best choice of words to capture the phenomenon), punctuated equilibrium dynamics, etc.

The more I learn about economics, the more I am becoming convinced that economics is not an equilibrium science.  Economics is fundamentally a science of disequilibrium behavior.  I will go out on a limb here and say that perhaps one of the reasons that economics, particularly macroeconomics, has struggled so much is because we as economists are trying to force our (for the most part) linear equilibrium models to describe a non-linear disequilibrium world...

There is also the (I'd like to think small) possibility that I am cocooned in a world of complex adaptive systems, and am suffering from a massive case of confirmation bias...

Thursday, August 12, 2010

1st Year of my PhD (A Rough Outline)...

As my PhD studies approach I have been thinking about how best to structure my first year to make sure that it is in line with my overall PhD agenda.  Here is my first attempt:

1st Year Topic of Focus: Formation of Credit Networks

Need to build at least two small-scale, analytically tractable models (i.e., solvable via pen & paper)of credit network formation.  Goal is to build intution and gain a deeper understanding of how credit effects network incentives.  There are two main approaches to explore:
  • Traditional utility-based approach to credit network formation.  Analysis will rely heavily on game threory.  Equilibrum concept will be some version refinement of Nash.  Work will rely heavily on previous research by Jackson, Goyal, Vega-Redondo, et al.
  • Random network approach to credit network formation.  Relies heavily on research done by Jackson, Barabasi and Albert, et al.  Analytical techniques borrow heavily from statistical physics.
Need to begin building simple agent-based computational models of credit network formation.  Starting point will be Axtell and Epstein's model of emerging credit networks from Growing Artificial Societies.  Other more advanced models will be considered for year's two and three.
  • I will need to establish relationships with the School of Informatics in order to develop my programming skills to the point where I can write and compile my own code.  Programming is especially important as I will be applying to the Sante Fe Institute's Summer School in 2011.
  • Also I need to continue to develop my EVT skills.  Much of this can actually be done in conjunction with my responsibilities as a QM tutor and TA.
These 1st-year objectives fit nicely into my overall PhD agenda which starts with network formation, then moves to diffusion of credit/liquidity over the networks, and then finishes (ideally) with a detailed dynamic computational model that ties everything together.  In addition to increasing my understanding of economic theory, I want to finish my PhD with significant computer programming skills.  These skills should be sufficient to build complex computational models of network formation that could be used to address policy issues.

Wednesday, August 11, 2010

Sugarscape Resources...

I am currently working on a slide deck that I plan to use to teach an introductory course in agent-based computational modeling based on Axtell and Epstein's Growing Artificial Societies: Social Science from the Bottom Up (Complex Adaptive Systems). 

Below are a list of resources that I have compiled so far for anyone that is interested:
  1. Sugarscape: Netlogo JAVA implementations of Sugarscape models.  This implementation has pre-programmed defaults that re-create the animations from Growing Artificial Societies.  Also includes some basic documentation and references for those interested in more detail.  Drawbacks: I have yet to figure out how to export data generated by the models.  I believe it can be done by downloading the Netlogo tool (as opposed to just running the model in a web-browser), but I have not had time to do this yet.
  2. A nice tutorial from the University of Leicester
  3. ASCAPE modeling software: JAVA ABM software created by Brookings et al.  In addition to implementing a number of well-known ABMs the software allows users to write, compile, and run their own models.  Also has the ability to export model-generated data for analysis...which is obviously crucial.
  4. Modeling software from University of Oxford that implements Sugarscape.
  5. Related papers: Horres and Gore
I will return to add more resources as I identify them.  I will also post the slide deck as soon as I have completed the first draft...

Friday, August 6, 2010

People at NBER are writing portions of my PhD dissertation...

The title says it all...see the NBER paper here...be warned it is dense! For a more whimsical discussion follow this link.

The University of Essex is doing interesting things...

The Centre for Computational Finance and Economic Agents at the University of Essex is doing really interesting work applying large scale agent-based computational modeling to study contagion and systemic risk in the financial sector.  The work they have done is highly relevant to what I am hoping to accomplish as part of my PhD research...particularly in year 3 where I hope to build a computational model that ties all of my research on the diffusion of liquidity and the evolution of networks together.

Wednesday, August 4, 2010

Thomas Schelling's Segregation Model...

I am beginning to put together some notes, models, and slides that could be used to teach Economics 101 complexity style.  My goal is to come up with material that could be taught to enterprising first year undergraduates...

Lesson One: Micromotives and Macrobehavior...
  • People interacting with one another using simple decision rules can generate complex behavioral patterns for society as a whole.  
  • Use Thomas Schelling's segregation model from 1978 to demonstrate the point
  • A nice Java version of the his model can be found here
  • The key parameter to play with is the minimum percent of neighbors that an individual prefers to be of the same type as himself (i.e., red, green, poor, rich, smart, dumb...whatever)
If you play around with the Java applet, set the percent similar to 40% (i.e., an individual is willing to tolerate a majority (up to 60%) of the "other" type) and see what happens...hint: it's not called the segregation model for nothing!

What does this teach first year undergraduates about economics?  I would say a several important things:
  1. Economics is a social science: People interact in more ways than simply through the price vector.  People interact with one another over time and space, and these interactions are often important determinants of macro behavior. 
  2. Dynamics are an important if one seeks to understand economic behavior.
  3. Simple behavioral rules at the micro level can engender quite complex, and in this case unintended, behaviors at the macro level.
  4. Related to point 3, aggregation in social systems can be tricky business!
There are probably better ways to formulate these points/make them simpler by not using so much jargon...will have to work on that...comments/criticsim is much appreciated!

Tuesday, August 3, 2010

Complex Systems Paper of the Day...

Ashraf et al. " Banks, Market Organization, and Macroeconomic Performance: An Agent Based Approach."  Following an excellent suggestion from James, this is my first attempt to dig out a simple agent-based model that would be a useful alternative to DSGE.  C++ code used in the model can be found here.  As mentioned by the authors this model is still probably too stylized too be useful for policy...but for now I am going to try to err on the side of simplicity and then look to build towards more policy oriented models.  See abstract below...
"This paper is an exploratory analysis of the role that banks play in supporting what Jevons called the mechanism of exchange. It considers a model economy in which exchange activities are facilitated and coordinated by a self-organizing network of entrepreneurial trading firms. Collectively these firms play the part of the Walrasian auctioneer, matching buyers with sellers and helping the economy to approximate equilibrium prices that no individual is able to calculate. Banks affect macroeconomic performance in this economy because their lending activities facilitate entry of trading firms and also influence their exit decisions. Both entry and exit have conflicting effects on performance, and we resort to computational analysis to understand how these conflicting effects are resolved. Our analysis sheds new light on the conflict between micro prudential bank regulation and macroeconomic stability; under some circumstances the economy performs better when bank regulation pays less attention to micro prudence (ie when capital adequacy ratios are lower and allowable loan-to-value ratios are higher). Related to this, the analysis draws an important difference between "normal" performance of the economy and "worst-case" scenarios; the micro prudence conflicts with macro stability only in the worst-case scenarios."
 This is the first of many attempts to find the right paper or combination of papers...so if this doesn't fit your fancy...don't worry I will find others...

Monday, August 2, 2010

Interesting Congressional Testimony...

Congressional Testimony by David Colander, Scott Page, Sidney Winter, and V.V. Chari on "Building a Science of Economics for the Real World" (Robert Solow also testified as a part of this panel, and his testimony on DSGE's was the subject of a previous post).  Solow, Colander, Page, and Winter discourage the sole use of DSGE models AND provide viable alternatives...Chari's testimony in defense of DSGE's as the ONLY acceptable macroeconomic modeling strategy is ridiculous.  Chari fails to address the two major criticisms of the DSGE framework raised by the other panel members:
    1. DSGE models ignore agent interactions which are crucial if one cares about aggregate macroeconomic dynamics, and
    2. DSGE models ignore meaningful heterogeneity (to my knowledge the only types of heterogeneity that DSGE models incorporate are ex post random differences in agent endowments and shocks.  Ex ante all agents are identical.) 
To be honest, Chari's counter-agruments indicate to me that he is not at all familiar with the literature on the complex systems approach to economics (which is what he is defending DSGE's against in this panel).  Unfortunately this lack of familiarity is all too common within the profession...

Thursday, July 15, 2010

The Limits of Behavioral Economics...

An interesting op-ed by George Loewenstein in the NYT today on the limits of behavioral economics.  The timing is interesting as I have been thinking about this issue ever since I read Rajiv Sethi's post on the topic a couple of days ago (incidentally, he has now written a follow-up piece).

When I finished my MSc I had a very poor opinion of the rational actor model.  I had just read the reading material for Xavier Gabaix's behavioral economics course at MIT, and was enthralled with the work being done in the area...it seemed so much more advanced and relevant than what I had been taught in graduate school.

Now, however, I am starting to appreciate the rational actor model a bit more.  Don't get me wrong, I think that the rational actor model abstracts from the well documented cognitive biases that human beings exhibit when making decisions.  But I do not think that every economic puzzle can be explained by "irrational" behavior on the part of decision makers.

I am starting to think that the major flaw with the neoclassical (as well as the new-Keynesian) paradigm is that it relies on general equilibrium.  Many aggregate/macro economic behaviors that behavioral economists tend to explain using some model that relies on some type of agent irrationality might also be explained by locally rational agents interacting directly with one another...   

This is a really poorly written post...apologies...it is however a post that I think is on the right track...I just need to figure out a better way to formulate the argument...actually on second thought don't read this post! Read the new post by Rajiv Sethi that I linked to above.  He does a much better job... 

Tuesday, July 13, 2010

Complex Systems Paper of the Day...

I have not had the chance to browse this PhD dissertation entitled "Agent-Based Keynesian Macroeconomics".  The intro, however, contains an excellent literature review of applications (both existing and potential) for agent-based modeling in macroeconomics.

I will continue to post my comments on the thesis once I get a chance to read through it in greater detail.  I have high hopes...

Monday, July 12, 2010

Complex Systems Paper of the Day...

And today's winner is...

"The Emergence of Firms in a Population of Agents: Local Increasing Returns, Unstable Nash Equilibria, And Power Law Size Distributions"

The paper is long and demanding, but lays out an early (circa 1999) complex systems theory of the firm.  The author relates the complex systems approach to the classical literature on the theory of the firm, outlines his agent-based computational model in detail, and then discusses whether or not the model's predictions concerning various aggregate distributions of firm size, firm growth rates, etc are born out empirically (they are!)

A nice summary paragraph taken from the intro:
"Firms form in the model due to the increasing returns [to agent cooperation at the local level], but, since agents are constantly adjusting their effort levels, large firms are not stable. This is because once a firm becomes large each agent's share is only weakly related to its effort level, and so free-riding sets in. Agents eventually move out of firms "infected" with free riders. Exit decisions are, therefore, also endogenous. It is demonstrated analytically that there do not exist stable equilibria in this environment. Furthermore, it is argued that the nonequilibrium regime provides greater welfare for the agents than would equilibrium even if it were stable. An agent-based computational model is used to study the non-equilibrium dynamics, in which firms are perpetually born, growing and perishing. After an initial transient period there results stationary distributions of firm size (by both number of employees and output) and growth rate. Firm size follows a scaling (power law) distribution, in accord with empirical data.  In fact, for certain parameterizations the power law exponent estimated from the model data is similar to that for U.S. firms. In contrast to increasing returns at the firm level constant returns obtain at the macro-level. The computational model generates empirically testable patterns and regularities, about which there seem to be very little data, such as the distribution of firm lifetimes. Finally, there is a sense in which the model supports the idea that intra-firm cooperation between agents is a by-product of inter-firm competition for agents."
Excellent and insightful paper that outlines a different approach to the theory of the firm.  Those who are interested in leanring more about applying techniques to analyze disequilibrium economic behavior (or those who are just interested in disequilibrium economics generally) will want to read this paper... 

Friday, July 9, 2010

Greatest Hits, Intro...

A good friend of mine (who happens to also be studying for his PhD in economics) recently posed the following question to me via email:
"What do you think have been the 5 or 10 greatest substantive contributions (i.e. not just discussions of methodology) of complex systems theory to economics so far?"
An excellent question!  For those readers of this blog (if there are any at this point) who are not familiar with/sceptical of the complex systems approach to economics, these 5-10 greatest hits will serve as a nice anchor/point of departure. 

This post will be a work in progress...to get things started, I would like to direct your attention to a nice slide deck on Agent-Based Computational Economics (ACE) by Leigh Tesfatsion at Iowa State.  I am going to try to avoid commenting further on methodological issues, but the majority of the results that I will discuss will likely use some form of agent-based modelling, so it is worthwhile to have some knowledge of these methods.  For those interested in a deeper discussion of ACE, I would refer you here.