How to Build a Demand Forecasting Model Without Code
TensorTurn builds a demand forecasting model by reframing it as supervised regression: upload timestamped sales or shipment history per product, and it engineers lag, rolling and calendar features plus any drivers you supply (price, promotions, holidays), trains a model (XGBoost or scikit-learn, or a sequence network in PyTorch/Keras), and deploys a /predict API for future demand. This is a machine-learning approach rather than a built-in ARIMA or Prophet toolkit; it shines when promotions, price and seasonality drive demand, and it needs time-based validation to avoid fooling itself.
What demand forecasting predicts
A demand forecast estimates how many units of a product you will sell or ship in future periods, so you can plan inventory, staffing and purchasing. It differs from generic sales forecasting in its grain and its use: demand is usually forecast per SKU, per location or per SKU-store, and it feeds reorder points and safety stock rather than a single revenue number. TensorTurn learns the relationship between the recent past, the calendar and your drivers, then projects it forward.
What data you need
- A timestamp column at a regular cadence (daily, weekly, monthly) and the demand target — units sold or shipped, ideally net of stockouts.
- An identifier per series if you forecast many products or sites at once (SKU, store, or SKU-store key).
- At least two full seasonal cycles of history so seasonality can be learned.
- Drivers you will know in advance: planned price, promotions, holidays, marketing calendar — you must supply their future values to forecast with them.
- Notes on stockouts, new-product launches and one-off events so they are handled rather than learned as normal demand.
How TensorTurn turns demand history into a model
Rather than fitting a classical statistical model, TensorTurn converts each series into rows where the past becomes features: lagged demand (last week, same week last year), rolling means and standard deviations, trend, and calendar terms (day of week, month, holiday), alongside your driver columns. A regression model then learns how those map to next-period demand, capturing nonlinear effects like promo lift and price elasticity that linear models miss. You can forecast one product or thousands of series in the same run.
How to build a demand forecasting model with TensorTurn (no code)
- Import your demand history (CSV, Excel or from a URL); include the SKU/location key and any driver columns.
- Run the tabular health check for outliers, gaps, mixed types and duplicates, and fix what it flags.
- In chat, state target, grain, cadence and horizon: 'Forecast weekly units per SKU 8 weeks ahead, using price and promo flags.'
- TensorTurn engineers lag, rolling and calendar features, trains the model, and self-heals any failing cells (up to 100 retries).
- Evaluate with a time-based backtest — never a random split — reviewing MAE, RMSE, MAPE/WMAPE and forecast bias, plus a forecast-vs-actual plot.
- Deploy a /predict endpoint and feed it upcoming periods (with their driver values) to get demand forecasts.
Algorithm, data and metrics at a glance
| Aspect | What it looks like for demand forecasting |
|---|---|
| Problem type | Time-series regression (framed as supervised learning) |
| Likely algorithm | XGBoost or scikit-learn; PyTorch/Keras for sequence models |
| Data you need | Timestamped units per SKU + drivers, 2+ seasonal cycles |
| Key metrics | MAE, RMSE, MAPE/WMAPE, forecast bias (over/under) |
| Validation | Time-based backtest, test period strictly after training |
| Watch out for | Stockouts, intermittent demand, new SKUs, random splits |
Intermittent demand and cold-start SKUs (be realistic)
Not every series is forecastable. Slow-moving items with lots of zero-demand weeks (intermittent demand) are inherently noisy, and brand-new SKUs have no history to learn from — no model conjures signal that is not there. For those, lean on aggregation (forecast at category or weekly level, then disaggregate), use similar-product history for cold starts, and validate on time order so you never let the model peek at the future. Watch bias too: consistently under-forecasting causes stockouts, while consistently over-forecasting ties up cash in inventory, and accuracy always degrades as the horizon grows.
Deploy as an API
Publish the trained forecaster as an authenticated /predict endpoint on Modal that scales to zero when idle, secured with a SHA-256-hashed Bearer key and per-call logging. The playground gives cURL, JavaScript, Python and Rust snippets so you can pull demand forecasts into your planning, replenishment or ERP system, and retrain on fresh history as demand patterns shift.
Frequently asked questions
What data do I need for demand forecasting?
Timestamped demand (units sold or shipped) at a regular cadence, an identifier if you forecast many SKUs, at least two seasonal cycles of history, and any drivers (price, promotions, holidays) whose future values you can supply.
Does TensorTurn use ARIMA or Prophet?
Not directly. It forecasts by engineering lag, rolling and calendar features and training regression or neural models (XGBoost, scikit-learn, Keras, PyTorch) — a machine-learning approach to the same problem that handles drivers and nonlinearity well.
How accurate is a demand forecast?
For stable, seasonal items a MAPE of 10 to 20% is realistic; volatile or promotion-driven demand runs higher, and intermittent slow movers are hardest. Accuracy always falls as the horizon lengthens.
Can I forecast many SKUs at once?
Yes. Include a SKU or location key and TensorTurn can learn across all series in one run, which also helps new or sparse products borrow signal from similar ones.
How do I forecast a brand-new product?
With no history there is nothing to learn directly, so use similar-product demand as a proxy, forecast at a higher level and disaggregate, and update quickly once real sales arrive. Be honest that early forecasts for new SKUs are rough.
Can I deploy the forecast into my planning system?
Yes. Publish a /predict endpoint and call it with the provided snippets, passing upcoming periods and their driver values to receive demand forecasts. It scales to zero when idle.