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)

Monday, October 25, 2010

Slight PhD Research Detour...

My PhD research has taken a slight detour over the last couple of days.  In order to do theory I need to work with data, and there is just not a lot of publicly available data on financial networks at the moment.  So I decided that for the time being I am going to do some empirical research on trade networks using data from the UN Comtrade database

The inspiration for my research comes from the the following paper on the evolution of international trading networks.  The paper basically postulates that international trade is best described as a specific type of evolutionary system that satisfies the following three requirements:
  1. The dynamics of the international trade system are "slow" to respond to environmental change
  2. That environmental change is present
  3. Information is exchanged between agents in the system
The authors have studied this type of evolutionary system in previous research and two of their papers on the details of their evolutionary theory can be found here and here.  Their theory makes three specific predictions about the evolution of international trade networks:
  1. Decreased modular/hierarchical structure in the world trade network increases the sensitivity of the network to recessionary shocks
  2. Decreased modular/hierarchical structure decreases the rate of recovery from shocks
  3. Recessions (negative shocks) should spontaneously increase the modular/hierarchical structure in the trade network
According to the authors, all three of these predictions are borne out in the data...I am going to attempt to replicate their results.  Their theory implies that the modular/hierarchical structure that forms in response to environmental shocks (recessions) increases the resistance to and rate of recovery from shocks (recessions).  Globalization reduces modular/hierarchical structure in the global trade network and thus should lead to increasingly large recessions and a decreased rate of recovery from these recessions.

I have already written Python scripts to download the UN trade data and combine it into a single text file for use in the analysis.  I will be building an on-line code repository in the near future where people can come and download my code so that they can attempt to replicate MY results...

I would be interested in comments from readers concerning what standard economic theory I could bring to bear on this problem...I suspect that there is quite a bit of support for this line of research in more mainstream economics, but I could be wrong...

Sunday, October 24, 2010

Sage is Awesome!

I just started playing around with Sage this morning and am already hooked!  The pedagogic possibilities alone would make learning to use Sage worthwhile for economists...imagine a classroom where the lecturer was simultaneously plotting production possibility sets in 3D and then manipulating them as she chatted about returns to scale, diminishing marginal products, sunk costs, etc.

On the research end, Sage has most (if not all) of the functionality of MatLab, Mathematica, Magma, etc and because it is Python based it incorporates a large number of additional features absent from those other platforms...and it is totally free!

Friday, October 22, 2010

INET Grants...

INET grants have been announced (some time ago actually...)!  Take a look and see if any of the funded projects sound particularly interesting...while all of them sound interesting to me, one project in particular stands out...I will leave it to you to guess which one!

Python Related Activities...

Today I am debugging my code for power-law estimations...hopefully I will have working beta version by tonight!  If/when I do, I will post it somewhere for others to use...

Also, I downloaded Sage today...it will go on my list of things Python related things to learn.

Tuesday, October 19, 2010

Remiss on my Posting Again...

Teaching is hard work (and also quite time consuming)!  A quick update on my research, with more to follow later today...

For the last two weeks, I have been teaching myself how to program in Python.  I have now done a quick pass through tutorials for all of the major modules that I suspect I will be using:
  1. NumPy
  2. SciPy
  3. NetworkX
  4. PyGraphviz
  5. SymPy
  6. Matplotlib
  7. RPy2
 I now plan to double back and do more detailed work with each of the packages goals in mind.  The first thing I plan to do is implement the Clauset et al (2009) procedure to detect power laws in  empirical data using Python and then systematically apply the procedure to major economic variables.  The Clauset et al procedure relies on MLE and an iterative application of the Kolmogorov-Smirnov (KS) test to determine the threshold value above which the power law is a good model.  The authors are heavily critical of least-square approaches to fitting power laws to data and detail the issues with using such procedures.  Interestingly most empirical studies of power laws in economics (that I have seen) seem to use ad hoc least-squares approaches.

Whether the results of this study will be publishable or not I have no idea, but I think it would be very useful to have an understanding of which economic variables exhibit power law behavior, and which are simply heavy-tailed (i.e., log-normal or something else)...if nothing else I will add a new tool to my arsenal that has significant practical applications...

Saturday, October 16, 2010

A Great Loss...

Benoit Mandelbrot died today...a great light has gone out...Such an intellect comes only a few times each generation.  He was a truly original thinker, and one of my role models...

He will be truly missed.

Tuesday, October 12, 2010

The Aonach Eagach...

First major hill-walking trip of the year to Glencoe this past weekend.  A group of us tackled the Aonach Eagach Ridge on the north side of Glencoe...here is map of the hike:

The ridge is composed of two Munros and two tops and the hike is rated as a Grade-II scramble (which I would say is a fair assessment of the difficulties).  I have climbed Liathach in Torridon (another Grade II) before and I would rate the Aonach Eagach ridge to be more difficult/interesting scrambling than Liathach.

Though things started out cloudy, by the time the group reached the scrambling section the weather was excellent.  I was even able to grab a picture of a Brocken Spectre...


I will add some more photos once I have a chance to get more from friends...my next post will detail my ill-fated hike the next day up the Ballachulish Horseshoe...

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

Sunday, October 3, 2010

4th Cooked Breakfast of the Year...

Deacon Brodie's...coffee was terrible but the full Scottish breakfast was excellent!  Definitely the best I have had so far...and it was relatively cheap (about 7 GBP).   Breakfast included 2 rashers of bacon, 2 sausages, large portion of Haggis, beans, fried egg, potato scone, plum tomato, two large mushrooms, and crusty bread.  I would highly recommend it...

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...