The book explains tools for computational finance. It covers fundamental numerical analysis and computational techniques, for example for option pricing, but two topics are given special attention: simulation and optimization. Many chapters are organized as case studies, dealing with problems like portfolio insurance or risk estimation; in particular, several chapters explain optimization heuristics and how to use them for portfolio selection or the calibration of option pricing models. Such practical examples allow readers to learn the required steps for solving specific problems, and to apply these steps to other problems, too. At the same time, the chosen applications are relevant enough to make the book a useful reference on how to handle given problems. Some highlights:
- Option pricing: binomial trees, finite differences and Monte Carlo simulation; but also integration methods for pricing with the characteristic function (eg, Heston, Bates, Variance-Gamma). Calibration of surfaces under such models.
- Simulation: how to create random variates under specified marginal distributions, how to induce cross-sectional correlation (beyond Cholesky for Gaussian variates) and serial dependencies; examples for copulaes; resampling: bootstrapping data sets
- Portfolio optimization: methods to optimize portfolio under any objective function (eg, drawdown, partial moments) and constraints (eg, cardinality constraints). Sample programs for classical mean-variance analysis are also given.
- Yield-curve calibration: various strategies how to calibrate a yield-curve model: through fitting to bootstrapped yields, to bond prices or to yields-to-maturity
The NMOF manual describes how to use the NMOF package, which accompanies the book 'Numerical Methods and Optimization in Finance' by Manfred Gilli, Dietmar Maringer and Enrico Schumann. This is currently a draft, and comments are very welcome.
Examples and Extensions for the NMOF package
The report gives a number of examples (portfolio optimisation, selecting variables for a regression model) for the R-package NMOF that accompanies the book 'Numerical Methods and Optimization in Finance' by Manfred Gilli, Dietmar Maringer and Enrico Schumann.
Keywords: Heuristics, Portfolio optimisation, Asset selection, Model selection, Threshold Accepting, Differential Evolution, Genetic Algorithms, Particle Swarm, R, Distributed computing
version 2012-02-10 (This report is now superseded by the NMOF manual.)
The report showcases functions in the R-package NMOF that allow the use of distributed computing; examples are the distribution of restarts of an optimisation algorithm, or the distributed evaluation of the objective function in a Genetic Algorithm.
Keywords: Heuristics, Threshold Accepting, Genetic Algorithms, R, Distributed computing
Slides/R Code for the tutorial at R/Rmetrics Meielisalp Workshop
We give a brief introduction to optimisation models in finance, and to how such models can be handled with heuristics. Through the example of a simple combinatorial problem, we demonstrate how different optimisation strategies can be implemented in R (making use of the NMOF package). The emphasis will be on principles, both for how heuristics work and how they should be applied (in particular, we stress that these methods are stochastic). As a concrete financial example, we show how we can solve a portfolio-optimisation model with Threshold Accepting.