tensorturnBETA
HomeUse Cases

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

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)

Algorithm, data and metrics at a glance

AspectWhat it looks like for demand forecasting
Problem typeTime-series regression (framed as supervised learning)
Likely algorithmXGBoost or scikit-learn; PyTorch/Keras for sequence models
Data you needTimestamped units per SKU + drivers, 2+ seasonal cycles
Key metricsMAE, RMSE, MAPE/WMAPE, forecast bias (over/under)
ValidationTime-based backtest, test period strictly after training
Watch out forStockouts, 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.

Start building free

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.