Natural Blogarithms Ramblings of a Christian Mathematician and Bioinformaticist

24Jan/066

Debugged!!

I finally hacked it. (see previous post). During a road trip to watch the basketball teams play in OK City, I finally discovered the problem with the code where we were using a nonlinear optimizer to determine the optimal portifolio by minimizing a quantity called, "Value at Risk." Basically, the problem boiled down the fact that the optimization algorithms require a deterministic result. We are using a gradient reduction technique to minimize the objective function. In essence, you take small steps in the direction of steepest descent, but our objective function involved a bootstrapping technique that appoximates the 1st (or k-th) percentile of portfolio returns. The appoximation was based on randomly sampling with replacement from the history of returns, then calculating the 1st (or k-th) percentile. Because of the randomness, a single choice of stock/fund distribution can produce a different Value at Risk in different iterations. With all that said, we can now correct the problem, Yeehaw!

Filed under: Mathematics 6 Comments