ebook img

Derivatives Algorithms - Volume 1: Bones PDF

346 Pages·2016·2.49 MB·English
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Derivatives Algorithms - Volume 1: Bones

Derivatives Algorithms Volume 1: Bones Second Edition 9686_9789814699518_tp.indd 1 1/9/15 1:59 pm b1816 MR SIA: FLY PAST b1816_FM TTTThhhhiiiissss ppppaaaaggggeeee iiiinnnntttteeeennnnttttiiiioooonnnnaaaallllllllyyyy lllleeeefffftttt bbbbllllaaaannnnkkkk bb11881166__FFMM..iinndddd vvii 1100//1100//22001144 11::1122::3399 PPMM Derivatives Algorithms Volume 1: Bones Second Edition Tom Hyer World Scientific NEW JERSEY • LONDON • SINGAPORE • BEIJING • SHANGHAI • HONG KONG • TAIPEI • CHENNAI • TOKYO 9686_9789814699518_tp.indd 2 1/9/15 1:59 pm 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 Library of Congress Cataloging-in-Publication Data Hyer, Tom. Derivatives algorithm : Volume 1: bones / Tom Hyer, UBS, UK. -- Second Edition. pages cm Includes bibliographical references and index. ISBN 978-9814699518 (hardcover : alk. paper) 1. Derivative securities--Data processing. 2. Algorithms--Data processing. I. Title. HG6024.A3H94 2015 332.64'57028551--dc23 2015024082 British Library Cataloguing-in-Publication Data A catalogue record for this book is available from the British Library. Copyright © 2016 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. In-house Editors: Rajni Gamage/Karimah Typeset by Stallion Press Email: enquiries@stallionpress.com Printed in Singapore Karimah - Derivatives Algorithms - Vol 1 - Bones.indd 1 2/9/2015 10:34:33 AM September1,2015 10:14 DerivativesAlgorithms—Volume1: Bones... -9inx6in b2189-fm pagev For Kath – first, last, and always v b1816 MR SIA: FLY PAST b1816_FM TTTThhhhiiiissss ppppaaaaggggeeee iiiinnnntttteeeennnnttttiiiioooonnnnaaaallllllllyyyy lllleeeefffftttt bbbbllllaaaannnnkkkk bb11881166__FFMM..iinndddd vvii 1100//1100//22001144 11::1122::3399 PPMM September1,2015 10:14 DerivativesAlgorithms—Volume1: Bones... -9inx6in b2189-fm pagevii Contents 1. Introduction 1 1.1 Note on the Second Edition . . . . . . . . . . . . . . . . . 2 2. Principles 5 2.1 Our Code . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.1.1 auto. . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.1.2 override and final. . . . . . . . . . . . . . . . . 6 2.1.3 Wishful Thinking . . . . . . . . . . . . . . . . . . 7 2.2 Functional Programming . . . . . . . . . . . . . . . . . . . 8 2.3 Type and State . . . . . . . . . . . . . . . . . . . . . . . . 8 2.4 Physical Code Structure . . . . . . . . . . . . . . . . . . . 9 2.4.1 Facts . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.5 Platform . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.6 Some Design Patterns . . . . . . . . . . . . . . . . . . . . 12 2.6.1 Factory Method . . . . . . . . . . . . . . . . . . . 12 2.6.2 Decorator . . . . . . . . . . . . . . . . . . . . . . . 12 2.6.3 Singleton . . . . . . . . . . . . . . . . . . . . . . . 13 2.6.4 Composites . . . . . . . . . . . . . . . . . . . . . . 13 2.7 Optimization . . . . . . . . . . . . . . . . . . . . . . . . . 14 2.7.1 Calibration . . . . . . . . . . . . . . . . . . . . . . 14 2.7.2 map . . . . . . . . . . . . . . . . . . . . . . . . . . 15 2.8 Threads . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 3. Types and Interfaces 17 3.1 The User Base . . . . . . . . . . . . . . . . . . . . . . . . 17 3.2 A Public Example . . . . . . . . . . . . . . . . . . . . . . 18 vii September1,2015 10:14 DerivativesAlgorithms—Volume1: Bones... -9inx6in b2189-fm pageviii viii DerivativesAlgorithms 3.3 Interface Generation . . . . . . . . . . . . . . . . . . . . . 21 3.4 Interface Types . . . . . . . . . . . . . . . . . . . . . . . . 22 3.4.1 Tables and Cells . . . . . . . . . . . . . . . . . . . 22 3.4.2 Variety . . . . . . . . . . . . . . . . . . . . . . . . 23 3.4.3 Containers . . . . . . . . . . . . . . . . . . . . . . 25 3.5 Machinist . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 3.6 Exception Messaging . . . . . . . . . . . . . . . . . . . . . 29 3.6.1 Macro Hackery . . . . . . . . . . . . . . . . . . . . 32 3.7 Environment . . . . . . . . . . . . . . . . . . . . . . . . . 34 3.7.1 Fast-Path Optimization . . . . . . . . . . . . . . . 37 3.7.2 Repository Access . . . . . . . . . . . . . . . . . . 41 3.8 Enumerated Types . . . . . . . . . . . . . . . . . . . . . . 43 4. Vector and Matrix Computations 47 4.1 Customizing Vectors . . . . . . . . . . . . . . . . . . . . . 47 4.2 Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . 48 4.2.1 Join . . . . . . . . . . . . . . . . . . . . . . . . . . 51 4.3 Matrices and Square Matrices . . . . . . . . . . . . . . . . 52 4.3.1 Internal Layout . . . . . . . . . . . . . . . . . . . 52 4.3.2 Pasting and Formatting . . . . . . . . . . . . . . . 53 4.4 Matrix Multiplication . . . . . . . . . . . . . . . . . . . . 55 4.4.1 Inheritance and Substitutability . . . . . . . . . . 56 4.5 Decompositions (Square) . . . . . . . . . . . . . . . . . . . 57 4.6 Decompositions (Symmetric) . . . . . . . . . . . . . . . . 58 4.7 Decompositions (Sparse) . . . . . . . . . . . . . . . . . . . 60 4.7.1 Tridiagonal Matrices. . . . . . . . . . . . . . . . . 61 4.7.2 Band Diagonal Matrices. . . . . . . . . . . . . . . 62 4.7.3 SLAP Format . . . . . . . . . . . . . . . . . . . . 64 4.7.4 The Symmetric Case . . . . . . . . . . . . . . . . 67 4.8 Decompositions (Other) . . . . . . . . . . . . . . . . . . . 69 5. Persistence and Memory 71 5.1 Storage . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 5.2 Extraction . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 5.2.1 Example: Linear Interpolant . . . . . . . . . . . . 76 5.2.2 Reader Registry . . . . . . . . . . . . . . . . . . . 78 5.3 Code Generation . . . . . . . . . . . . . . . . . . . . . . . 78 5.4 A Display Interface . . . . . . . . . . . . . . . . . . . . . . 80 September1,2015 10:14 DerivativesAlgorithms—Volume1: Bones... -9inx6in b2189-fm pageix Contents ix 5.4.1 Storage . . . . . . . . . . . . . . . . . . . . . . . . 80 5.4.2 Display Format . . . . . . . . . . . . . . . . . . . 82 5.4.3 Extraction . . . . . . . . . . . . . . . . . . . . . . 83 5.4.4 Refinements . . . . . . . . . . . . . . . . . . . . . 86 5.5 Auditing . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 5.5.1 Bag . . . . . . . . . . . . . . . . . . . . . . . . . . 87 5.5.2 Filling Up . . . . . . . . . . . . . . . . . . . . . . 88 5.5.3 Audit Types . . . . . . . . . . . . . . . . . . . . . 90 5.6 More on Repositories . . . . . . . . . . . . . . . . . . . . . 92 5.6.1 Naming . . . . . . . . . . . . . . . . . . . . . . . . 92 5.6.2 Matching . . . . . . . . . . . . . . . . . . . . . . . 93 5.6.3 Capturing State . . . . . . . . . . . . . . . . . . . 93 5.6.4 Unique Objects . . . . . . . . . . . . . . . . . . . 94 6. Testing Framework 97 6.1 Component Tests . . . . . . . . . . . . . . . . . . . . . . . 97 6.1.1 Physical Structure . . . . . . . . . . . . . . . . . . 99 6.1.2 Reuse . . . . . . . . . . . . . . . . . . . . . . . . . 99 6.2 Regression Tests . . . . . . . . . . . . . . . . . . . . . . . 100 6.2.1 Repository Instrumentation . . . . . . . . . . . . . 100 6.3 No Silver Bullet . . . . . . . . . . . . . . . . . . . . . . . . 101 7. Further Maths 103 7.1 Interpolation . . . . . . . . . . . . . . . . . . . . . . . . . 103 7.1.1 Functions of Time . . . . . . . . . . . . . . . . . . 105 7.2 Special Functions . . . . . . . . . . . . . . . . . . . . . . . 106 7.2.1 The Normal Distribution . . . . . . . . . . . . . . 106 7.3 Root Solvers . . . . . . . . . . . . . . . . . . . . . . . . . . 107 7.4 Underdetermined Search . . . . . . . . . . . . . . . . . . . 111 7.4.1 Function and Jacobian . . . . . . . . . . . . . . . 112 7.4.2 Weights and Smoothing . . . . . . . . . . . . . . . 114 7.4.3 Monitoring Progress . . . . . . . . . . . . . . . . . 115 7.5 Quadrature . . . . . . . . . . . . . . . . . . . . . . . . . . 117 7.5.1 Gaussian Quadrature . . . . . . . . . . . . . . . . 118 7.5.2 Adaptive Quadrature . . . . . . . . . . . . . . . . 120 7.6 Distributions . . . . . . . . . . . . . . . . . . . . . . . . . 120 7.6.1 Implied Vol . . . . . . . . . . . . . . . . . . . . . . 121 7.7 Baskets . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122

Description:
Derivatives Algorithms — Volume 1: Bones (Second Edition) is for practicing quants who already have some expertise in risk-neutral pricing and in programming, and want to build a reusable and extensible library. Rather than specific models, this volume provides foundations common to all pricing, s
See more

The list of books you might like

book image

The 48 Laws of Power

Robert Greene
·1998
·2.84 MB

book image

The Subtle Art of Not Giving a F*ck

Mark Manson
·224 Pages
·2016
·1.26 MB

book image

PostgreSQL 15 изнутри

Егор Рогов
·664 Pages
·2023
·12.655 MB

book image

What's Bred in the Bone by Grant Allen

Allen, Grant, 1848-1899
·2004
·0.29 MB

book image

Ojo por ojo

Ameneh Bahrami
·2013
·0.926 MB

book image

BarcodeX ActiveX control reference

24 Pages
·2008
·0.41 MB

book image

(PCOR) Data

227 Pages
·2017
·6.5 MB

book image

Greek Government Gazette: Part 2, 2006 no. 1706

The Government of the Hellenic Republic
·2006
·0.11 MB

book image

Life-media for a wireless world

Light, Evan
·294 Pages
·2013
·19.46 MB