PPolySim OS
For Students · Comparative Advantage

Comparative Advantage for a demand shock

Built for students learning it for a class or exam. See the concept move instead of memorizing formulas — and check your homework intuition. Simulate a demand shock live below — adjust the inputs and watch it respond, right in your browser.

Comparative AdvantageLive

Controls

Presets

David Ricardo's great insight: even if one country is worse at making everything, both still gain from trade. Each should specialize in the good it gives up the least to produce — its comparative advantage — measured by the slope of its production-possibility frontier. Trade then lets both consume beyond their own frontiers.

▶ Run in Python

Data Inspector

A opp. cost (wine)0.50 cloth
B opp. cost (wine)2.00 cloth
A should makewine
B should makecloth

Governing equation

Reading this result: Country A gives up 0.50 cloth per wine versus B at 2.00, so A specializes in wine and B in cloth — trade then lets both consume beyond their own frontiers.

Runs locally in your browser — free forever. Scale to the cloud when reality gets heavy.

or unlock everything with Pro →

More with Comparative Advantage

Frequently asked questions

Is this good for students?
Yes — this version of "Comparative Advantage for a demand shock" is framed for students learning it for a class or exam. See the concept move instead of memorizing formulas — and check your homework intuition.
Do I need to install anything?
No. It runs in any modern browser, free, with no account required.