Time-Series Analysis
Data ordered in time breaks the i.i.d. assumption: trend and seasonality, stationarity, autocorrelation, ARIMA and Holt-Winters forecasts. Interviewers use it to find who peeks ahead.
on this pageshowhide
explore
- Series Structure12 questions
- Trend and Seasonality6 questions
- Stationarity and Differencing6 questions
- Classical Forecast Models15 questions
- Autocorrelation and Lags5 questions
- ARIMA and SARIMA5 questions
- Exponential Smoothing5 questions
- Forecast Evaluation10 questions
- Rolling-Origin Backtesting5 questions
- Forecast Error Metrics5 questions
- Anomalies and Changepoints5 questions
- Lag Features and Horizons6 questions
- Lead-Lag and Cointegration5 questions
questions
page 2 of 2In a 14-day-ahead backtest, why put a 14-day gap between training and test data?
basics
~20 sBecause a row dated within 14 days of the forecast origin has a target that lands at or after the origin, so it was not yet observed there. Dropping those rows keeps training to outcomes genuinely known at prediction time.
Is a last-year holdout a valid backtest if you tuned the model on the full history?
basics
~20 sNo. If the last year influenced which model or hyperparameters you picked, its error is an optimistic in-sample number for that choice, not an independent estimate. Selection must happen on origins entirely before the holdout begins.
How would you test whether two non-stationary stock price series are cointegrated?
basics
~20 sConfirm each series has a unit root, regress one on the other, then test whether the residual spread is stationary using cointegration critical values. If it is, the pair is cointegrated, and step two fits an error-correction model.
How do moving holidays like Easter distort the seasonal indices of a monthly retail series?
basics
~20 sA month-of-year seasonal index assumes the same calendar effect every year, but Easter falls in March some years and April others. Both indices become blends of holiday and non-holiday years, so both are biased and the remainder carries a paired March-April swing.
What does STL decomposition give you that a classical moving-average decomposition does not?
basics
~20 sSTL uses local regression instead of fixed averages, so the seasonal shape may change over time, trend and seasonal smoothness are tunable, and a robust variant pushes outliers into the remainder instead of letting them bend the trend.
Holt's linear trend forecasts a startup's sign-ups 24 months out at an implausible level. What do you change?
basics
~20 sSwitch to a damped trend. Multiply the slope by a damping factor phi between 0 and 1 once per step ahead, so the extrapolated growth flattens to a finite asymptote instead of continuing in a straight line forever.
For a 28-day-ahead forecast, how do recursive and direct multi-step strategies differ?
basics
~20 sRecursive forecasting trains one one-step model and feeds its own predictions back as lags, so errors compound over 28 steps. Direct forecasting trains a model per horizon using only lags of at least that horizon, so nothing is fed back.
ADF fails to reject a unit root and KPSS rejects stationarity on the same series — what do you conclude?
basics
~10 sThe two tests carry opposite null hypotheses, so both verdicts point the same way: the evidence supports a unit root. Difference the series once, then re-run both tests on the differenced series before modelling.
How do you choose the headline forecast accuracy metric for a portfolio of thousands of series?
basics
~20 sPick a scale-free measure so series of different sizes can be aggregated, weight by business value rather than series count, and publish a naive baseline's score on the same window so the number reads as skill, not difficulty.
How do you set an anomaly-detection threshold that trades false alarms against detection delay for on-call?
basics
~20 sSet the threshold from an alarm budget, not from a default number of sigmas. Measure false alarms per week and median detection delay across the whole fleet of series, then pick the point on that curve on-call can sustain.
Would you fit a SARIMA with m=52 to three years of weekly sales, and how would you justify the call?
basics
~20 sUsually no. A lag-52 seasonal term is informed by complete yearly cycles, and three years gives three; seasonal differencing also discards 52 of about 156 weeks. Carry annual seasonality with a few harmonic regressors instead.
Your team wants to replace exponential smoothing baselines with deep learning across 5,000 SKUs. How do you decide?
basics
~20 sKeep exponential smoothing as the benchmark the new method must beat on the same series. Complex forecasters tend to win only with many related series, useful covariates and enough history per series; otherwise damped-trend smoothing is very hard to beat.
Would you train one global model across thousands of store-item series, or one model per series?
basics
~20 sDefault to one global model trained on the pooled rows of all series, with a series identifier and static attributes as columns. It shares structure across series, covers brand-new ones, and leaves one artifact to operate. Reserve per-series models for high-value, atypical series.
What does a CUSUM chart detect that a per-point threshold rule misses?
basics
~20 sCUSUM accumulates signed deviations from the target mean instead of judging each point alone, so it catches a sustained small shift that never breaches a per-point limit. Slack k targets the shift size; threshold h triggers the alarm.
In a time series, what distinguishes a cycle from a seasonal pattern?
basics
~20 sA season repeats at a fixed, calendar-known period such as 12 months or 7 days. A cycle also rises and falls, but its length and height vary from one repetition to the next, so no calendar pins it down.
Simple exponential smoothing is equivalent to which ARIMA model?
basics
~20 sSimple exponential smoothing is equivalent to ARIMA(0,1,1): difference the series once and model the result with a single moving-average term. Writing that as y_t - y_{t-1} = e_t - theta * e_{t-1}, the smoothing weight is alpha = 1 - theta.
How do Fourier terms with period m=365 encode yearly seasonality as model columns?
basics
~10 sFourier terms are sine and cosine columns built from the date index: sin(2pikt/365) and cos(2pikt/365) for k = 1..K. Those 2K columns approximate a smooth yearly cycle using far fewer parameters than day-of-year indicators.
Why does minimising pinball loss at the 0.9 quantile give a higher forecast than minimising MAE?
basics
~20 sPinball loss weights error directions unequally: at the 0.9 level, falling short costs nine times as much per unit as overshooting. Its minimiser is the 0.9 quantile, while absolute error is minimised by the median.
In an ARIMA model, what do the stationarity and invertibility conditions require of its roots?
basics
~20 sBoth require roots of a lag polynomial to lie outside the unit circle: the autoregressive polynomial's roots for stationarity, the moving-average polynomial's for invertibility. For a first-order model that reduces to the coefficient having absolute value below one.
After differencing, a series has a lag-1 autocorrelation near -0.5. What does that suggest?
basics
~10 sA large negative lag-1 autocorrelation right after differencing is the classic signature of over-differencing: the series was already level enough, and the extra difference injected artificial negative correlation and inflated the variance.
How do you tell a trend-stationary series from a difference-stationary one?
basics
~20 sA trend-stationary series varies around a fixed deterministic trend and its shocks fade; a difference-stationary series has a unit root and its shocks persist forever. Detrend by regression in the first case, difference in the second.
How should a rolling-origin backtest reflect how often the model is refit in production?
basics
~20 sThe backtest should refit on the same schedule the deployed system uses. Refitting at every origin while production retrains quarterly reports the accuracy of a model far fresher than the one that will actually be serving forecasts.
When would you keep an error-correction term rather than simply differencing two cointegrated series?
basics
~20 sKeep the error-correction term when the level gap carries information you need: longer forecast horizons, or decisions that depend on the pair converging. Differencing a cointegrated pair is safe but discards the equilibrium and misspecifies the dynamics.
showing 31–53 of 53