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

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

?? multigarch.m

?? 計量工具箱
?? M
字號:
function [parameters, likelihood, stderrors, robustSE, ht, scores]=multigarch(data,p,o,q,type,errors,options,startingvals)
% PURPOSE:
%     This is a multi use univariate GARCH function which can estimate 
%     GARCH(you should use garchpq though), EGARCH(Nelson), Threshold GARCH(Zakoian), 
%     Absolute Value GARCH(Taylor/Schwert), Non-Linear Asymetric GARCH(Engle Ng), 
%     GJR-GARCH(G,J &R), Nonlinear GARCH(Higgins Bera),
%     and asymetric power GARCH(Ding Engle and Granger),
%     and a flexible garch whiel allows for non-linearities, threshold effects, 
%     news impact rotation and recentering of the news impact curve
% 
% USAGE:
%     [parameters, likelihood, stderrors, robustSE, ht, scores]=multigarch(data,p,q,type,errors,options, startingvals)
% 
% INPUTS:
%     data: Zero Mean series of regression residuals or other zero mean series
%     p :  The order of the ARCH(innovations) process
%     o :  The order of the TARCH process(only for thoses models with threshold effects)
%     q :  The order of the GARCH process
%     type :  A string telling the proc which type of model is to be estimated
%             Can be one of the following(note: ALL CAPS)
%                   Without assymetric terms
%             'GARCH'    -  Normal GARCH Model(see garchpq or fattailed_garch instead) 
%             'AVGARCH'  -  Absolute Value GARCH                   
%             'NGARCH'   -  Non-linear GARCH                       
%             'NAGARCH'  -  Non-Linear Asymetric GARCH             
%                   With assymetric terms
%             'EGARCH'   -  Exponential GARCH                      
%             'TGARCH'   -  Threshold GARCH                        
%             'GJRCARCH' -  GJR Representation of TARCH                    
%             'APGARCH'  -  Asymetric Power GARCH                  
%             'ALLGARCH' -  Asymetric Power GARCH with news impact centering parameter 
% 
% OUTPUTS:
%    parameters: a 1+p+q+special column vector of estimated model parameters, the size
%                of special depends on the model being estimated
%    logl: The log-likelihood of the likelihood function.
%    parameters : a [1+p+o+q X 1] column of parameters with omega, alpha1, alpha2, ..., alpha(p)
%                 tarch(1), tarch(2), ... tarch(o) beta1, beta2, ... beta(q)
%    likelihood = the loglikelihood evaluated at he parameters
%    ht = the estimated time varying VARIANCES
%    stderrors = the inverse analytical hessian, not for quasi maximum liklihood
%    robustSE = robust standard errors of form A^-1*B*A^-1*T^-1
%              where A is the analytic hessian
%              and B is the covariance of the scores
%    scores = the list of T scores for use in M testing
%    
%    the special parameter will contain estimates of the following, in this order
%    (non-estimated parameters are not reported), range is in paranthesis
% 
%    lambda(0, infty] -  this is the parameter which determines the power of sigma being estimaded(i.e. 2 for GARCH)
%    b(-infty, infty) -  The centering parameter for the effect of the new impact on volatility
% 
% 
% COMMENTS:
% 
%     This proceedure estimates conditional volatility of the following form:
% 
%     h(t)^(lambda)-1                                                 h(t-1)^(lambda)-1
%     ------------  = omega + a*h(t-1)^(lambda)+f(data(t-1))^(nu)+ b*-------------------
%          lambda                                                           lambda
% 
%     f(data(t))=abs(data(t)-b) - c*(data(t)-b)
% 
%     This program is in no small part influenced by the work of 
%     L. Hentschel J. of Empirical Finance 95
% 
% 
%     Author: Kevin Sheppard
%     kksheppard@ucsd.edu
%     Revision: 2    Date: 12/31/2001

if o~=0
    if strcmp(type,'GARCH') | strcmp(type,'AVGARCH') | strcmp(type,'NGARCH') | strcmp(type,'NAGARCH') 
        error('Selected model does not allow for asymetric terms')
    end
end

if strcmp(errors,'NORMAL') | strcmp(errors,'STUDENTST') | strcmp(errors,'GED')
    if strcmp(errors,'NORMAL') 
        errortype = 1;
    elseif strcmp(errors,'STUDENTST') 
        errortype = 2;
    else
        errortype = 3;
    end
else
    error('error must be one of the three strings NORMAL, STUDENTST, or GED');
end

if size(data,2) > 1
    error('Data series must be a column vector.')
elseif isempty(data)
    error('Data Series is Empty.')
end

if (length(q) > 1) | any(q < 0)
    error('Q must ba a single positive scalar or an empty vector for ARCH.')
end

if (length(p) > 1) | any(p <=  0)
    error('P must be a single positive number.')
elseif isempty(p)
    error('P is empty.')
end

if (length(o) > 1) | any(o <  0)
    error('O must be a single positive number.')
end

if (nargin <= 6) | isempty(options)
    options  =  optimset('fmincon');
    options  =  optimset(options , 'TolFun'      , 1e-004);
    options  =  optimset(options , 'Display'     , 'iter');
    options  =  optimset(options , 'Diagnostics' , 'on');
    options  =  optimset(options , 'LargeScale'  , 'off');
    options  =  optimset(options , 'MaxFunEvals' , 400*20);
    options  =  optimset(options , 'MaxSQPIter'  , 500);
end

if strcmp(type,'EGARCH');
    [parameters, likelihood, stderrors, robustSE, ht, scores]=egarch(data,p,o,q,errors,options);
    return
elseif strcmp(type,'GARCH')
    [parameters, likelihood, stderrors, robustSE, ht, scores]=fattailed_garch(data,p,q,errors,[],options);
    return
end

if isempty(q)
    q=0;
    m=p;
else
    m  =  max(p,q);   
end

if nargin<=7
    guess  =  1/(2*m+1);
    alpha  =  .05*ones(p,1)/p;
    tarchp  =  .1*ones(o,1)/o;
    beta   =  .8*ones(q,1)/q;
    omega  =  0.1*cov(data);  %set the uncond = to its expection
else
    omega=startingvals(1);
    alpha=startingvals(2:p+1);
    tarchp=startingvals(p+2:p+o+1);
    beta=startingvals(p+o+2:p+q+o+1);
end

startingvalues=[omega ; alpha; tarchp ; beta];

newoptions  =  optimset('fmincon');
newoptions  =  optimset(newoptions , 'TolFun'      , 1e-1);
newoptions  =  optimset(newoptions , 'Display'     , 'off');
newoptions  =  optimset(newoptions , 'Diagnostics' , 'off');
newoptions  =  optimset(newoptions , 'LargeScale'  , 'off');
newoptions  =  optimset(newoptions , 'MaxFunEvals' , 600*(p+o+q));
newoptions  =  optimset(newoptions , 'MaxSQPIter' , 500);
startingvalues(1:1+p+q+o)=tarch(data,p,o,q,'TARCH',[],newoptions);

[lambda, nu, b, garchtype, indicator]=multi_garch_paramsetup(type);
[sumA, sumB, startingvalues, LB, UB, garchtype]=multi_garch_constraints( startingvalues, p,o, q, data, type);

if strcmp(errors,'STUDENTST')
    sumA=[sumA';zeros(1,size(sumA,1))]';
    nuconst=zeros(1,size(sumA,2));
    nuconst(size(sumA,2))=-1;
    sumA=[sumA;nuconst];
    sumB=[sumB;-2.1];
    startingvalues=[startingvalues;10];
elseif strcmp(errors,'GED')
    sumA=[sumA';zeros(1,size(sumA,1))]';
    nuconst=zeros(1,size(sumA,2));
    nuconst(size(sumA,2))=-1;
    sumA=[sumA;nuconst];
    sumB=[sumB;-1.1];
    startingvalues=[startingvalues;2];
end

%Estimate the parameters.
stdEstimate =  std(data,1);                      
t=size(data,1);
data  =  [stdEstimate(ones(m,1)) ; data];

warning off;
[parameters, LLF, EXITFLAG, OUTPUT, LAMBDA, GRAD, HESSIAN] =  fmincon('multigarch_likelihood', startingvalues ,sumA  , sumB ,[] , [] , LB , UB,[],options,data, p , o, q, garchtype, errortype, stdEstimate);
warning on;
if EXITFLAG<=0
    EXITFLAG
    fprintf(1,'Not Sucessful! \n')
end

parameters(find(parameters(1:p+o+q+1)<  0)) = 0;
parameters(find(parameters(1) <= 0)) = realmin;
[likelihood, ht]=multigarch_likelihood(parameters,data,p,o,q,garchtype,errortype, stdEstimate);
likelihood=-likelihood;

if nargout >= 3
    %Calculate std errors if needed
    hess = hessian('multigarch_likelihood',parameters,data,p,o,q,garchtype,errortype, stdEstimate);
    stderrors=hess^(-1);
    h=min(abs(parameters/2)+1e-4,max(parameters,1e-2))*eps^(1/3);
    hplus=parameters+h;
    hminus=parameters-h;
    likelihoodsplus=zeros(t,length(parameters));
    likelihoodsminus=zeros(t,length(parameters));
    for i=1:length(parameters)
        hparameters=parameters;
        hparameters(i)=hplus(i);
        [HOLDER, HOLDER1, indivlike] = multigarch_likelihood(hparameters,data,p,o,q,garchtype,errortype, stdEstimate);
        likelihoodsplus(:,i)=indivlike;
    end
    for i=1:length(parameters)
        hparameters=parameters;
        hparameters(i)=hminus(i);
        [HOLDER, HOLDER1, indivlike] = multigarch_likelihood(hparameters,data,p,o,q,garchtype,errortype, stdEstimate);
        likelihoodsminus(:,i)=indivlike;
    end
    scores=(likelihoodsplus-likelihoodsminus)./(2*repmat(h',t,1));
    scores=scores-repmat(mean(scores),t,1);
    B=scores'*scores;
    robustSE=stderrors*B*stderrors;
end

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99re8在线精品视频免费播放| 韩国视频一区二区| 国产成人av在线影院| 无码av免费一区二区三区试看| 亚洲视频综合在线| 精品国产乱子伦一区| 欧美一级高清大全免费观看| 在线一区二区三区做爰视频网站| 97久久超碰精品国产| 日韩一区二区精品| ww久久中文字幕| 久久精品人人做| 亚洲色图制服诱惑 | 久久这里只有精品首页| 国产日韩精品一区| 一区二区国产盗摄色噜噜| 玖玖九九国产精品| 91碰在线视频| 精品成人a区在线观看| 亚洲乱码一区二区三区在线观看| 天堂久久一区二区三区| 成人一区二区三区视频在线观看 | 麻豆专区一区二区三区四区五区| 91在线视频免费观看| 欧美va亚洲va香蕉在线| 亚洲一区二区精品久久av| 国产精品亚洲一区二区三区妖精 | 日韩欧美国产不卡| 亚洲综合丁香婷婷六月香| 懂色av一区二区三区免费观看| 欧美亚洲一区二区在线| 亚洲婷婷综合色高清在线| 国产资源在线一区| 日韩三级视频在线观看| 日韩和欧美一区二区| 在线成人高清不卡| 136国产福利精品导航| 欧美亚洲综合久久| 国产在线视频精品一区| 亚洲欧美经典视频| 国产亚洲人成网站| 波多野结衣视频一区| 亚洲线精品一区二区三区八戒| 欧美一区二区三区成人| 欧美久久免费观看| 亚洲美女淫视频| 久久午夜电影网| 91老司机福利 在线| 免费成人在线视频观看| 国产视频不卡一区| 欧美一区二区三区人| 国产欧美一二三区| 久国产精品韩国三级视频| 欧美zozo另类异族| 91免费版pro下载短视频| 夜夜精品浪潮av一区二区三区| 欧美日韩三级视频| 国产毛片精品视频| 亚洲午夜精品网| 久久久噜噜噜久久中文字幕色伊伊| 丰满亚洲少妇av| 亚洲综合色在线| 欧美精品一区二区三| 99久久精品免费看| 美女久久久精品| 最新中文字幕一区二区三区| 91精品国产入口| 国产一区视频网站| 日本少妇一区二区| 亚洲图片欧美激情| 国产亚洲欧美激情| 欧美日韩国产中文| 91香蕉视频污在线| 国产激情一区二区三区| 人人爽香蕉精品| 尤物在线观看一区| 国产精品久久久久久久久晋中| 欧美一区二区三区啪啪| 欧美日韩亚洲综合在线 | 波波电影院一区二区三区| 亚洲大片在线观看| 欧美本精品男人aⅴ天堂| 国产毛片精品视频| 亚洲欧美日韩中文播放| 一本大道久久a久久综合| 中文字幕久久午夜不卡| 欧美精品乱码久久久久久按摩| 国内外成人在线| 日韩av一区二区三区| 亚洲婷婷在线视频| 国产精品视频九色porn| 精品久久久久久久人人人人传媒| 9191精品国产综合久久久久久| 一本到不卡精品视频在线观看| 成人av电影在线观看| 国产成人精品免费| 成人黄色国产精品网站大全在线免费观看| 麻豆传媒一区二区三区| 人人精品人人爱| 久久99久久久欧美国产| 国内外成人在线视频| 国产老女人精品毛片久久| 国产精品综合网| 成人aaaa免费全部观看| 91小视频在线观看| 欧美日韩一级视频| 日韩午夜电影在线观看| 亚洲精品在线三区| 国产精品剧情在线亚洲| 亚洲精品国产精华液| 夜夜嗨av一区二区三区中文字幕| 亚洲欧美日韩在线| 男女激情视频一区| 国产成人在线视频免费播放| av成人老司机| 91精品国产91久久久久久最新毛片| 欧美一区二视频| 国产精品私人影院| 亚洲一区影音先锋| 精品制服美女久久| 色哦色哦哦色天天综合| 日韩一区二区在线免费观看| 中文字幕在线一区二区三区| 亚洲麻豆国产自偷在线| 日韩av不卡一区二区| 成人黄色777网| 9191精品国产综合久久久久久| 久久精品日产第一区二区三区高清版 | 久久亚洲一区二区三区明星换脸| 欧美国产综合色视频| 蜜桃久久av一区| 色吧成人激情小说| 久久免费的精品国产v∧| 午夜欧美一区二区三区在线播放| 国产精品99久久久久久久女警| 777xxx欧美| 一区二区成人在线视频| proumb性欧美在线观看| 久久久亚洲精品石原莉奈| 日韩高清不卡一区二区| 欧美色爱综合网| 亚洲欧美区自拍先锋| av爱爱亚洲一区| 国产精品免费丝袜| 成人国产一区二区三区精品| 久久久久久久久岛国免费| 麻豆91在线观看| 日韩久久精品一区| 蜜桃一区二区三区在线观看| 678五月天丁香亚洲综合网| 亚洲国产欧美在线| 在线日韩av片| 亚洲夂夂婷婷色拍ww47| 欧洲亚洲精品在线| 亚洲国产精品天堂| 91麻豆精品91久久久久同性| 亚洲成人av一区| 日韩视频永久免费| 精品一区二区三区免费视频| 国产婷婷色一区二区三区在线| 久久99精品视频| 亚洲国产成人一区二区三区| 91麻豆免费视频| 日韩电影在线观看网站| 91精品在线观看入口| 韩国成人在线视频| 国产精品传媒视频| 欧美三级中文字幕在线观看| 老司机免费视频一区二区三区| 日韩美女天天操| 91一区一区三区| 美女脱光内衣内裤视频久久网站 | 99re6这里只有精品视频在线观看 99re8在线精品视频免费播放 | 亚洲国产精品一区二区www| 欧美一卡二卡在线观看| 国产精品亚洲а∨天堂免在线| 18成人在线观看| 日韩三级电影网址| 91久久精品一区二区三区| 卡一卡二国产精品| 亚洲人成亚洲人成在线观看图片| 欧美美女网站色| av不卡在线观看| 国模无码大尺度一区二区三区| 亚洲国产美国国产综合一区二区 | 午夜精品一区二区三区电影天堂 | 欧美熟乱第一页| 国产成人精品三级| 久久精品免费看| 午夜影视日本亚洲欧洲精品| 国产精品素人视频| 欧美精品一区二区三区视频| 欧美三电影在线| 91老司机福利 在线| 成人午夜短视频| 国产精品99久| 国产一区在线看| 国产精品综合av一区二区国产馆| 日韩二区在线观看| 天天影视网天天综合色在线播放|