Skills

General Equilibrium Model Builder

Build and solve Walrasian general equilibrium models with theory derivations and Julia...

Install

npx skills add brycewang-stanford/Auto-Empirical-Research-Skills --skill general-equilibrium-model-builder -g -a claude-code -y
Category
Engineering
Updated
6d ago
License
See repository
Context cost
Mediumabout 3,000 tokens
Runs scripts
No, instructions only

What it does

Build and solve Walrasian general equilibrium models with theory derivations and Julia computation

General Equilibrium Model Builder

Purpose

This skill helps economists build, analyze, and numerically solve Walrasian General Equilibrium (GE) models. It covers both the theoretical foundations (existence, uniqueness, welfare theorems) and computational implementation in Julia for finding equilibrium prices and allocations.

Current Scope: Pure exchange economies (no production). Future versions will extend to production economies, Arrow-Debreu with uncertainty, and dynamic models.

When to Use

  • Theory Development: Formalizing a pure exchange GE model for a paper
  • Teaching: Creating examples for microeconomic theory courses
  • Computation: Numerically solving for equilibrium prices and allocations
  • Welfare Analysis: Evaluating Pareto efficiency and social welfare
  • Comparative Statics: Analyzing how equilibrium changes with parameters

Instructions

Step 1: Understand the Economic Environment

Before generating any model, ask the user:

  1. Number of goods ($L$): How many commodities in the economy?
  2. Number of consumers ($I$): How many agents?
  3. Preferences: What utility functions? (Cobb-Douglas, CES, Leontief, quasilinear)
  4. Endowments: What is each agent's initial endowment vector?
  5. Output format: Theory derivation, Julia code, or both?

Step 2: Set Up the Theoretical Framework

A pure exchange economy $\mathcal{E}$ is characterized by:

$$\mathcal{E} = \left{ (u^i, \omega^i)_{i=1}^{I} \right}$$

where:

  • $u^i: \mathbb{R}^L_+ \to \mathbb{R}$ is consumer $i$'s utility function
  • $\omega^i \in \mathbb{R}^L_+$ is consumer $i$'s endowment vector
  • $L$ is the number of goods
  • $I$ is the number of consumers

Consumer's Problem: Given prices $p \in \mathbb{R}^L_{++}$, consumer $i$ solves:

$$\max_{x^i \in \mathbb{R}^L_+} u^i(x^i) \quad \text{s.t.} \quad p \cdot x^i \leq p \cdot \omega^i$$

The solution yields the Marshallian demand $x^i(p, p \cdot \omega^i)$.

Read the whole SKILL.md on GitHub

More in Engineering