From Smith to Simulation

Computing the Ideas that Built Economics

The University of Edinburgh · School of Economics

Instructor: Dr Juan Zurita


Course description

Edinburgh gave the world Adam Smith, David Hume, and the intellectual tradition that became modern economics. This course traces that journey — from the moral philosophy of the Scottish Enlightenment to the computational models that drive policy today — and asks students to build each idea in code.

Each week pairs a turning point in the history of economic thought with a hands-on computational exercise. Students read Smith on the invisible hand, then write the code that finds a market equilibrium. They study Keynes on the Great Depression, then simulate the fiscal multiplier. They learn how Solow formalised growth theory, then solve for steady states numerically. No prior programming experience is assumed; Python and the necessary numerical tools are taught as we go.

The result is a course that is simultaneously a history of ideas and an introduction to computational economics — each side making the other more vivid.


Learning outcomes

By the end of this course, students will be able to:

  1. Explain the key ideas and debates that shaped economics from Smith to the present day, placing each in its historical and intellectual context.
  2. Write Python programs that formalise and explore classical economic models (equilibrium, growth, business cycles, inequality).
  3. Use numerical methods — root-finding, optimisation, simulation — to investigate questions that the original thinkers could only reason about verbally.
  4. Critically assess how mathematical formalisation changes (and sometimes distorts) the original economic argument.
  5. Connect Edinburgh’s intellectual heritage to the practice of modern economics.

Assessment

Component Weight Description
Weekly quizzes 20% Short quizzes (conceptual + computational) released each week
Computational essays (×2) 40% Take a historical debate, build a model, write up the argument
Final project 30% Choose an economist or idea not covered in class; build and present the model
Participation 10% Lab attendance and engagement

Prerequisites

None beyond curiosity. The course assumes no prior programming and no economics beyond what you already know from reading the news. Mathematics is kept to algebra; anything beyond that is handled by the computer.


Weekly schedule


Week 1 — The Invisible Hand: Adam Smith and Market Equilibrium

Historical context. The Scottish Enlightenment. Smith’s life in Edinburgh and Kirkcaldy. The Wealth of Nations (1776) and the idea that self-interest, channelled through markets, produces social order without a planner.

Computational exercise. Supply and demand as functions. Excess demand. Finding equilibrium with scipy.optimize.fsolve. What happens when the government sets a price floor?

Reading. Smith, Wealth of Nations, Book I, Chapters 1–7 (selections). Heilbroner, The Worldly Philosophers, Ch. 3.

Edinburgh connection. Smith studied at Edinburgh under Francis Hutcheson’s moral philosophy tradition; Hume was his closest intellectual companion. The Old Town’s markets and trade networks were the world Smith observed.


Week 2 — The Division of Labour and the Pin Factory

Historical context. Smith’s famous pin factory example. Specialisation, productivity, and the extent of the market. Why nations trade.

Computational exercise. Simulating production with and without specialisation. Comparative advantage with two goods and two countries. Computing gains from trade.

Reading. Smith, WN, Book I, Chapters 1–3. Ricardo, Principles, Chapter 7 (on foreign trade).


Week 3 — Malthus, Ricardo, and the Limits to Growth

Historical context. Malthus’s Essay on Population (1798): geometric population growth vs arithmetic food growth. Ricardo on diminishing returns and the distribution of income between workers, landlords, and capitalists. Why classical economists were called “dismal.”

Computational exercise. Coding the Malthusian model: population dynamics, subsistence wages, the Malthusian trap. Simulating what happens when productivity improves — does the economy escape?

Reading. Malthus, Essay on Population, Chapter 1. Clark, A Farewell to Alms, Ch. 1–2.


Week 4 — Marx and the Machinery Question

Historical context. The Industrial Revolution. Marx’s critique of capitalism: surplus value, exploitation, and the tendency of the rate of profit to fall. The “machinery question” — does technology help or hurt workers?

Computational exercise. A simple model of capital accumulation and labour share. Simulating how the labour share of income evolves when firms invest in capital. Plotting historical labour share data.

