How to estimate the probability that the next observation in a time series will be bigger than 0? I have time series data and I want to know how to find out the probability that the next one will be bigger than zero. This time series doesn't have a seasonal aspect to it but it does have a slope and a level and autocorrelation.
 A: This is a very typical task in financial risk management: forecast portfolio value distribution for next period, then analyze its characteristics such as quantiles.
Here's how it's done. You fit the time series model to the data set of portfolio values $p_t$ or returns $r_t=\Delta\ln p_t$, then produce a probability distribution $\hat F(p_{t+h}|I_t)$ of the portfolio values $p_{t+h}$ for next period given what you know today $I_t$. Once you know the distribution, you can trivially obtain probabilities such as of below zero $Pr[p_{t+h}<0]=\hat F(0|I_t)$
The distributions can be obtained by bootstrapping but sometimes are available with analytics expressions, e.g. if you're using ARIMA type of models. The general form of ARIMA is:$$\Phi(B) \Delta^dx_t=\Theta(B)\varepsilon_t$$
You usually make some kind of distributional assumption about $\varepsilon_t$ estimating the model, e.g. $\varepsilon_t\sim\mathcal N(0,\sigma^2)$. This means that you can simulate (sample from) normal distribution to get these disturbances then plug them back into the model to produce the sample from forecast $\hat x_{t+h}$.
A: If your time series $x_t$ can be adequately described by an AR(p) model (perhaps with a trend), consider estimating the model and producing a density forecast. E.g. if you assume normality of the model's errors, the mean of the predictive density would be the estimated conditional mean one step ahead, $\hat\mu_{t+1}$ (which is the usual point prediction) and the variance would be the estimated variance of the error term, $\hat\sigma^2$. Then find $\hat{P}(x_{t+1}>0)$ as $1-\Phi(0; \hat\mu_{t+1},\hat\sigma^2)$ where $\Phi$ is the cumulative density function of a normal distribution with mean $\hat\mu_{t+1}$ and variance $\hat\sigma^2$. Or if you do not assume a specific distribution, you could estimate the error distribution nonparametrically from the residuals (e.g. using kernel density estimation or just the empirical CDF), shift it by $\hat\mu_{t+1}$ and see what probability mass of that distribution is to the right of zero. That will yield an estimate of the probability you are after. (You could scale the residuals by $\sqrt{\frac{n}{n-(p+1)}}$ or some other sensible factor to reflect the fact that in-sample fit tends to be better than out-of-sample prediction.)
Alternatively, try logistic regression, linear discriminant analysis, quadratic discriminant analysis or naive Bayes. A worked out example with R code and detailed explanations for each of these methods is available on p. 171-181 of James et al. "Introduction to Statistical Learning" (2nd edition, 2021). The example there tries to predict whether the market index will go up or down the next day, based on past prices and optionally past trading volumes. It should be straightforward to adapt that to your setting. (Since you mention trend, you could include an additional deterministic trend variable as a regressor.)
