Salinas, Flunkert and Gasthaus (Amazon, 2017; IJF 2020; arXiv:1704.04110) train one autoregressive LSTM on thousands of related series. The net emits likelihood parameters (Gaussian or negative binomial); ancestral sampling yields joint predictive paths and consistent quantiles. Scale handling + velocity-weighted sampling for power-law magnitudes. Plain-language intro. Not investment advice.
Takeaway. One global LSTM is trained on all related series. At each step it emits parameters of a likelihood (Gaussian or negative binomial), not a point. At test time you feed sampled (\tilde z_t) back in and draw paths. Quantiles of sums over a horizon stay coherent.
DeepAR: Probabilistic Forecasting with Autoregressive Recurrent Networks (David Salinas, Valentin Flunkert, Jan Gasthaus, 2017; International Journal of Forecasting 2020; arXiv:1704.04110). Amazon Research.
Fit for learners: Classic probabilistic RNN forecaster — learn predictive distributions before you size positions.
This Hub note is a plain-language intro. Not investment advice.
Classical ETS/ARIMA fit one series. Retail / energy / traffic give you thousands to millions of related series with a power-law of scales (few SKUs sell a lot; most sell almost none). You need distributions for inventory risk, not a pretty median. Shared seasonality should be learned once.
ec / ec-sub vs ISSM/Croston/ETS — roughly ~15% better (\rho)-risk vs then-SOTA on the retail sets. Uncertainty not forced to grow linearly (Q4 bump on ec).Still the mental model inside GluonTS / SageMaker DeepAR. Chronos (paper 89) is the 2024 “tokenize it” cousin.
Position sizing starts with P(loss > x), not with MSE. DeepAR is the cleanest story: likelihood head + sampling. Implement the Gaussian head on a toy LSTM before you touch production SKUs.
Tiny evening exercise: LSTM hidden h, two linear maps → mu, softplus(sigma). Sample np.random.normal(mu, sigma) and feed it as next input for 12 steps. Plot 20 paths. Learning only.
Landing: arXiv abs
Not investment advice. This Hub note is educational only. DeepAR’s retail and electricity scores are not a recommendation to size live inventory or trades from an LSTM.
Single course CTA: SoloQuant Academy’s Introduction to Python Programming—random sampling, means, and functions are the Monte Carlo engine DeepAR sits on.