This is a further question to my original question, where I did not get a helpful answer. I want to fit a t-distribution to my data, whose probability density function is:
\begin{align*}
f(l|\nu ,\mu ,\beta) = \frac{\Gamma (\frac{\nu+1}{2})}{\Gamma (\frac{\nu}{2}) \sqrt{\pi \nu} \beta} \left(1+\frac{1}{\nu}\left(\frac{l – \mu}{\beta}\right)^2 \right)^{-\frac{1+\nu}{2}}
\end{align*}
First of all, I use maximum-likelihood estimation of the parameters (ML) with the following code (Fitting t distribtution to financial data):
# fit t distribution
library(MASS)
fitdistr(alvsloss, "t")
# or
# log-likelihood function
loglik <-function(par){
if(par[2]>0 & par[3]>0) return(-sum(log(dt((alvsloss-par[1])/par[2],df=par[3])/par[2])))
else return(Inf)
}
# optimisation step
optim(c(0,0.1,2.5),loglik)
I get the following output:
m s df
-0.0004919768 0.0130128873 2.6340459185
( 0.0003182568) ( 0.0003453702) ( 0.1620424078)
and
$par
[1] -0.0004451138 0.0129659465 2.6182237477
which is more or less the same, I guess differences are due to the precision of the numerical procedures.
Now I want to use the method of moments, based on this paper, where mean, variance and kurtosis are as follows:
\begin{align}
\mu=&E(l)\\
\sigma^2 =& V(l)= E((l-\mu)^2)=\frac{\beta \nu}{\nu-2} , \nu>2\\
\kappa=&\frac{6}{\nu-4} , \nu > 4
\end{align}
my first questions:
- Why are they using the excess kurtosis and not the third moment, skewness?
- What values do I have to insert, is the following correct?:
mean:
\begin{align*}
\mu=E(l)=\bar{l}
\end{align*}
variance
\begin{align*}
\sigma^2 = V(l)= E((l-\mu)^2)=\frac{\beta \nu}{\nu-2} = \frac{1}{n}\sum_{i=1}^n (l_i-\bar{l})^2, \nu>2
\end{align*}
excess kurtosis
\begin{align*}
\kappa=\frac{6}{\nu-4} = \frac{1}{n} \sum_{i=0}^n \left(\frac{l_i-\bar{l}}{s}\right)^4-3, \nu > 4
\end{align*}
this gives:
\begin{align}
\hat{\mu}_{MM}=&\bar{l}\\
\hat{\nu}_{MM} =& \frac{6}{\left(\frac{1}{n} \sum_{i=1}^n \left(\frac{l_i-\bar{l}}{s}\right)^4-3\right)} + 4\\
\hat{\beta}_{MM} =& \left(\frac{1}{n}\sum_{i=1}^n (l_i-\bar{l})^2\right) * \frac{(\hat{\nu}-2)}{\hat{\nu}}
\end{align}
so I am using the sample mean, sample variance and sample excess kurtosis. Is this correct?
And my main question: The output of ML tells me (the column df), that $\nu$<4 ($\nu$ is the number of degrees of freedom, df), but in MM I need $\nu$ to be greater than 4 or? So what does this mean? Is MM not usable? Or does it not matter?
Best Answer
In your previous question it was already noted that
In this case the MLE indicates that the $\nu<3$. Then, it does not makes sense at all to use the method of moments. The method of moments is very restrictive and, in this case, the MLE approach is giving you a good fit.
If you want to consider an alternative method you could use Bayesian inference.