The phrase is commonly ascribed to Ricardo, but it doesn't occur in any if his works.