Reading. Marx, Capital, Vol. I, Chapters 1, 7, 15 (selections). Heilbroner, The Worldly Philosophers, Ch. 6.


Week 5 — The Marginalist Revolution: Choosing at the Margin

Historical context. The 1870s revolution: Jevons, Menger, and Walras independently develop marginal utility theory. Economics shifts from class-based analysis to individual optimisation. Marshall synthesises it all.

Computational exercise. Consumer optimisation: maximising utility \(u(x_1, x_2)\) subject to a budget constraint. Solving with scipy.optimize.minimize and constraints. Deriving demand curves computationally.

Reading. Backhouse, The Penguin History of Economics, Ch. 7. Jevons, Theory of Political Economy, Chapter 3 (selections).


Week 6 — Keynes and the Great Depression

Historical context. The 1929 crash and the failure of classical remedies. Keynes’s General Theory (1936): aggregate demand, the paradox of thrift, the multiplier, animal spirits. Why governments should spend in recessions.

Computational exercise. The Keynesian cross and the IS curve. Computing the fiscal multiplier numerically. Simulating how changes in confidence (animal spirits) propagate through the economy.

Reading. Keynes, General Theory, Chapters 1–3, 10 (selections). Skidelsky, Keynes: A Very Short Introduction, Chapters 3–4.

Edinburgh connection. Keynes’s debates with the “Edinburgh school” of classical economists who resisted his ideas.


Week 7 — Solow and the Sources of Growth

Historical context. Post-war prosperity and the question: where does growth come from? Solow’s model (1956): capital accumulation, diminishing returns, and the steady state. The “residual” — technology as the real engine of growth.

Computational exercise. Coding the Solow model. Finding the steady state with root-finding. Comparative statics: what happens when saving rates, depreciation, or productivity change? The Golden Rule.

Reading. Solow, “A Contribution to the Theory of Economic Growth” (1956), first 5 pages. Warsh, Knowledge and the Wealth of Nations, Ch. 1–3.


Week 8 — Friedman, Lucas, and the Expectations Revolution

Historical context. Stagflation and the collapse of the Phillips curve. Friedman’s monetarism and the natural rate. Lucas’s rational expectations: why systematic policy can’t fool people. The end of old-style Keynesianism.

Computational exercise. Simulating AR(1) processes for inflation and output. Coding adaptive vs rational expectations. Showing how an expected policy change has no real effect under rational expectations.

Reading. Friedman, “The Role of Monetary Policy” (AER, 1968). Lucas, “Econometric Policy Evaluation: A Critique” (1976), introduction.


Week 9 — Inequality and Heterogeneous Agents

Historical context. Piketty and the return of inequality to economics. The Aiyagari model: identical people, different luck, endogenous inequality. Why some households accumulate wealth and others don’t.

Computational exercise. Simulating income processes with Markov chains. Computing stationary wealth distributions via Monte Carlo. Plotting Lorenz curves and computing Gini coefficients.

Reading. Piketty, Capital in the Twenty-First Century, Introduction. Deaton, The Great Escape, Ch. 1.


Week 10 — Edinburgh’s Legacy: From Moral Philosophy to Computational Economics

Historical context. Full circle: from Hume and Smith’s empirical moral philosophy to modern computational economics. How the Scottish Enlightenment’s emphasis on evidence, scepticism, and systematic thinking laid the groundwork for quantitative social science. Where the field is going: climate economics, AI, and the new frontiers.

Computational exercise. Student presentations of final projects. A group exercise: can Smith’s “invisible hand” result survive when we add real-world frictions (information asymmetry, externalities, market power)?

Reading. Broadie, The Scottish Enlightenment, selected chapters. Sen, “Rational Fools” (1977).


Software

All coding is done in Python via Jupyter notebooks. No installation required — we use Google Colab in class. Students wanting a local setup should install Anaconda.


“The real voyage of discovery consists not in seeking new landscapes, but in having new eyes.” — Marcel Proust

…or in having new code.