Demand, Markups and the Business Cycle. Bayesian Estimation and Quantitative Analysis in Closed and Open Economies