Feeds:
Posts

## Fast estimation of QML parameters for an LMSV

The thing to remember about R’s optim function is that the objective function takes a single parameter.  The parameter set for an LMSV (with ARMA(1,1)) are $(\sigma_\eta, \sigma_\epsilon, a, b)$.  One defines the LMSV (negative) log-likelhood via the Whittle approximation in the frequency domain

$LL(\omega_k) = \frac{1}{n}( \log F_\beta(\omega_k) + I(\omega_k)/F_\beta(\omega_k)$

The periodogram can be calculated with FFT using stats function spec.pgram.  Then define an objective function on the four-dimensional parameter and then one can call optim for the maximum likelihood estimation.  This is relatively fast so long as FFT is used to calculate $I$.

> opt<-optim(par=c(0.5,0.5,0.5),fn=objective,method=’BFGS’,control=list(trace=1))
initial  value 1.842240
iter  10 value 1.610545
iter  20 value 1.593672
final  value 1.592394
converged
> opt\$par[1] 0.9849976 0.9179985 0.9677956