You are previewing C# for Financial Markets.
O'Reilly logo
C# for Financial Markets

Book Description

A practice-oriented guide to using C# to design and program pricing and trading models

In this step-by-step guide to software development for financial analysts, traders, developers and quants, the authors show both novice and experienced practitioners how to develop robust and accurate pricing models and employ them in real environments. Traders will learn how to design and implement applications for curve and surface modeling, fixed income products, hedging strategies, plain and exotic option modeling, interest rate options, structured bonds, unfunded structured products, and more. A unique mix of modern software technology and quantitative finance, this book is both timely and practical. The approach is thorough and comprehensive and the authors use a combination of C# language features, design patterns, mathematics and finance to produce efficient and maintainable software.

Designed for quant developers, traders and MSc/MFE students, each chapter has numerous exercises and the book is accompanied by a dedicated companion website, www.datasimfinancial.com, providing all source code, alongside audio, support and discussion forums for readers to comment on the code and obtain new versions of the software.

Table of Contents

  1. Cover
  2. Title Page
  3. Copyright
  4. Series
  5. List of Figures
  6. List of Tables
  7. Dedication
  8. Introduction
    1. 0.1 WHAT IS THIS BOOK?
    2. 0.2 SPECIAL FEATURES IN THIS BOOK
    3. 0.3 WHO IS THIS BOOK FOR AND WHAT DO YOU LEARN?
    4. 0.4 STRUCTURE OF THIS BOOK
    5. 0.5 C# SOURCE CODE
  9. Chapter 1: Global Overview of the Book
    1. 1.1 INTRODUCTION AND OBJECTIVES
    2. 1.2 COMPARING C# AND C++
    3. 1.3 USING THIS BOOK
  10. Chapter 2: C# Fundamentals
    1. 2.1 INTRODUCTION AND OBJECTIVES
    2. 2.2 BACKGROUND TO C#
    3. 2.3 VALUE TYPES, REFERENCE TYPES AND MEMORY MANAGEMENT
    4. 2.4 BUILT-IN DATA TYPES IN C#
    5. 2.5 CHARACTER AND STRING TYPES
    6. 2.6 OPERATORS
    7. 2.7 CONSOLE INPUT AND OUTPUT
    8. 2.8 USER-DEFINED STRUCTS
    9. 2.9 MINI APPLICATION: OPTION PRICING
    10. 2.10 SUMMARY AND CONCLUSIONS
    11. 2.11 EXERCISES AND PROJECTS
  11. Chapter 3: Classes in C#
    1. 3.1 INTRODUCTION AND OBJECTIVES
    2. 3.2 THE STRUCTURE OF A CLASS: METHODS AND DATA
    3. 3.3 THE KEYWORD ‘THIS’
    4. 3.4 PROPERTIES
    5. 3.5 CLASS VARIABLES AND CLASS METHODS
    6. 3.6 CREATING AND USING OBJECTS IN C#
    7. 3.7 EXAMPLE: EUROPEAN OPTION PRICE AND SENSITIVITIES
    8. 3.8 ENUMERATION TYPES
    9. 3.9 EXTENSION METHODS
    10. 3.10 AN INTRODUCTION TO INHERITANCE IN C#
    11. 3.11 EXAMPLE: TWO-FACTOR PAYOFF HIERARCHIES AND INTERFACES
    12. 3.12 EXCEPTION HANDLING
    13. 3.13 SUMMARY AND CONCLUSIONS
    14. 3.14 EXERCISES AND PROJECTS
  12. Chapter 4: Classes and C# Advanced Features
    1. 4.1 INTRODUCTION AND OBJECTIVES
    2. 4.2 INTERFACES
    3. 4.3 USING INTERFACES: VASICEK AND COX-INGERSOLL-ROSS (CIR) BOND AND OPTION PRICING
    4. 4.4 INTERFACES IN .NET AND SOME ADVANCED FEATURES
    5. 4.5 COMBINING INTERFACES, INHERITANCE AND COMPOSITION
    6. 4.6 INTRODUCTION TO DELEGATES AND LAMBDA FUNCTIONS
    7. 4.7 LAMBDA FUNCTIONS AND ANONYMOUS METHODS
    8. 4.8 OTHER FEATURES IN C#
    9. 4.9 ADVANCED .NET DELEGATES
    10. 4.10 THE STANDARD EVENT PATTERN IN .NET AND THE OBSERVER PATTERN
    11. 4.11 SUMMARY AND CONCLUSIONS
    12. 4.12 EXERCISES AND PROJECTS
  13. Chapter 5: Data Structures and Collections
    1. 5.1 INTRODUCTION AND OBJECTIVES
    2. 5.2 ARRAYS
    3. 5.3 DATES, TIMES AND TIME ZONES
    4. 5.4 ENUMERATION AND ITERATORS
    5. 5.5 OBJECT-BASED COLLECTIONS AND STANDARD COLLECTION INTERFACES
    6. 5.6 THE LIST<T> CLASS
    7. 5.7 THE Hashtable<T> CLASS
    8. 5.8 THE  Dictionary<Key, Value> CLASS
    9. 5.9 THE Hashset<T> CLASSES
    10. 5. 10 Bitarray: DYNAMICALLY SIZED BOOLEAN LISTS
    11. 5.11 OTHER DATA STRUCTURES
    12. 5.12 STRINGS AND STRINGBUILDER
    13. 5.13 SOME NEW FEATURES IN .NET 4.0
    14. 5.14 SUMMARY AND CONCLUSIONS
    15. 5.15 EXERCISES AND PROJECTS
  14. Chapter 6: Creating User-defined Data Structures
    1. 6.1 INTRODUCTION AND OBJECTIVES
    2. 6.2 DESIGN RATIONALE AND GENERAL GUIDELINES
    3. 6.3 ARRAYS AND MATRICES
    4. 6.4 VECTORS AND NUMERIC MATRICES
    5. 6.5 HIGHER-DIMENSIONAL STRUCTURES
    6. 6.6 SETS
    7. 6.7 ASSOCIATIVE ARRAYS AND MATRICES
    8. 6.8 STANDARDISATION: INTERFACES AND CONSTRAINTS
    9. 6.9 USING ASSOCIATIVE ARRAYS AND MATRICES TO MODEL LOOKUP TABLES
    10. 6.10 TUPLES
    11. 6.11 SUMMARY AND CONCLUSIONS
    12. 6.12 EXERCISES AND PROJECTS
  15. Chapter 7: An Introduction to Bonds and Bond Pricing
    1. 7.1 INTRODUCTION AND OBJECTIVES
    2. 7.2 EMBEDDED OPTIONALITY
    3. 7.3 THE TIME VALUE OF MONEY: FUNDAMENTALS
    4. 7.4 MEASURING YIELD
    5. 7.5 MACAULEY DURATION AND CONVEXITY
    6. 7.6 DATES AND DATE SCHEDULERS FOR FIXED INCOME APPLICATIONS
    7. 7.7 EXPORTING SCHEDULERS TO EXCEL
    8. 7.8 OTHER EXAMPLES
    9. 7.9 PRICING BONDS: AN EXTENDED DESIGN
    10. 7.10 SUMMARY AND CONCLUSIONS
    11. 7.11 EXERCISES AND PROJECTS
  16. Chapter 8: Data Management and Data Lifecycle
    1. 8.1 INTRODUCTION AND OBJECTIVES
    2. 8.2 DATA LIFECYCLE IN TRADING APPLICATIONS
    3. 8.3 AN INTRODUCTION TO STREAMS AND I/O
    4. 8.4 FILE AND DIRECTORY CLASSES
    5. 8.5 SERIALISATION ENGINES IN .NET
    6. 8.6 THE BINARY SERIALISER
    7. 8.7 XML SERIALISATION
    8. 8.8 DATA LIFETIME MANAGEMENT IN FINANCIAL AND TRADING APPLICATIONS
    9. 8.9 SUMMARY AND CONCLUSIONS
    10. 8.10 EXERCISES AND PROJECTS
  17. Chapter 9: Binomial Method, Design Patterns and Excel Output
    1. 9.1 INTRODUCTION AND OBJECTIVES
    2. 9.2 DESIGN OF BINOMIAL METHOD
    3. 9.3 DESIGN PATTERNS AND CLASSES
    4. 9.4 EARLY EXERCISE FEATURES
    5. 9.5 COMPUTING HEDGE SENSITIVITIES
    6. 9.6 MULTI-DIMENSIONAL BINOMIAL METHOD
    7. 9.7 IMPROVING PERFORMANCE USING PADé RATIONAL APPROXIMANTS
    8. 9.8 SUMMARY AND CONCLUSIONS
    9. 9.9 PROJECTS AND EXERCISES
  18. Chapter 10: Advanced Lattices and Finite Difference Methods
    1. 10.1 INTRODUCTION AND OBJECTIVES
    2. 10.2 TRINOMIAL MODEL OF THE ASSET PRICE AND ITS C# IMPLEMENTATION
    3. 10.3 STABILITY AND CONVERGENCE OF THE TRINOMIAL METHOD
    4. 10.4 THE BLACK-SCHOLES PARTIAL DIFFERENTIAL EQUATION AND EXPLICIT SCHEMES
    5. 10.5 IMPLEMENTING EXPLICIT SCHEMES IN C#
    6. 10.6 STABILITY OF THE EXPLICIT FINITE DIFFERENCE SCHEME
    7. 10.7 AN INTRODUCTION TO THE ALTERNATING DIRECTION EXPLICIT METHOD (ADE)
    8. 10.8 IMPLEMENTING ADE FOR THE BLACK-SCHOLES PDE
    9. 10.9 TESTING THE ADE METHOD
    10. 10.10 ADVANTAGES OF THE ADE METHOD
    11. 10.11 SUMMARY AND CONCLUSIONS
    12. 10.12 APPENDIX: ADE NUMERICAL EXPERIMENTS
    13. 10.13 EXERCISES AND PROJECTS
  19. Chapter 11: Interoperability: Namespaces, Assemblies and C++/CLI
    1. 11.1 INTRODUCTION AND OBJECTIVES
    2. 11.2 NAMESPACES
    3. 11.3 AN INTRODUCTION TO ASSEMBLIES
    4. 11.4 REFLECTION AND METADATA
    5. 11.5 C# AND NATIVE C++ INTEROPERABILITY: HOW IS THAT POSSIBLE?
    6. 11.6 USING C# FROM C++
    7. 11.7 CODE GENERATION USING THE REFLECTION API
    8. 11.8 APPLICATION DOMAINS
    9. 11.9 SUMMARY AND CONCLUSIONS
    10. 11.10 EXERCISES AND PROJECTS
  20. Chapter 12: Bond Pricing: Design, Implementation and Excel Interfacing
    1. 12.1 INTRODUCTION AND OBJECTIVES
    2. 12.2 HIGH-LEVEL DESIGN OF BOND PRICING PROBLEM
    3. 12.3 BOND SCHEDULING
    4. 12.4 BOND FUNCTIONALITY AND CLASS HIERARCHIES
    5. 12.5 CALCULATING PRICE, YIELD AND DISCOUNT FACTORS: MATHTOOLS
    6. 12.6 DATA PRESENTATION AND EXCEL INTEROP
    7. 12.7 BOND DATA MANAGEMENT
    8. 12.8 USING THE EXCEL FILES
    9. 12.9 SUMMARY AND CONCLUSIONS
    10. 12.10 EXERCISES AND PROJECTS
  21. Chapter 13: Interpolation Methods in Interest Rate Applications
    1. 13.1 INTRODUCTION AND OBJECTIVES
    2. 13.2 INTERPOLATION AND CURVE BUILDING: BASIC FORMULA FOR INTERPOLATOR TESTS
    3. 13.3 TYPES OF CURVE SHAPE
    4. 13.4 AN OVERVIEW OF INTERPOLATORS
    5. 13.5 BACKGROUND TO INTERPOLATION
    6. 13.6 APPROXIMATION OF FUNCTION DERIVATIVES
    7. 13.7 LINEAR AND CUBIC SPLINE INTERPOLATION
    8. 13.8 POSITIVITY-PRESERVING CUBIC INTERPOLATIONS: DOUGHERTY/HYMAN AND HUSSEIN
    9. 13.9 THE AKIMA METHOD
    10. 13.10 HAGAN-WEST APPROACH
    11. 13.11 GLOBAL INTERPOLATION
    12. 13.12 BILINEAR INTERPOLATION
    13. 13.13 SOME GENERAL GUIDELINES, HINTS AND TIPS
    14. 13.14 USING THE INTERPOLATORS AND TEST EXAMPLES
    15. 13.15 SUMMARY AND CONCLUSIONS
    16. 13.16 EXERCISES AND PROJECTS
  22. Chapter 14: Short Term Interest Rate (STIR) Futures and Options
    1. 14.1 INTRODUCTION AND OBJECTIVES
    2. 14.2 AN OVERVIEW OF CASH MONEY MARKETS
    3. 14.3 SOURCES OF RISK IN MONEY MARKET TRANSACTIONS
    4. 14.4 REFERENCE RATE AND FIXINGS
    5. 14.5 STIR FUTURES
    6. 14.6 PRICING STIR OPTIONS
    7. 14.7 GENERATING INTERNATIONAL MONETARY MARKET (IMM) DATES
    8. 14.8 LIST STIR FUTURES AND STIR FUTURES OPTIONS
    9. 14.9 PUTTING IT ALL TOGETHER: STIR VERSUS OTC FROM A TRADER'S PERSPECTIVE
    10. 14.10 SUMMARY AND CONCLUSIONS
    11. 14.11 EXERCISES AND PROJECTS
  23. Chapter 15: Single-curve Building
    1. 15.1 INTRODUCTION AND OBJECTIVES
    2. 15.2 STARTING DEFINITIONS AND OVERVIEW OF CURVE BUILDING PROCESS
    3. 15.3 BUILDING BLOCKS
    4. 15.4 INTRODUCTION TO INTEREST RATE SWAP
    5. 15.5 THE CURVE CONSTRUCTION MECHANISM
    6. 15.6 CODE DESIGN AND IMPLEMENTATION
    7. 15.7 CONSOLE EXAMPLES
    8. 15.8 SUMMARY AND CONCLUSIONS
    9. 15.9 EXERCISES AND PROJECTS
    10. 15.10 APPENDIX: TYPES OF SWAPS
  24. Chapter 16: Multi-curve Building
    1. 16.1 INTRODUCTION AND OBJECTIVES
    2. 16.2 THE CONSEQUENCES OF THE CRISIS ON INTEREST RATE DERIVATIVES VALUATION
    3. 16.3 IMPACT OF USING OIS DISCOUNTING
    4. 16.4 THE BOOTSTRAPPING PROCESS USING TWO CURVES: DESCRIPTION OF THE MECHANISM
    5. 16.5 SENSITIVITIES
    6. 16.6 HOW TO ORGANISE THE CODE: A POSSIBLE SOLUTION
    7. 16.7 PUTTING IT TOGETHER, WORKING EXAMPLES
    8. 16.8 SUMMARY AND CONCLUSIONS
    9. 16.9 EXERCISES AND PROJECTS
    10. 16.10 APPENDIX: PAR ASSET SWAP SPREAD AND ZERO VOLATILITY SPREAD
  25. Chapter 17: Swaption, Cap and Floor
    1. 17.1 INTRODUCTION AND OBJECTIVES: A CLOSED FORMULA WORLD
    2. 17.2 DESCRIPTION OF INSTRUMENTS AND FORMULAE
    3. 17.3 MULTI-CURVE FRAMEWORK ON CAP, FLOOR AND SWAPTION
    4. 17.4 BOOTSTRAPPING VOLATILITY FOR CAP AND FLOOR
    5. 17.5 HOW TO ORGANISE THE CODE IN C#: A POSSIBLE SOLUTION
    6. 17.6 CONSOLE AND EXCEL WORKING EXAMPLES
    7. 17.7 SUMMARY AND CONCLUSIONS
    8. 17.8 EXERCISE AND DISCUSSION
  26. Chapter 18: Software Architectures and Patterns for Pricing Applications
    1. 18.1 INTRODUCTION AND OBJECTIVES
    2. 18.2 AN OVERVIEW OF THE GOF PATTERN
    3. 18.3 CREATIONAL PATTERNS
    4. 18.4 BUILDER PATTERN
    5. 18.5 STRUCTURAL PATTERNS
    6. 18.6 BEHAVIOURAL PATTERNS
    7. 18.7 BUILDER APPLICATION EXAMPLE: CALIBRATION ALGORITHMS FOR CAP AND FLOOR
    8. 18.8 A PDE/FDM PATTERNS-BASED FRAMEWORK FOR EQUITY OPTIONS
    9. 18.9 USING DELEGATES TO IMPLEMENT BEHAVIOURAL DESIGN PATTERNS
    10. 18.10 A SYSTEM DESIGN FOR MONTE CARLO APPLICATIONS
    11. 18.11 DYNAMIC PROGRAMMING IN .NET
    12. 18.12 SUMMARY AND CONCLUSIONS
    13. 18.13 EXERCISES AND PROJECTS
  27. Chapter 19: LINQ (Language Integrated Query) and Fixed Income Applications
    1. 19.1 INTRODUCTION AND OBJECTIVES
    2. 19.2 SCOPE OF CHAPTER AND PREREQUISITES
    3. 19.3 LINQ QUERY OPERATORS
    4. 19.4 LINQ QUERIES AND INITIAL EXAMPLES
    5. 19.5 ADVANCED QUERIES
    6. 19.6 A NUMERICAL EXAMPLE
    7. 19.7 JOIN AND GROUPJOIN
    8. 19.8 EXAMPLES IN FIXED INCOME APPLICATIONS
    9. 19.9 LINQ AND EXCEL INTEROPERABILITY
    10. 19.10 SUMMARY AND CONCLUSIONS
    11. 19.11 EXERCISES AND PROJECTS
  28. Chapter 20: Introduction to C# and Excel Integration
    1. 20.1 INTRODUCTION AND OBJECTIVES
    2. 20.2 EXCEL OBJECT MODEL
    3. 20.3 USING COM TECHNOLOGY IN .NET
    4. 20.4 PRIMARY INTEROP ASSEMBLIES (PIA)
    5. 20.5 STANDALONE APPLICATIONS
    6. 20.6 TYPES OF EXCEL ADD-INS
    7. 20.7 THE IDTExtensibility2 INTERFACE AND COM/.NET INTEROPERABILITY
    8. 20.8 DATA VISUALISATION IN EXCEL
    9. 20.9 CONCLUSION AND SUMMARY
    10. 20.10 EXERCISES AND PROJECTS
  29. Chapter 21: Excel Automation Add-ins
    1. 21.1 INTRODUCTION AND OBJECTIVES
    2. 21.2 COM OVERVIEW
    3. 21.3 CREATING AUTOMATION ADD-INS: THE STEPS
    4. 21.4 EXAMPLE: CREATING A CALCULATOR, VERSION 1
    5. 21.5 EXAMPLE: CREATING A CALCULATOR, VERSION 2
    6. 21.6 VERSIONING
    7. 21.7 WORKING WITH RANGES
    8. 21.8 VOLATILE METHODS
    9. 21.9 OPTIONAL PARAMETERS
    10. 21.10 USING VBA WITH AUTOMATION ADD-INS
    11. 21.11 SUMMARY AND CONCLUSIONS
    12. 21.12 EXERCISES AND PROJECTS
  30. Chapter 22: C# and Excel Integration COM Add-ins
    1. 22.1 INTRODUCTION AND OBJECTIVES
    2. 22.2 PREPARATIONS FOR COM ADD-INS
    3. 22.3 THE INTERFACE IDTExtensibility2
    4. 22.4 CREATING COM ADD-INS: THE STEPS
    5. 22.5 UTILITY CODE AND CLASSES
    6. 22.6 USING WINDOWS FORMS
    7. 22.7 EXAMPLE: CREATING A COM ADD-IN
    8. 22.8 DEBUGGING AND TROUBLESHOOTING
    9. 22.9 AN INTRODUCTION TO EXCEL-DNA
    10. 22.10 EXCEL COM INTEROPERABILITY AND RATE MULTI-CURVE
    11. 22.11 CONCLUSION AND SUMMARY
    12. 22.12 EXERCISES AND PROJECTS
  31. Chapter 23: Real-time Data (RTD) Server
    1. 23.1 INTRODUCTION AND OBJECTIVES
    2. 23.2 REAL-TIME DATA IN EXCEL: OVERVIEW
    3. 23.3 REAL-TIME DATA FUNCTION
    4. 23.4 EXAMPLE
    5. 23.5 THE TOPIC CLASS AND DATA
    6. 23.6 CREATING AN RTD SERVER
    7. 23.7 USING THE RTD SERVER
    8. 23.8 TESTING AND TROUBLESHOOTING THE RTD SERVER
    9. 23.9 CONCLUSION AND SUMMARY
    10. 23.10 EXERCISES AND PROJECTS
  32. Chapter 24: Introduction to Multi-threading in C#
    1. 24.1 INTRODUCTION AND OBJECTIVES
    2. 24.2 PROCESSES
    3. 24.3 USING Processstartinfo TO REDIRECT PROCESS I/O
    4. 24.4 AN INTRODUCTION TO THREADS IN C#
    5. 24.5 PASSING DATA TO A THREAD AND BETWEEN THREADS
    6. 24.6 THREAD STATES AND THREAD LIFECYCLE
    7. 24.7 THREAD PRIORITY
    8. 24.8 THREAD POOLING
    9. 24.9 ATOMIC OPERATIONS AND THE Interlocked CLASS
    10. 24.10 EXCEPTION HANDLING
    11. 24.11 MULTI-THREADED DATA STRUCTURES
    12. 24.12 A SIMPLE EXAMPLE OF TRADITIONAL MULTI-THREADING
    13. 24.13 SUMMARY AND CONCLUSIONS
    14. 24.14 EXERCISES AND PROJECTS
  33. Chapter 25: Advanced Multi-threading in C#
    1. 25.1 INTRODUCTION AND OBJECTIVES
    2. 25.2 THREAD SAFETY
    3. 25.3 LOCKING MECHANISMS FOR OBJECTS AND CLASSES
    4. 25.4 MUTEX AND SEMAPHORE
    5. 25.5 NOTIFICATION AND SIGNALLING
    6. 25.6 ASYNCHRONOUS DELEGATES
    7. 25.7 SYNCHRONISING COLLECTIONS
    8. 25.8 TIMERS
    9. 25.9 FOREGROUND AND BACKGROUND THREADS
    10. 25.10 EXECUTING OPERATIONS ON SEPARATE THREADS: THE BackgroundWorker CLASS
    11. 25.11 PARALLEL PROGRAMMING IN .NET
    12. 25.12 TASK PARALLEL LIBRARY (TPL)
    13. 25.13 CONCURRENT DATA STRUCTURES
    14. 25.14 EXCEPTION HANDLING
    15. 25.15 SHIFTING CURVES
    16. 25.16 SUMMARY AND CONCLUSIONS
    17. 25.17 EXERCISES AND PROJECTS
  34. Chapter 26: Creating Multi-threaded and Parallel Applications for Computational Finance
    1. 26.1 INTRODUCTION AND OBJECTIVES
    2. 26.2 MULTI-THREADED AND PARALLEL APPLICATIONS FOR COMPUTATIONAL FINANCE
    3. 26.3 FORK AND JOIN PATTERN
    4. 26.4 GEOMETRIC DECOMPOSITION
    5. 26.5 SHARED DATA AND READER/WRITER LOCKS: MULTIPLE READERS AND MULTIPLE WRITERS
    6. 26.6 MONTE CARLO OPTION PRICING AND THE PRODUCER–CONSUMER PATTERN
    7. 26.7 THE StopWatch CLASS
    8. 26.8 GARBAGE COLLECTION AND DISPOSAL
    9. 26.9 SUMMARY AND CONCLUSIONS
    10. 26.10 EXERCISES AND PROJECTS
  35. Appendix 1: Object-oriented Fundamentals
    1. A1.1 INTRODUCTION AND OBJECTIVES
    2. A1.2 OBJECT-ORIENTED PARADIGM
    3. A1.3 GENERIC PROGRAMMING
    4. A1.4 PROCEDURAL PROGRAMMING
    5. A1.5 STRUCTURAL RELATIONSHIPS
    6. A1.6 AN INTRODUCTION TO CONCEPT MODELLING
    7. A1.7 CATEGORISATION AND CONCEPT LEVELS
    8. A1.8 WHOLE–PART PATTERN
    9. A1.9 MESSAGE-PASSING CONCEPT VERSUS PROCEDURAL PROGRAMMING
  36. Appendix 2: Nonlinear Least-squares Minimisation
    1. A2.1 INTRODUCTION AND OBJECTIVES
    2. A2.2 NONLINEAR PROGRAMMING AND MULTI-VARIABLE OPTIMISATION
    3. A2.3 NONLINEAR LEAST SQUARES
    4. A2.4 SOME SPECIFIC METHODS
    5. A2.5 THE ALGLIB LIBRARY
    6. A2.6 AN APPLICATION TO CURVE BUILDING
    7. A2.7 RATE CALIBRATION EXAMPLE
    8. A2.8 EXERCISES AND PROJECTS
  37. Appendix 3: The Mathematical Background to the Alternating Direction Explicit (ADE) Method
    1. A3.1 INTRODUCTION AND OBJECTIVES
    2. A3.2 BACKGROUND TO ADE
    3. A3.3 SCOPING THE PROBLEM: ONE-FACTOR PROBLEMS
    4. A3.4 AN EXAMPLE: ONE-FACTOR BLACK-SCHOLES PDE
    5. A3.5 BOUNDARY CONDITIONS
    6. A3.6 EXAMPLE: BOUNDARY CONDITIONS FOR THE ONE-FACTOR BLACK-SCHOLES PDE
    7. A3.7 MOTIVATING THE ADE METHOD
    8. A3.8 THE ADE METHOD EXPOSED
    9. A3.9 THE CONVECTION TERM
    10. A3.10 OTHER KINDS OF BOUNDARY CONDITIONS
    11. A3.11 NONLINEAR PROBLEMS
    12. A3.12 ADE FOR PDEs IN CONSERVATIVE FORM
    13. A3.13 NUMERICAL RESULTS AND GUIDELINES
    14. A3.14 THE STEPS TO USE WHEN IMPLEMENTING ADE
    15. A3.15 SUMMARY AND CONCLUSIONS
    16. A3.16 EXERCISES AND PROJECTS
  38. Appendix 4: Cap, Floor and Swaption Using Excel-DNA
    1. A4.1 INTRODUCTION
    2. A4.2 DIFFERENT WAYS OF STRIPPING CAP VOLATILITY
    3. A4.3 COMPARING CAPLET VOLATILITY SURFACE
    4. A4.4 CALL PUT PARITY
    5. A4.5 CAP PRICE MATRIX
    6. A4.6 MULTI-STRIKE AND AMORTISING
    7. A4.7 SIMPLE SWAPTION FORMULA
    8. A4.8 SWAPTION STRADDLE
    9. A4.9 EXERCISES
  39. Bibliography
  40. Web References
  41. Index