Friday, September 24, 2010

optimization of conditional value-at-risk

by rockafellar and uryasev good description of cvar and why it's superior to var (value at risk) for portfolio optimization. they use a math technique sort of like a lagrange multiplier (not really, but works in a similar way) to transform the otherwise 2-step procedure for computing and optimizing conditional value at risk to a single stochastic optimization, convex (piecewise linear). it can then be solved with either linear programming or a nonsmooth optimizer.
interesting side note: they use a sobol sequence to get superior performance over straight-up mc. (the wikipedia article on sobol quasi-random sequences is quite dense and hard to understand, but here's a nice article that shows a monte-carlo integration example with a finance application, refs to niederreiter, sobol, and faure qrs. bottom line: niederreiter is (maybe) best.) also shows examples of portfolio optimization and optimal hedging with a butterfly spread.
certainly this is a better read than the highly mathematical paper that introduced cvar (convex measures of risk and trading constraints by f\"ollmer and schied). all i can really remember about that one is the point about cvar being convex (while var is not) and why that's important: diversification (mathematically, linearly interpolating between two portfolios) should not increase risk. still, i think it's interesting that an industry-standard book on portfolio optimization like 'active portfolio management' by grinold and khan would brush off all risk metrics other than variance so lightly. maybe return distributions really are close enough to gaussian (with exceptions for derivatives, etc.) that it doesn't matter in practice, as they claim. at least anything that can compute those quantities should also give the variance for comparison. call number:336.767 GRI ID:2406743083 Active portfolio management : a quantitative approach for providing superior returns and controlling risk / Richard C. Grinold, Ronald N. Kahn. good book to have in the personal library, although there will be an updated version out later this year or next.

Sunday, September 12, 2010

nice fashionista blog

here's a blog that goes into some detail about why some types of clothing are higher quality than others, and how to take care of them. i don't normally go in for the gq stuff, and i currently can't afford anything in the blog, but someday i might have to. and i like the take permanentstyle has on fashion: permanent style, not semiannual closet churn.

Friday, September 3, 2010

pycxx vs. cython for python + c++

cython apparently has some capability for wrapping c++, with some workarounds and remaining issues as of v0.13. pycxx (or cxx) takes on the interface question from the c++ side, giving python a more c++ friendly api that can call/access either from the other (though i think python is still intended to be in the driver's seat).
i guess the question is whether i want to use more c++ (with pycxx) or a pythonesque third language (cython pyx).
i've seen some references to using c++ with weave.accelerate, but not sure if that has any advantage over either of the other two.

Wednesday, September 1, 2010

quant job interview questions and answers

nice book by mark joshi et al. recent, relevant, $35 print on demand from lulu. lots of advice and questions to prep for that interview and gauge how ready you are to apply. good refs, including the big one by author 1 ('the concepts and practice of mathematical finance'); xlw, the c++ plug in maker for excel api; and 'thinking in c++' (available free online from various mirrors).

Friday, August 27, 2010

beyond deterministic optimization

i've come to realize that my multiobjective optimization problem is far from simple, with a lot of functions with noise-induced multimodality (FNIM) (numerical noise creating local minima). so i've been looking for previous work on how to deal with it. the fnim literature i've found seems to be very navel-gazing in that they look at how global minima bifurcate at the noise level is increased. but not as much on how to overcome the problem.
the term 'robust optimization' seems to be dominated by some guys from stanford, mit/singapore, and israel who have a particular framework that is not so useful to me right now. they assume the data going into the objective function are from a distribution that is an unknown member of a set of possible distros, and they want to protect against the worst-case from that set while strictly obeying the constraints. i think it's more of a mini-max problem, and what i need is to account for the uncertainty without needing to be so conservative. also, most, though not all, of the applications have a linear programming bend.
i'm not sure if stochastic optimization is what i need, but i'll check it out.

Wednesday, August 25, 2010

proposition 8 decision

the emergency motion to stay judge walker's ruling is a well-written review and critique of the district court's prop 8 decision, especially the first 3 pages (even though it's a summary, it's a thorough summary). actually, the whole thing is pretty good although there are a couple of pages in the middle that are more dense.

Friday, August 20, 2010

trading hocus pocus

i think i found the source for that reference to the use of fibonacci numbers in trading. there's a charlatan in peddling books and software based on numerological mysticism. i can't believe people are paying $500 a pop for his stupid software and >$150 for the book. really makes me wonder why i can't put together some of my code and sell it, if anyone is willing to buy that bovine byproduct. check out this gem from his website:
What's in the book: Fibonacci ratios as market tools.
For centuries, scientists, mathematicians, and artisans have discovered that the Fibonacci sequence of numbers is replicated throughout nature. This amazing number series defines the appearance of physical structures, as well as the PROGRESS OF CHANGE AND GROWTH governing dynamic structures and systems.
The Fibonacci sequence is found in the structures of trees, plants, and flowers. A regular sequence of Fibonacci numbers occurs in the relationship between a particular branch and the next branch. Fibonacci relationships also exist between leaves and stems. Radio signals generated by pulsars conform to Fibonacci numbers. Research reveals that many natural crystals contain the Fibonacci golden ratio, 1.618. There is even speculation by Dr. John Penrose of the Institute of Mathematics at Oxford, that the golden ratio may provide the crucial link between the sub-atomic and the supra-atomic world!
Human behavior has a dualistic nature. We think and act both as individuals and as part of a crowd. A crowd has its own energy and collective mind. It can be viewed as a dynamic system and, as such, it is governed by the same laws that exist throughout nature. Since a crowd is a dynamic system, and since financial and agricultural markets exhibit crowd behavior, it follows logically that Fibonacci relationships should be intrinsic to all liquid markets. These all important numbers and ratios indicate areas of contraction and expansion in price-wave movements. The concepts of Fibonacci support, resistance, and expansion in price function due to the principle inherent in the unfolding of all natural phenomena, including the behavior of crowds and the collective mind. The real difficulty is in the PROPER AND PRACTICAL APPLICATION of this natural phenomena to price movements. It is precisely that difficulty which DiNapoli Levels is designed to address. The text puts it all together in a unified trading approach you can act on!
This book also dispels myths about Fibonacci analysis and only covers those techniques that are useful and practical to employ in real life trading situations.
oh, good. it dispels all the myths and only covers the practical parts of this nonsense.