Economic theory and tooling

Axioma

Interactive visualizations of canonical economic theorems.

Summary

Axioma is a static single-page application that renders 49 canonical economic theorems as interactive visualizations. Each theorem page pairs a formal statement with a live Plotly chart, parameter sliders, a short derivation, and references. The catalog spans trade, macroeconomics, microeconomics, game theory, and finance, all served from a single typed template.

What it is

Axioma is the economic theorem visualization platform built for teaching, reference, and exploration. The catalog covers 49 theorems organized into five domains: trade (9), macro (11), micro (10), game theory (10), and finance (9). Every theorem is implemented as a typed configuration with declared parameters, a pure compute function, a chart specification, LaTeX math, and a written explanation. A single TheoremPage template consumes these configs, which keeps the user experience uniform and the addition of new theorems mechanical.

The home page supports search and domain filters, with state synced to the URL via query parameters so links remain shareable. Each theorem page renders a Plotly chart that responds in real time to slider input, a KaTeX-rendered derivation, and a citations block that grounds every formula in a canonical source. The compute layer is deterministic, with no fetches, randomness, or side effects, which keeps results reproducible and unit-testable. Forty-seven Vitest unit tests assert closed-form values, comparative statics, and error branches, while 52 Playwright smoke tests exercise the home page and every theorem route against a fresh production build. The result is a reference site where users can manipulate the assumptions of Ricardo, Solow-Swan, Nash, Black-Scholes, and other foundational results, see the comparative statics move on screen, and trace each formula back to the original literature.

Methodology

  • 49 canonical theorem pages, each implemented as a typed Theorem config consumed by a single TheoremPage template.
  • Trade catalog (9): Ricardo, Heckscher-Ohlin, Stolper-Samuelson, Rybczynski, Factor Price Equalization, Gravity, Lerner symmetry, Specific factors, Small-country tariff.
  • Macro catalog (11): Solow-Swan, IS-LM, Ramsey-Cass-Koopmans, Harrod-Domar, Golden Rule, OLG saving, Taylor rule, Mundell-Fleming, Phillips curve, AD-AS, Money multiplier.
  • Micro catalog (10): Consumer optimum, Edgeworth box, Monopoly pricing, Slutsky, Roy identity, Shephard, Hicksian demand, Welfare theorems, Pigouvian tax, Third-degree price discrimination.
  • Game theory catalog (10): Nash 2x2, Arrow, Cournot, Bertrand, Stackelberg, Minimax zero-sum, Bayesian, Subgame perfect, Shapley value, VCG.
  • Finance catalog (9): CAPM, Black-Scholes, Mean-variance frontier, APT, Modigliani-Miller, Merton bond discount, Put-call parity, Macaulay duration, Nelson-Siegel yield curve.
  • Pure compute() functions per theorem with no fetches, no randomness, no side effects, validated by 47 Vitest unit tests.
  • Shareable URL state for search and domain filters, plus 52 Playwright E2E smoke tests across home and every theorem route.

Data sources

  • Canonical trade and international economics references (Ricardo, Heckscher, Ohlin, Samuelson, Mundell, Fleming).
  • Macroeconomic growth and monetary theory references (Solow, Swan, Ramsey, Cass, Koopmans, Taylor, Phillips).
  • Microeconomic theory references (Slutsky, Roy, Shephard, Pigou, welfare theorems literature).
  • Game theory primary sources (Nash, Arrow, Cournot, Bertrand, Stackelberg, Shapley, Vickrey-Clarke-Groves).
  • Finance and asset pricing references (Sharpe CAPM, Black-Scholes, Markowitz, Ross APT, Modigliani-Miller, Merton, Nelson-Siegel).

Deliverables when used in engagements

  • Production SPA at axioma.deluair.com with 49 interactive theorem pages.
  • Searchable, filterable theorem catalog with shareable URL state.
  • Per-theorem parameter sliders, Plotly charts, LaTeX derivations, and citations.
  • Test suite of 47 unit tests and 52 E2E smoke tests covering every route.
  • Reproducible deploy pipeline via deploy.sh with DRY_RUN rehearsal mode.