TGARCH variance

조회 수: 3 (최근 30일)
Besnik
Besnik 2012년 5월 24일
Hi I have estimate the conditional variance of a given financial time series data under the hypothesis that the returns follow a student t distribution with this specification
spec = garchset('P',1,'Q',1,'C',NaN,'Distribution','T','Display','off');
h=par.K + par.ARCH+par.GARCH;
I want this to estimate the Value at Risk. What I wanna know is if the variance estimated with this code is corrected by the degrees of freedom (I have set the degrees of freedom 10).I can't find in any manual how this variance is estimated and if is corrected by the degrees of freedom! Thank you very much.
EDIT [25 May 2012, 13:36 BST - OK] Added code from comments.
T=length(r); WE=1000;
p = 0.01;
VaR = zeros(T,1);
spec = garchset('P',1,'Q',1,'C',NaN,'Distribution','T','Display','off');
for t=WE+1:T
t1 = t-WE; t2 =t-1;
window = r(t1:t2);
[par, errors, LLF, innovations, ht]=garchfit(spec,window);
h=par.K + par.ARCH*window(end)^2+par.GARCH*ht(end)^2;
VaR(t,1)=-sqrt(h)*tinv(p,10);
end
  댓글 수: 2
Oleg Komarov
Oleg Komarov 2012년 5월 24일
I think you skipped some lines of code, where does 'par' come from?
Besnik
Besnik 2012년 5월 25일
Hi the code is
T=length(r); WE=1000; p = 0.01: VaR = zeros(T,1); spec = garchset('P',1,'Q',1,'C',NaN,'Distribution','T','Display','off'); for t=WE+1:T t1 = t-WE; t2 =t-1; window = r(t1:t2); [par, errors, LLF, innovations, ht]=garchfit(spec,window); h=par.K + par.ARCH*window(end)^2+par.GARCH*ht(end)^2; VaR(t,1)=-sqrt(h)*tinv(p,10); end
with this code I estimate the parameters and calculate the variance under the hypothesis that the returns follow a student t distribution. par is for parameter. What I want to know is if the variance calculated in this way is corrected by the degrees of freedom this is very important for my thesis. Thank you.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Conditional Mean Models에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by