David Ricardo's theory of comparative advantage, introduced in 1817, suggests that countries can still benefit from trade even if one is less efficient in producing all goods.