[R-sig-finance] Constrained Log-Likelihood with SQP Solver

Max bruche at cemfi.es
Fri Dec 16 15:21:07 CET 2005


Andrew Piskorski <atp <at> piskorski.com> writes:
> For the same reason that AFAIK nearly all real-world numerical
> libraries are written in either C or Fortran - for speed.

For the stuff that I write, the bottleneck is usually the function evaluation/
gradient evaluation, which I do of course implement in C if necessary. (In one
of my applications, a function evaluation took 5+ mins, with optimised C code...
and I need to run the maximisation on 30 different series.)

In this sort of case, it does matter what kind of algorithm you use (because
that determines the number of function evaluations), but it doesn't really
matter that much what language the algorithm is written in, as the number of
steps are typically only a couple of hundred, so that things like slow looping
in interpreted languages don't really play a role.

The problem that Diethelm mentioned sounded vaguely similar (I guess for each
evaluation of the likelihood function, you need to multiply some pretty large
vectors and matrices).

I guess there must be other types of applications, though, where it is necessary
to run the optimisation algorithm itself in a low-level language. I was just
wondering whether you had anything in particular in mind.

Ox is fairly high level, although more similar to C/C++ (I guess R is more
similar to Lisp in some ways). It is closed source, though, which I do agree is
a very important drawback. Actually, that's the reason I started using R.

I hadn't heard of A+, it sounds interesting, thanks.



More information about the R-sig-finance mailing list