The critical point to predict is to calculate the series autocorrelation. This is how past values influence the determination of future values. Then you have to analyze whether this relationship is linear, in which case you have many options for modeling time series using regression models.
Various other information and links can be found in this question similar
An example with simulated data is shown below
%# Gerar uma variável aleatória autocorrelacionada em 3 períodos.
T = 1000;
%
RV = zeros(T, 1); RV(1)=10+randn(1); RV(2)=1.5+.8*RV(1)+randn(1);
RV(3)=1.5+.8*RV(1)-.3*RV(1)+randn(1);
for c = 4:T ; RV(c)=1.5+.8*RV(c-1)-.3*RV(c-2)+.25*RV(c-3)+randn(1); end
% Pode iniciar aqui fazendo RV = SuaVariavel
plot(RV)
%# Construindo as variaveis com 3 defasagens
yout = RV(4:end); %# dependente
X1 = RV(3:end-1); %# defasagens da dependente (1er regressor)
X2 = RV(2:end-2);
X3 = RV(1:end-3);
%# matriz de regressores incluindo constante
X_train = [ones(length(X1), 1), X1, X2, X3];
%# MQO
mdl = regress(yout, X_train);
mdl
# Prever
X_test = [1, RV(T-1), RV(T-2), RV(T-3)];
%pred = predict(mdl,X_test);
sum(mdl'.*X_test) ; % Y em T+1