資源簡(jiǎn)介
時(shí)間序列預(yù)測(cè)建模,移動(dòng)平滑、指數(shù)平滑、等模型的描述講解和matlab程序?qū)崿F(xiàn)代碼。arima、arma等等

代碼片段和文件信息
clear;?
P?=?sin(0.1:0.1:9.6);
F?=?sin(0.1:0.1:9);
?
%----------------------由于時(shí)間序列有不平穩(wěn)趨勢(shì),進(jìn)行兩次差分運(yùn)算,消除趨勢(shì)性----------------------%?
for?i=2:96?
????Yt(i)=P(i)-P(i-1);?
end?
for?i=3:96?
????L(i)=Yt(i)-Yt(i-1);?
end?
L=L(3:96);?
Y=L(1:88);?
%畫(huà)圖
figure;?
plot(P);?
title(‘原數(shù)據(jù)序列圖‘);?
hold?on;?
pause??
plot(Y‘r‘);?
title(‘兩次差分后的序列圖和原數(shù)對(duì)比圖‘);?
pause???
%--------------------------------------對(duì)數(shù)據(jù)標(biāo)準(zhǔn)化處理----------------------------------------------%?
%處理的算法?:?(data?-?期望)/方差
Ux=sum(Y)/88???????????????????????????%?求序列均值?
yt=Y-Ux;?
b=0;?
for?i=1:88?
???b=yt(i)^2/88+b;?
end?
v=sqrt(b)??????????????????????????????%?求序列方差?
Y=yt/v;????????????????????????????%?標(biāo)準(zhǔn)化處理公式?
f=F(1:88);?
t=1:88;?
%畫(huà)圖
figure;?
plot(tftY‘r‘)?
title(‘原始數(shù)據(jù)和標(biāo)準(zhǔn)化處理后對(duì)比圖‘);?
xlabel(‘時(shí)間t‘)ylabel(‘油價(jià)y‘);?
legend(‘原始數(shù)據(jù)?F?‘‘標(biāo)準(zhǔn)化后數(shù)據(jù)Y?‘);?
pause???
%--------------------------------------對(duì)數(shù)據(jù)標(biāo)準(zhǔn)化處理----------------------------------------------%?
?
?
%------------------------檢驗(yàn)預(yù)處理后的數(shù)據(jù)是否符合AR建模要求,計(jì)算自相關(guān)和偏相關(guān)系數(shù)---------------%?
%---------------------------------------計(jì)算自相關(guān)系數(shù)-----------------------------------%?
R0=0;
for?i=1:88??
?????R0=Y(i)^2/88+R0;???%標(biāo)準(zhǔn)化處理后的數(shù)據(jù)的方差
end?
for?k=1:20?
????
????%R??協(xié)方差???
????R(k)=0;?
????for?i=k+1:88
????????R(k)=Y(i)*Y(i-k)/88+R(k);???
????end?
end?
x=R/R0??????????????????????%自相關(guān)系數(shù)x?=?協(xié)方差/方差
%畫(huà)圖
figure;?
plot(x)?
title(‘自相關(guān)系數(shù)分析圖‘);?
pause???
%-----------------------------------計(jì)算自相關(guān)系數(shù)-------------------------------------%?
?
%-----------------------解Y-W方程,其系數(shù)矩陣是Toeplitz矩陣(多普里茲矩陣)。求得偏相關(guān)函數(shù)X-------------------
X1=x(1);?
X11=x(1);?
B=[x(1)?x(2)]‘;?
x2=[1?x(1)];?
A=toeplitz(x2);???????????????????????
X2=A\B??????????????????????????%x=a\b是方程a*x?=b的解
X22=X2(2)?
?
B=[x(1)?x(2)?x(3)]‘;?
x3=[1?x(1)?x(2)];?
A=toeplitz(x3);???????????????????????
X3=A\B?
X33=X3(3)?
?
B=[x(1)?x(2)?x(3)?x(4)]‘;?
x4=[1?x(1)?x(2)?x(3)];?
A=toeplitz(x4);???????????????????????
X4=A\B?
X44=X4(4)?
?
B=[x(1)?x(2)?x(3)?x(4)?x(5)]‘;?
x5=[1?x(1)?x(2)?x(3)?x(4)];?
A=toeplitz(x5);???????????????????????
X5=A\B?
X55=X5(5)?
?
B=[x(1)?x(2)?x(3)?x(4)?x(5)?x(6)]‘;?
x6=[1?x(1)?x(2)?x(3)?x(4)?x(5)];?
A=toeplitz(x6);???????????????????????
X6=A\B?
X66=X6(6)?
?
B=[x(1)?x(2)?x(3)?x(4)?x(5)?x(6)?x(7)]‘;?
x7=[1?x(1)?x(2)?x(3)?x(4)?x(5)?x(6)];?
A=toeplitz(x7);???????????????????????
X7=A\B?
X77=X7(7)?
?
B=[x(1)?x(2)?x(3)?x(4)?x(5)?x(6)?x(7)?x(8)]‘;?
x8=[1?x(1)?x(2)?x(3)?x(4)?x(5)?x(6)?x(7)];?
A=toeplitz(x8);???????????????????????
X8=A\B?
X88=X8(8)?
?
B=[x(1)?x(2)?x(3)?x(4)?x(5)?x(6)?x(7)?x(8)?x(9)]‘;?
x9=[1?x(1)?x(2)?x(3)?x(4)?x(5)?x(6)?x(7)?x(8)];?
A=toeplitz(x9);???????????????????????
X9=A\B?
X99=X9(9)?
?
B=[x(1)?x(2)?x(3)?x(4)?x(5)?x(6)?x(7)?x(8)?x(9)?x(10)]‘;?
x10=[1?x(1)?x(2)?x(3)?x(4)?x(5)?x(6)?x(7)?x(8)?x(9)];?
A=toeplitz(x10);???????????????????????
X10=A\B????
X1010=X10(10)?
??????
B=[x(1)?x(2)?x(3)?x(4)?x(5)?x(6)?x(7)?x(8)?x(9)?x(10)?x(11)]‘;?
x11=[1?x(1)?x(2)?x(3)?x(4)?x(5)?
?屬性????????????大小?????日期????時(shí)間???名稱(chēng)
-----------?---------??----------?-----??----
?????文件??????14462??2009-05-19?16:17??時(shí)間序列模型ARIMA的講解與matlab代碼實(shí)現(xiàn)(含多個(gè)實(shí)例)\ARIMA(單獨(dú)的實(shí)例)\ARIMA.asv
?????文件??????11348??2009-05-19?17:03??時(shí)間序列模型ARIMA的講解與matlab代碼實(shí)現(xiàn)(含多個(gè)實(shí)例)\ARIMA(單獨(dú)的實(shí)例)\ARIMA.m
?????文件???????1321??2008-09-18?22:36??時(shí)間序列模型ARIMA的講解與matlab代碼實(shí)現(xiàn)(含多個(gè)實(shí)例)\ARIMA(單獨(dú)的實(shí)例)\arimapred.m
?????文件?????556368??2019-05-29?21:33??時(shí)間序列模型ARIMA的講解與matlab代碼實(shí)現(xiàn)(含多個(gè)實(shí)例)\《MATLAB_時(shí)間序列建模預(yù)測(cè)(移動(dòng)平均_指數(shù)平滑_趨勢(shì)外推_ARMA_ARIMA_GARCH的MATLAB程序)》.pdf
?????目錄??????????0??2019-05-29?21:51??時(shí)間序列模型ARIMA的講解與matlab代碼實(shí)現(xiàn)(含多個(gè)實(shí)例)\ARIMA(單獨(dú)的實(shí)例)
?????目錄??????????0??2019-05-29?21:51??時(shí)間序列模型ARIMA的講解與matlab代碼實(shí)現(xiàn)(含多個(gè)實(shí)例)
-----------?---------??----------?-----??----
???????????????583499????????????????????6
評(píng)論
共有 條評(píng)論