亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? garchpred.m

?? 灰色控制 灰色控制 matlab
?? M
?? 第 1 頁 / 共 2 頁
字號:
%
%  Ensure no missing values (i.e., NaN's) exist in XF(t).
%
   if any(isnan(XF(:)))
      error(' Regression forecast matrix ''XF'' has missing data (i.e., NaN''s).');
   end

   if size(XF,1) < horizon
      error(' Regression matrix ''XF'' has insufficient number of forecasts.');
   else
      XF  =  XF(1:horizon , :);      % Retain only the initial forecasts.
   end

else

   XF  =  [];   % Ensure XF exists.

end

%
% Extract model orders for the conditional mean & variance processes.
%

R  =  garchget(spec , 'R');       % Conditional mean AR order.
M  =  garchget(spec , 'M');       % Conditional mean MA order.
P  =  garchget(spec , 'P');       % Conditional variance order for lagged variances.
Q  =  garchget(spec , 'Q');       % Conditional variance order for lagged squared residuals.

%
% Ensure all coefficients of the conditional variance
% model exist and have proper dimensions.
%

K      =  garchget(spec , 'K');       % Conditional variance constant.
GARCH  =  garchget(spec , 'GARCH');   % Conditional variance coefficients for lagged variances.
ARCH   =  garchget(spec , 'ARCH');    % Conditional variance coefficients for lagged squared residuals.

if isempty(K)
   error(' Conditional variance constant ''K'' must be specified.');
end
if isempty(GARCH) & (P ~= 0)
   error(' ''GARCH'' coefficients of lagged variances must be specified.');
end
if isempty(ARCH)  & (Q ~= 0)
   error(' ''ARCH'' coefficients of lagged squared residuals must be specified.');
end

%
% Let y(t) = return series of interest (assumed stationary)
%     e(t) = innovations of the model noise process (assumed invertible)
%     h(t) = conditional variance of the innovations process e(t)
%
% ARMA(R,M)/GARCH(P,Q) processing requires pre-sample values for conditioning. 
%
% We require R pre-sample lags of y(t), max(M,Q) pre-sample lags of e(t), and 
% P pre-sample lags of h(t). To be safe, work with max([R M P Q]) pre-sample lags
% for all processes in the ARMA(R,M)/GARCH(P,Q) model.
%

preSamples  =  max([R M P Q]);   % # of pre-sample lags for 'jump-starting' the process.

%
% Set the storage size of y(t), h(t), and e(t) required for forecasting.
%

T  =  horizon  +  preSamples;

%
% Given specifications for the conditional mean & variance models, infer the 
% innovations, e(t), and conditional variance, h(t), time series from the
% observed return series y(t). The code segment below represents a re-construction 
% of the 'past' e(t) and h(t) processes, which are required for forecasting into 
% the 'future'. 
%
% Note that GARCHINFER actually returns the conditional standard deviation, 
% rather than the conditional variance. The output h(t) is converted later 
% on instead of immediately for performance purposes only.
%

[e , h] =  garchinfer(spec , y , X);  % At this point, h(t) = standard deviation.

%
% Re-format the y(t), h(t), and e(t) processes for the purpose of forecasting. 
% For forecasting, only the most recent R lags of y(t), max(M,Q) lags of e(t), 
% and P lags of h(t) are required. Thus, truncate y(t), h(t), and e(t), retaining
% only the most recent 'preSamples' values, then append 'horizon' zeros to 
% accommodate the user-specified forecast horizon. Since forecasting requires 
% squared innovations e(t)^2, work with them directly instead of the e(t) process.
%
% Note that, upon input, y(t) is a univariate return series observed from the 'past'.
% Upon output, y(t) represents the MSE forecast of the conditional mean of the 
% return series projected into the 'future'.
%

y  =  y((end - preSamples + 1):end , :);
e  =  e((end - preSamples + 1):end , :);
h  =  h((end - preSamples + 1):end , :).^2;  % Convert STDs to variances.

e2 =  e.^2;    % Innovations squared.

y (T,:) =  0;  % Allocate sufficient storage for forecasting.
e (T,:) =  0;
h (T,:) =  0;
e2(T,:) =  0;

%
% Construct the conditional variance parameter vector of length (1 + P + Q).
%

varianceCoefficients  =  [K ; GARCH(:) ; ARCH(:)]';  % GARCH(P,Q) parameters.

%
% Apply iterative expectations one forecast step at a time. Note that the second 
% line inside the FOR loop applies the identity that the conditional expectation
% of the squared innovation at time 't' is also the conditional expectation
% of the variance forecast at time 't' for any period in the future.
%
% Note that the forecasts constructed below make no assumptions about the 
% distribution of the innovations process e(t) other than that the conditional 
% distribution is symmetric with zero-mean (see Baillie & Bollerslev, 1992).
%

nPaths  =  size(y,2);    % # of realizations (i.e., sample paths).

for t = (preSamples + 1):T
    h (t,:) =  varianceCoefficients * [ones(1,nPaths) ; h(t-(1:P),:) ; e2(t-(1:Q),:)];
    e2(t,:) =  h(t,:);
end

%
% Now strip off the first 'preSamples' values of the conditional variance h(t). 
% After the first 'preSamples' values have been excluded, h(j) = j-period-ahead 
% forecast of the conditional variance.
%

h  =  h((preSamples + 1):end , :);

%
% Forecast the conditional mean of y(t) only if it's requested.
%

if nargout >= 2

%
%  Ensure all coefficients needed for the conditional 
%  mean exist and have proper dimensions.
%

   C  =  garchget(spec , 'C');       % Conditional mean constant.

   if isempty(C)
      error(' Conditional mean constant ''C'' must be specified.');
   end
   if isempty(AR) & (R ~= 0)
      error(' Auto-regressive ''AR'' coefficients must be specified.');
   end
   if isempty(MA) & (M ~= 0)
      error(' Moving-average ''MA'' coefficients must be specified.');
   end

%
%  Construct ARMA portion of the conditional mean 
%  parameter vector of length (1 + R + (1 + M)).
%

   armaCoefficients  =  [C ; AR(:) ; [1 ; MA(:)]]';

   if isempty(XF)

      for t = (preSamples + 1):T
          armaData =  [ones(1,nPaths) ; y(t-(1:R),:) ; e(t-(0:M),:)];
          y(t,:)   =  armaCoefficients * armaData;
      end

   else
%
%     Pre-pend 'preSamples' rows to XF for initialization.
%
      XF  =  [zeros(preSamples,size(XF,2)) ; XF];

      for t = (preSamples + 1):T
          armaData =  [ones(1,nPaths) ; y(t-(1:R),:) ; e(t-(0:M),:)];
          y(t,:)   =  armaCoefficients * armaData  +  regress * XF(t,:).';
      end

   end

   y  =  y((preSamples + 1):end , :);

end

%
% Compute the following for stationary/invertible ARMA conditional 
% mean models ONLY (i.e., no regression component):
%
%   (1) The forecast of the standard deviation of the returns that
%       would be obtained if an asset were held for multiple periods.
%       In other words, for each period 1, 2, ... horizon, this is 
%       the volatility forecast of the effective, or cumulative,
%       return that would be expected if the asset was held for 1
%       period then sold, for 2 periods then sold, and so on. For
%       conditional mean models without an ARMAX component such that
% 
%           y(t) = C + e(t)
%
%       the result is the conditional analog of the 'square-root-of-time-rule'
%       for scaling standard deviations over multi-period holding intervals.
%
%       These volatility forecasts are correct for continuously-compounded
%       returns, but only approximations for periodically-compounded returns.
%
%   (2) The root mean square error (RMSE) of the forecast of the 
%       conditional mean (i.e., the standard error of the forecast
%       of future values of y(t)) in each period. This is the square
%       root of equation (19) of Baillie & Bollerslev for each 
%       period 1, 2, ... horizon.
%

yRMSE      =  [];
yTotalRMSE =  [];

if (nargout >= 3) & isempty(X)

   InfiniteMA  =  1;
%
%  Compute the coefficients of the (truncated) infinite-order MA 
%  representation associated with the finite-order ARMA(R,M) model.
%
   if horizon > 1
      InfiniteMA  =  [InfiniteMA ; garchma(AR(:) , MA(:) , horizon - 1)];
   end

%
%  Compute the forecast of the standard deviation of the returns that
%  would be obtained if an asset were held for multiple periods. These 
%  are the volatility forecasts of returns over a multi-period holding
%  interval.
%

   yTotalRMSE  =  sqrt(toeplitz(cumsum(InfiniteMA(:)).^2 , [1  zeros(1 , horizon - 1)]) * h);

%
%  Compute the root mean square error (RMSE) of the forecast of the 
%  conditional mean in each period (i.e., on a per-period basis). This
%  is the square root of equation (19) of Baillie & Bollerslev for each 
%  period 1, 2, ... horizon.
%

   if nargout >= 4
      yRMSE  =  sqrt(toeplitz(InfiniteMA(:).^2 , [1  zeros(1 , horizon - 1)]) * h);
   end

end

%
% Since h(t) is the conditional variance, convert it to a standard deviation.
%

h  =  sqrt(h);

%
% Re-format outputs for compatibility with the return series input. 
% When return series input is specified as a single row vector, then 
% pass the outputs as row vectors. 
%

if rowY
   h          =  h(:).'; 
   y          =  y(:).';
   yRMSE      =  yRMSE(:).';
   yTotalRMSE =  yTotalRMSE(:).';
end

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人av影院| 7777女厕盗摄久久久| 成人欧美一区二区三区小说| 日本高清不卡视频| 久久99蜜桃精品| 亚洲国产一区二区三区青草影视| 欧美一区二区私人影院日本| 99久久久精品免费观看国产蜜| 日韩成人精品在线观看| **性色生活片久久毛片| 久久久三级国产网站| 欧美视频一区二区三区四区| 成人一二三区视频| 国产在线视视频有精品| 欧美经典一区二区| 欧美亚洲日本国产| 一区二区三区精品在线| 欧美日本一道本在线视频| 成人免费av资源| 国产成人精品一区二区三区四区 | 日韩国产在线观看| 国产欧美一区二区三区沐欲| 色菇凉天天综合网| 国产成人精品一区二区三区四区| 国内精品免费在线观看| 日韩精品午夜视频| 一区二区三区精密机械公司| 中文字幕日韩欧美一区二区三区| 国产三区在线成人av| 精品av久久707| 欧美r级在线观看| 欧美日韩亚洲综合| 色狠狠av一区二区三区| caoporm超碰国产精品| 国产激情精品久久久第一区二区| 蜜桃视频在线观看一区| 天天爽夜夜爽夜夜爽精品视频| 一区二区三区成人| 亚洲黄色av一区| 亚洲自拍偷拍欧美| **性色生活片久久毛片| 亚洲欧美偷拍另类a∨色屁股| 国产欧美1区2区3区| 久久久久久亚洲综合| 欧美国产日本视频| 中文字幕一区在线观看视频| 亚洲一区精品在线| 亚洲妇熟xx妇色黄| 久久99热狠狠色一区二区| 国产精品中文有码| 成人性生交大合| 91丨porny丨在线| 69成人精品免费视频| 欧美影院一区二区三区| 欧美一卡二卡在线观看| 夜夜操天天操亚洲| voyeur盗摄精品| 欧美激情一区不卡| 偷窥少妇高潮呻吟av久久免费| 成人免费高清在线| 欧美精品一区二区三区蜜臀| 午夜欧美在线一二页| 91女厕偷拍女厕偷拍高清| 久久精品一区蜜桃臀影院| 午夜精品久久久久久久 | 国产精品视频在线看| 日本视频免费一区| 91麻豆国产在线观看| 中文字幕色av一区二区三区| 国产精品1024久久| 久久综合久久综合久久综合| 亚洲欧美国产77777| 国产成人一区在线| 欧美精品一区二区高清在线观看| 午夜精品久久久久| 欧美日韩国产综合一区二区三区 | 一区二区三区欧美| 色哟哟日韩精品| 亚洲欧洲综合另类在线| 91在线国内视频| 亚洲欧洲成人精品av97| www.欧美精品一二区| 国产精品国产馆在线真实露脸 | 亚洲欧洲精品一区二区三区不卡| 成人免费不卡视频| 国产精品国产三级国产a| 99re在线视频这里只有精品| 亚洲女同一区二区| 在线观看三级视频欧美| 亚洲va欧美va人人爽午夜| 欧美区视频在线观看| 青青草伊人久久| 国产天堂亚洲国产碰碰| www.日本不卡| 午夜视黄欧洲亚洲| 精品国产区一区| 成人免费av在线| 亚洲一本大道在线| 日韩欧美国产成人一区二区| 久久99国产精品久久| 中文在线一区二区| 日本丶国产丶欧美色综合| 天天射综合影视| 国产欧美精品在线观看| 色婷婷香蕉在线一区二区| 亚洲裸体在线观看| 91精品国产综合久久久久久久久久 | 亚洲三级在线看| 欧美精品在线一区二区| 久久99精品久久久| 日韩一区在线播放| 欧美精三区欧美精三区| 美女一区二区在线观看| 最新久久zyz资源站| 欧美日韩五月天| 国产成人在线电影| 亚洲福利一二三区| 国产欧美中文在线| 欧美性大战xxxxx久久久| 国产一区三区三区| 亚洲福利视频一区| 国产精品卡一卡二| 欧美一区二区三区视频免费播放 | 美女视频黄免费的久久| 亚洲少妇中出一区| 26uuu精品一区二区| 欧美亚洲一区二区在线观看| 国产精品99久久久久久宅男| 亚洲成在人线免费| 久久久久久久综合日本| 欧美日韩国产片| 国产成人av一区二区三区在线 | 日本成人中文字幕| 亚洲人妖av一区二区| 久久亚洲精华国产精华液 | 在线亚洲一区二区| 成人自拍视频在线观看| 天天av天天翘天天综合网| 国产精品福利av | 91视频在线观看| 国产成人三级在线观看| 美女高潮久久久| 香蕉久久一区二区不卡无毒影院| 18欧美乱大交hd1984| 国产女人18毛片水真多成人如厕| 欧美一级理论性理论a| 欧美日韩在线直播| 色域天天综合网| av在线不卡电影| 成人免费不卡视频| 粉嫩嫩av羞羞动漫久久久| 国产一区二区视频在线播放| 免费在线观看视频一区| 日本欧美加勒比视频| 午夜精品久久久久久久99樱桃 | 精品国产伦一区二区三区免费| 欧美日韩不卡一区| 欧美一区二区三区在线电影| 在线不卡中文字幕| 欧美一区二区视频免费观看| 日韩欧美中文一区二区| 日韩一级片网站| 久久夜色精品国产欧美乱极品| 欧美日韩亚洲综合在线| 精品污污网站免费看| 欧美日韩不卡在线| 91麻豆精品91久久久久同性| 欧美日韩不卡一区二区| 欧美男同性恋视频网站| 欧美精品乱人伦久久久久久| 欧美一区二区福利在线| 欧美一区二区视频在线观看2020| 从欧美一区二区三区| 国产91露脸合集magnet| www.激情成人| 欧美日韩aaa| 久久丝袜美腿综合| 中文字幕一区免费在线观看| 亚洲欧美精品午睡沙发| 五月天欧美精品| 精品一区二区影视| 99精品欧美一区二区三区小说| 色婷婷久久一区二区三区麻豆| 欧美日本在线看| 久久精品一级爱片| 一区二区三区精品视频在线| 另类综合日韩欧美亚洲| 国产乱码精品1区2区3区| 国产成人av电影在线播放| 色哟哟在线观看一区二区三区| 欧美一区二区精美| 中文字幕在线不卡一区| 日韩av不卡一区二区| 粉嫩欧美一区二区三区高清影视| 欧美性xxxxxxxx| 国产精品系列在线| 日韩成人免费在线| 91香蕉视频黄| 久久精品这里都是精品| 亚洲图片有声小说|