Suppose I have a variable, $S(t)$, for stock price. So always have $S(t) > 0$.
$S(t)$ is a random variable, with some volatility $\sigma$ and trend.
Now the requirement is to estimate $\hat S(t+1)$ with at 95% confidence level, or: estimate $\hat S(t+1)$ based on $S(0)$, $S(1)$, ..., $S(t)$, so that 95% of the time $S(t+1) < \hat S(t+1)$.
If it's not for the 95% confidence level, it's easy, I could just use regression to genereate a formula something like $$ S(t+1) = a_0 + a_1 S(t) + a_2 S(t-1) ... + a_m S(t-m+1) $$ .
But such estimation is only predicting the "trend", not considering the volatility and 95% confidence level.
If it's not for the trend, it's also easy, I could just get the 95% percentile value from history S:
$\hat S(t+1) = 95 % $ percentile value of $S(t), S(t-1), ... S(t-m)$
, maybe could choose $m = 36%$, using 3 years' data.
But such prediction would not cater the trend -- if there is a trend in the market that the Stock price rises, the estimation will always be lower than the future realized.
How could I have a $\hat S(t+1)$ that could cater both "trend" and "95% confidence level"?
Please notice here we didn't assume any parametric model about Stock price's distribution.