⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 studentmle.m

📁 经济学专业代码
💻 M
字号:
function [Nu,Mu,Sigma]=StudentMLE(x)

% This function computes the maximum-likelihood estimate of the
% degrees of freedom Nu, the location vector Mu and the scatter matrix
% Sigma of T i.i.d. observations from the N-variate t
% distribution, organized in the TxN panel x.
% see Section 4.3.1 in "Risk and Asset Allocation" - Springer (2005), by A. Meucci


Tolerance=.01*mean(prctile(x,75)-prctile(x,25)); % robust scale factor
Nus=[1 2 4 7 12 20]; % significant grid of potential degrees of freedom

LL=[]; % log-likelihood
for s=1:length(Nus)
    Nu=Nus(s);
    [Mu,Sigma] = MleRecursionForT(x,Nu,Tolerance);
    LL=[LL LogLik(x,Nu,Mu,Sigma)];
end
%h=plot(Nus,LL);
[a,Index]=max(LL);
Nu=Nus(Index);
[Mu,Sigma] = MleRecursionForT(x,Nu,Tolerance);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -