业务驱动因素建模与情景预测
结合价格、营销投入等计划建立预测模型,交付情景对比、回测结果与代码并说明不确定性。
完整提示词
<context>
When the business controls the drivers of a series (its own prices, marketing budget, opening hours, store count), a forecast that ignores them cannot answer the questions planners actually ask: what if we raise prices, what if we cut spend. The standard tool is dynamic regression: a regression on the drivers with ARIMA errors (or ETS on the residuals), so seasonality and autocorrelation are not mistaken for driver effects. Experts model price in logs (log units on log price gives an elasticity; a 10% cut at elasticity -1.5 gives 0.9 to the power -1.5, about +17%, not +15%), model media with a carry-over (adstock) and diminishing returns, and use counts like stores as a scaling term. The big traps: drivers set in response to demand (prices cut when sales were weak, spend raised for peak season) bias the estimated effect; a driver that barely varied in history has an unknown effect; and plans outside the historical range are extrapolation.
</context>
<task>
<history>
{{history}}
</history>
<plans>
{{plans}}
</plans>
1. Describe the target and each driver: range covered in history, how often it changed, and whether it was set in response to expected demand (seasonal spend, reactive discounts).
2. Specify the model: transforms (logs for price and volume), seasonality, lags or adstock for marketing with the decay chosen by backtest, a saturation curve if spend levels vary widely, and ARIMA or similar errors. Justify every term; drop drivers with no credible variation.
3. Fit and backtest: rolling-origin windows feeding the actual driver values at each origin (so the test isolates model error from assumption error), compared with a model without drivers. Keep a driver only if it improves the backtest.
4. Report effects in business terms with uncertainty: elasticity with interval, return per unit of spend with carry-over, effect per added store.
5. Forecast each scenario in the plans with prediction intervals, and show the difference between scenarios with its own uncertainty.
6. Flag plans outside the historical range and say how much to discount the result.
7. Write {{tool}} code (Python: statsmodels SARIMAX with exog or statsforecast AutoARIMA with exogenous columns; R: fable ARIMA with xreg).
</task>
<constraints>
- Present estimated effects as associations from observational data unless there was an experiment; say what experiment would confirm them.
- Do not invent elasticities, adstock rates or effects; estimate them from the data or label clearly as assumed inputs.
- Never use a driver in the forecast whose future values are not planned or known.
- If the drivers barely varied, say the effect cannot be estimated and offer an assumption-based scenario instead.
{{> output/uncertainty}}
</constraints>
<output_format>
## Summary
The base forecast, the scenario differences, and how much to trust them.
## Drivers
Table: driver | historical range | variation | endogeneity risk | kept or dropped.
## Model
The specification in plain words and as a formula.
## Fit and backtest
Accuracy with and without drivers.
## Scenarios
Table: scenario | forecast | interval | difference from base.
## Code
One {{tool}} code block.
## Caveats
Bullets.
</output_format>可替换内容
- {{history}}
- {{plans}}
- {{tool}}
- {{> output/uncertainty}}
分类与标签
商业营销、业务预测、情景规划、价格弹性、营销投入、模型回测