# Skewed Student t distribution MLE and Simulation

I have Financial LOB data and I feel that a skewed t distribution will fit best. I have a problem trying to find the parameters using MLE numerically since Matlabs built in function does not allow for Skewed t-distn.

Can somebody point me to some code which will find the parameters? Or can someone offer advice for an easy way to do this? I also need to simulate using these parameters but I think this is easier

Cheers

Can you not just measure the moments of your data, and then use them to find mu and v?

where the second simplifies to

i think the fitdistrplus library in R could help you with this:

fitdist(data, distr, method = c("mle", "mme", "qme", "mge"),
start=NULL, fix.arg=NULL, discrete, keepdata = TRUE, keepdata.nb=100, ...)

# for student t
fitdistr(x, "t", start = list(m=mean(x),s=sd(x), df=3), lower=c(-1, 0.001,1))

• He states in the question that matlab's built in functions don't allow for a skewed-t dist, so you won't be able to do this. – will May 23 '16 at 11:08

You might have a look at the "sn" R package in CRAN:

Link to standard R documentation for CRAN package sn

It has a skewed t distribution implemented as well as an MLE function.

Alternatively, a simple approach (which leads to a slightly ugly looking distribution) would be to model the positive returns and negative returns separately. In pseudocode:

1) Separate the positive returns (LOB gains) and negative returns into different vectors

2) Using the positive returns, multiply them all by -1 and append them to the original positive return data set, creating a symmetric return series

3) Do a standard Student t MLE fit to this data

4) Repeat the above steps for the negative return data, creating a symmetric time series, etc.

You now have a version of "the" skewed t distribution (there are a number of ways of creating a skewed t distribution) which has a discontinuity at the zero return point - this is ugly, but the method is at least simple and straightforward. As you can imagine, simulation is also very easy: if your starting uniform random is < 0.5 then you use the "loss" parameters, otherwise you use the "gain" parameters. It may be that you only really care about the losses - if so then the above process is even simpler.