I am working on a time series that contains daily sales data over 2 and a half years. The aim of the project is to estimate the impact of marketing expenditure on the sales, while accounting for seasonality and trend.
I was planning on using Unobserved Components from the statsmodel package. My question is if the coefficients for exogenous factors are estimated together with the seasonality, trend and cycle components or if the exogenous factors are estimated on the residuals after subtracting the seasonality, trend and cycle?