December 8th, 2015, 4:47 pm
I want to present Octave / Matlab code for pricing american equity option with the Willow Tree (WT) model.The WT model is a lattice based models, where the number of nodes per time step is fixed. The transition probabilities between the nodes are optimized to fulfill no arbitrage conditions. The biggest advantage is the fast valuation on the lattice because of the smaller number of total nodes compared to a bi/trinomial lattice model.One drawback is the need for optimization of the transition probabilies. Although this optimization has to be done only once for a discrete set of [nodes,timesteps, maturity], this is a limitation in practical implementations.You find the Octave code here (no special packages are needed, tested with Octave > 3.6.1):click hereI am neither quant nor English native speaker, so please just ask if I expressed myself in an inconsistent way :)To understand possible applications of the model, I will give you some background:- I am working in the risk management industry on the implementation of internal models of asset managers, banks and insurance companies- I am using for my private trading a market risk tool based on a full valuation Monte-Carlo approach with 50000 scenarios - this market rist tool is completely written in Octave, therefore all pricing functions have also be written in Octave for maintenance reasons.- the tool is used for risk assessment of trading of European (right now) and (in the future) American options. As risk measures Value at risk, expected shortfall and stress scenario values are calculated- most important is speed > accuracy. In risk management I am more interested in the delta between stressed scenario and base scenario than in the absolute level (in any case a calibration of the model values to observed market values is performed). The WT methods yields accuracy in the range of <0.5% compared to the binomial model for american option pricing, which is absolutely sufficient for my use case.- to keep the calculation fast, full vectorization of any implementation has to be possible. As input data, 50000x1 vectors have to be accepted.The last point is the reason why binomial lattice models don't work for my use case - the memory consumption for parallel computation of 50000 scenarios, decent time step size (1 or 2) and up to 180 days to maturity is way to large -> another solution has to be foundThis was the reason for the implementation of the WT model.My intention is that- you have a code of the working WT model (I couldn't find any working code on the internet)- perhaps somebody is debugging the code and / or finds it useful- you can give me hints for other faster methods of american option pricing, which can be implemented in Octave (full vectorization, 50000 scenarios)The implementation is based on the literature:Quote"Willow Tree", Andy C.T. Ho, Master thesis, May 2000"Willow Power: Optimizing Derivative Pricing Trees", Michael Curran, ALGO RESEARCH QUARTERLY, Vol. 4, No. 4, December 2001My own model verifications and the papers suggest that the WT model yields quite accurate results for time step sizes in the range of 2 to 5 days and for 20 to 30 nodes per time step. Therefore I included optimized p and z values to approximate a normal distribution for nodes ranging from 10 to 50 values, which should be sufficient for fast and accurate pricing.For practical purposes, one would pre-optimize for stand sets of maturities / time step sizes / number of nodes and store the transition propabilities in a database or specific structure. Curran provides formulas for interpolation of transition probabilities between pre-optimized time steps.The implementation right now is for equity options only, but in principle you can include any stochastic process for your underlying financial instruments (like IR rates etc.)Comments and critics welcome!Best,Schinzilord