I'm currently doing some researches on calendar anomalies in Finance and I would like to use a GARCH model in the process.
In order to achieve this task, I have to find the estimates with maximum likelihood. I'm a newbie on Matlab but I know the command fminunc with options should be used to get the outcomes I'm looking for.
Unfortunatly, I have some issues when I try, with a little script, to define my likelihood function. I precise that I have six unknows (5 betas linked to my dummies variables and sigma, the variance) and also constraints for the maximisation process.
The aim of this script was to define a density function (for a given value of returns and dummies) and then multiply it in a loop to all the other values of my data to finally get my LLF.
I'm sure my code is too basic and I'm far from the optimal way of doing it.
Maybe you can help me solve this issue.
I let my code in attachment if needed.