my problem is to use the daily market return data to get the monthly conditional variance.

The monthly conditional variance is the sum of weighted squared demeaned daily return within 250 days ( trading days in one year), multiplying 22 (trading days in one month). The weight of squared demeaned daily return is decided by a function, and the literature says we need to use maximum likelihood to get the parameters in the weight function.

I try to use the log likelihood function estimation. but it seems that the it requires me to get the log likelihood function of the original regression. However, I do not know how to figure out the log likelihood function of my equation.

Please find more detail on the relevant literature. See

Ghysel, E.,Santa-Clara,P.,Valkanov,R.,2005. there is a -returntradeoff after all. Journal of Financial Economics76,509–548.

I also attach the image of two equations. The first equation is to get the monthly volatility by sum of weighted squared demeaned daily return within 250 days multiplying 22. The second equation needs to be estimated by maximum likelihood function to get the weight. Wd represents weight, K1 and K2 are parameters we need to estimate,