Escribano, ÁlvaroWang, DandanUniversidad Carlos III de Madrid. Departamento de Economía2020-06-042020-06-042020-06-042340-5031https://hdl.handle.net/10016/30557The use of machine learning (ML) models has been shown to have advantages over alternative and more traditional time series models in the presence of big data. One of the most successful ML forecasting procedures is the Random Forest (RF) machine learning algorithm. In this paper we propose a mixed RF approach for modeling departures from linearity, instead of starting with a completely nonlinear or nonparametric model. The methodology is applied to the weekly forecasts of gasoline prices that are cointegrated with international oil prices and exchange rates. The question of interest is whether gasoline prices react asymmetrically to increases in oil prices rather than to decreases in oil prices, the "rockets and feathers" hypothesis. In this literature most authors estimate parametric nonlinear error correction models using nonlinear least squares. Recent specifications for nonlinear error correction models include threshold autoregressive models (TAR), double threshold error correction models (ECM) or double threshold smooth transition autoregressive (STAR) models. In this paper, we describe the econometric methodology that combines linear dynamic autoregressive distributed lag (ARDL) models with cointegrated variables with added nonlinear components, or price asymmetries, estimated by the powerful tool of RF. We apply our mixed RF specification strategy to weekly prices of the Spanish gasoline market from 2010 to 2019. We show that the new mixed RF error correction model has important advantages over competing parametric and nonparametric models, in terms of the generality of model specification, estimation and forecasting.engAtribución-NoComercial-SinDerivadas 3.0 EspañaForecasting Gasoline PricesRockets And Feathers HypothesisCointegrationNonlinear Error CorrectionMachine LearningRandom ForestMixed Random ForestForecasting gasoline prices with mixed random forest error correction modelsworking paperB23C24C52C53D43L13L71DT/0000001759