FINANCIAL
HACKING
Evaluate Risks, Price Derivatives, Structure Trades,
and Build Your Intuition Quickly and Easily
FINANCIAL
HACKING
Evaluate Risks, Price Derivatives, Structure Trades,
and Build Your Intuition Quickly and Easily
Philip Maymin
New York University, USA
Published by
World Scientific Publishing Co. Pte. Ltd.
5 Toh Tuck Link, Singapore 596224
USA office: 27 Warren Street, Suite 401-402, Hackensack, NJ 07601
UK office: 57 Shelton Street, Covent Garden, London WC2H 9HE
British Library Cataloguing-in-Publication Data
A catalogue record for this book is available from the British Library.
FINANCIAL HACKING
Evaluate Risks, Price Derivatives, Structure Trades, and Build Your Intuition
Quickly and Easily
Copyright 2012 by World Scientific Publishing Co. Pte. Ltd.
All rights reserved. This book, or parts thereof, may not be reproduced in any form or by any means, electronic or mechanical, including photocopying, recording or any information storage and retrieval system now known or to be invented, without written permission from the Publisher.
For photocopying of material in this volume, please pay a copying fee through the Copyright Clearance Center, Inc., 222 Rosewood Drive, Danvers, MA 01923, USA. In this case permission to photocopy is not required from the publisher.
ISBN 9789814440660
In-house Editor: Yvonne Tan
Printed in Singapore.
Dedication and Acknowledgments
For Yelena, Elena, Ellie, and Lena: my wife of many names.
I am grateful to the excellent assistance of my TAs, Prathamesh Godbole, Ray (Dongrui) Huang (twice!), and Varun Batra, and to the students in my course for their help in spotting typos in earlier versions and particularly for their active and enthusiastic participation in class.
This book would not have been possible without my father Zak, with whom I have been evaluating trading strategies, managing risk, pricing derivatives, writing papers, and having fun for the past 3+ decades.
To my daughters who wondered why papa would often stay home and punch the computer while they went out to play: I'm back!
July 30, 2012
Greenwich, Connecticut
This book is unlike any other textbook on financial engineering, primarily because this is not about financial engineering at all. It is about financial hacking.
A hacker is any person who derives joy from discovering ways to circumvent limitations.
Robert Bickford
Financial engineering is a far fancier sounding term for what is in practice the same thing, but to those new to the field, it conveys a precision and automation that is simply absent in the real world.
Building appropriate risk tolerances and financial portfolios is not at all the same as building sturdy bridges or efficient transport. There is a lot more art and conceptual work in finance; on the trading floor, the right intuition is far more valuable than the right formula.
This book's goal is to build your intuition, and in doing so, to show you how you can quickly and easily address complicated issues in risk and finance. Although money has been around for eons, finance itself is a young field. Its future is and will continue to be brighter than its past for many decades yet. A stubborn adhesion to past models and assumptions will backfire. The best approach is a fluid and flexible one.
I want to teach you finance through apprenticeship rather than rote memorization. This book is your sandbox. Think of it as the meeting minutes from a weekly research and trading seminar held at a big Wall Street firm or a hedge fund. You can play and make mistakes here so that when it is time to perform for real, you have gotten all the mistakes out of the way, and done it so thoroughly, that you know how to avoid the common pitfalls even in models and derivatives that are brand new.
How Not to Read This Book
Do not read this book in a quiet place while sitting alone and concentrating. Trading floors are busy, bustling places with constant interruptions.
And now, excuse me while I interrupt myself.
Murray Walker
Read it on a subway, in a moving vehicle, at a deli, in a bar, on the dance floor, during your Oscar acceptance speech, while you are being knighted, etc.; basically, anytime you can be rudely interrupted. It's good training.
Occasional quotations like the above punctuate this book. They serve three purposes: first is to interrupt your thinking in case you ignored my advice above and actually found a quiet place to read; second is to give a little break in the action; and third is to sometimes provide an alternative hidden viewpoint.
What You Won't Find in This Book
If you are looking for a little sleeve with a CD on it, you'll keep looking for a long time. If you are looking for a web address with all of the code from this book available there for easy download, you won't be able to find it. It's not available.
This lack of source code is a feature. How can a lack of something be a feature? And specifically, how can a book about projects not include a CD or a website with the code in it? That seems crazy. But it's the very point of the book that financial engineers learn by doing, not by copy-and-pasting.
The projects involve and discuss such tools and programming languages as Microsoft Excel, S-PLUS or R, and Mathematica. It is not the purpose of the book to teach any one language, but rather to show how to build projects in various standard tools of the trade and in expressive, easily understandable languages.
Indeed, it is not required or expected that readers know any of these languages or tools at all. The code snippets are intended to be essentially self-explanatory, though occasional tips and tricks do come in.
Examples and code snippets and projects permeate the book, and that means the book can be appreciated in two different ways. Think of it like a book on how to draw cartoons. You could just flip through the book, look at the pretty pictures, and come away with some tips you gleaned here or there. Or you can take the time to do the exercises along the way and truly master the craft.
The code I present in this book is not intended to be used by you directly. In fact, almost none of the code you will ever produce, and hopefully you will produce a lot, will be used, or should be used. Instead, the goal is that when you need to generate similar code, you will be able to do so quickly, without needing to look anything up.
Financial hacking is what traders and their assistants need to be able to do while the counterparty is still on the phone. It is about speed and intuition. You or someone else can later carefully move it to production-worthy code after several layers of quality assurance.
For a similar reason, you also won't find references or an index or a bibliography. It is the 21 st century! If you want more information about a particular topic or model or derivative, there are plenty of places to look on the web, places that change and evolve continuously.
Puzzles
Here is something that you will find in this book that is so rare anywhere else: puzzles. Deep puzzles that go to the heart of finance.
Want an example?
An investor claims that markets are not normally distributed and indeed have much fatter tails than most people believe. His strategy, therefore, is to buy wings, meaning deep out-of-the-money options that act more like lottery tickets than investment vehicles. (We will of course learn the details about what an option is, and so on, throughout the book.)
Next page