Theory for Long Memory in Supply and Demand