Восстановить пароль
FAQ по входу

Duffy D.J., Kienitz J. Monte Carlo Frameworks: Building Customisable High-performance C++ Applications

  • Файл формата pdf
  • размером 3,51 МБ
Duffy D.J., Kienitz J. Monte Carlo Frameworks: Building Customisable High-performance C++ Applications
Hoboken: Wiley, 2009. — 778 p.
This is one of the first books that describe all the steps that are needed in order to analyze, design and implement Monte Carlo applications. It discusses the financial theory as well as the mathematical and numerical background that is needed to write flexible and efficient C++ code using state-of-the art design and system patterns, object-oriented and generic programming models in combination with standard libraries and tools. Includes a CD containing the source code for all examples. It is strongly advised that you experiment with the code by compiling it and extending it to suit your needs. Support is offered via a user forum on www.datasimfinancial.com where you can post queries and communicate with other purchasers of the book. This book is for those professionals who design and develop models in computational finance. This book assumes that you have a working knowledge of C ++.
Executive Overview
Description of the problem
Ordinary differential equations (ODE)
Stochastic differential equations (SDE) and their solution
Polar Marsaglia method
C++ code for uniform and normal random variate generation
The Monte Carlo method
Calculating sensitivities
The initial C++ Monte Carlo framework: hierarchy and paths
The initial C++ Monte Carlo framework: calculating option price
The predictor-corrector method: a scheme for all seasons?
The Monte Carlo approach: caveats and nasty surprises
Exercises and projects
Fundamental concepts
Random variables
Discrete and continuous random variables
Multiple random variables
A short history of integration
σ-algebras, measurable spaces and measurable functions
Probability spaces and stochastic processes
The Ito stochastic integral
Convergence theorems
Some useful inequalities
Some special functions
Convergence of function sequences
Applications to stochastic analysis
Exercises and projects
A survey of the literature
Metric spaces
Cauchy sequences, complete metric spaces and convergence
Continuous and Lipschitz continuous functions
An introduction to one-dimensional random processes
Classes of SIEs and properties of their solutions
Existence and uniqueness results
A special SDE: the Ito equation
Numerical approximation of SIEs
Transforming an SDE: the Ito formula
Appendix: proof of the Banach fixed-point theorem and some applications
Exercises and projects
Bessel processes
The exponential distribution
The beta and gamma distributions
Discrete variate generation
The Fokker-Planck equation
The Fichera function
Alternative stochastic processes
The constant elasticity of variance (CEV) model
Exact, quasi-exact and numerical solutions of CEV equation
Monte Carlo simulation of CEV models
American option pricing and hedging with the CEV model
Test cases and numerical results
Using associative arrays and matrices to model lookup tables and volatility surfaces
Summary and conclusion
The gamma functions
The error function
An overview of statistical distributions in Boost
Exercises and projects
An introduction to discrete time simulation, motivation and notation
Foundations of discrete time approximation: ordinary differential equations
Absolute error criterion
Confidence intervals for the absolute error
Dependence of the absolute error on the step size
Strong and weak convergence
The Milstein schemes
Predictor-corrector methods
Stiff ordinary and stochastic differential equations
Robust schemes for stiff systems
Stiff stochastic differential equations
Software design and C++ implementation issues
Computational results
Aside: the characteristic equation of a difference scheme
Exercises and projects
Modelling SDEs and FDM in C++
Mathematical and numerical tools
Analytical solution and numerical solution of SDEs
Brownian Bridge
Finite difference methods for Brownian Bridges
The Karhunen-Loeve expansion
Cholesky decomposition
Spread options with stochastic volatility
The Heston stochastic volatility model
Path-dependent options and the Monte Carlo method
A small software framework for pricing options
Exercises and projects
Introduction and objectives
Processes with jumps
Simulating jump times
Finite difference approximations
L´evy processes
A general convergence principle
Applications to ordinary differential equations
Applications to stochastic differential equations
Mollifiers, bump functions and function regularisation
How good is the random number generator rand()?
Approximating SDEs using strong Taylor, explicit and implicit schemes
Stability analysis of SDEs with multiplicative and additive noise
Strong Taylor approximants
Explicit strong schemes
Summary and conclusions
Exercises and projects
Basic probability
The Law of Large Numbers
The Central Limit Theorem
Lindeberg-Feller Central Limit Theorem
Explicit calculations of the confidence intervals
Quasi Monte Carlo methods
Uniform distribution and its geometric interpretation
Exercises and projects
Design Patterns
Introduction and objectives of this chapter
The advantages of domain architectures
Market model systems
Numerical simulator systems
Pricing, hedge and risk systems
Summary and conclusions
Exercises and projects
System decomposition, from concept to code
Decomposition techniques, the process
A special case: geometric decomposition
Task-based decomposition
Data decomposition
Presentation-Abstraction Control (PAC)
The Factory Method pattern
Abstract Factory pattern
Builder pattern
Exercises and projects
Introduction and objectives
Discovering which patterns to use
Whole-Part structure for a finite difference scheme
The Preprocessor agent
The Conversion agent
The Display agent and Top-Level agent
An overview of the GOF patterns
The essential structural patterns
Bridge pattern, template version
Bridge pattern, run-time version
The essential creational patterns
Factory Method pattern
The essential behavioural patterns
Strategy and Template Method patterns
Exercises and projects
Using templates to implement components: overview
Templates versus inheritance, run-time versus compile-time
Default values for template parameters
Template nesting
Template member functions
Partial template specialisation
Template template parameters
Policy-based design (PBD)
When to use inheritance and when to use generics
Creating templated design patterns
A generic Singleton pattern
Generic composite structures
Exercises and projects
Arrays, vectors and matrices
One-dimensional data structures: vectors
Two-dimensional data structures: matrices
Application: modelling N-factor SDEs
Creating adapters for STL containers
Date and time classes
Creating sets of dates and using set operations
Mapping dates to mesh points
The class string
String constructors and string properties
Extracting characters and substrings
Searching and finding in strings
Conversions between strings and other data types
A final look at the generic composite
Exercises and projects
A taxonomy of C++ pointer types
Scoped pointers
Shared pointers
Variants and discriminated unions
Any and undiscriminated types
A property class
Boost arrays
Boost signals: notification and data synchronisation
Linear algebra and uBLAS
Other libraries
String and text processing
Exercises and projects
Advanced Applications
Creating a C++ instrument hierarchy
Underlyings and derivatives
Simple property sets
Heterogeneous property sets
The payoff base class
Abstract factories for payoff classes
Exception handling
Summary and conclusions
Exercises and projects
Introduction and objectives
The structure
Adding models
Adding schemes
The Monte Carlo evaluation
Asian options
Mapping Asian options into our framework
Approximation formulae for Asian options
Control variates
Options on the running Max/Min
Barrier options
Mapping barrier options into our framework
Approximation formulae for barrier options
Importance sampling
Antithetic variables
Numerical results
Lookback options
Approximation formulae for lookback options
Remarks on cliquet options
Version of the basic cliquet option
Exercises and projects
The volatility skew/smile
The Heston model
Implementing the Heston model
Full truncation Euler scheme
Andersen’s QE scheme
The Bates/SVJ model
Implementing the Bates model
Numerical results – European options
European options – digital options
Path-dependent options – cliquet options
XLL – using DLL within Microsoft Excel
Developing using XLW
Analytic solutions for affine stochastic volatility models
Summary and conclusions
Exercises and projects
Modelling in multiple dimensions
Implementing payoff classes for multi-asset options
Approximation formulae
Quanto options
Basket options
Min/Max options
Mountain range options
The Heston model in multiple dimensions
Extending the QE scheme
Equity interest rate hybrids
Exercises and projects
The finite difference method
The pathwise method
The likelihood ratio method
Likelihood ratio for finite differences – proxy simulation
Summary and conclusions
Exercises and projects
Description of the problem
Pricing American options by regression
C++ design
Linear least squares regression
The regression function
The exercise decision
Example – step by step
Analysis of the method and improvements
Selecting basis functions
Upper bounds
Exercises and projects
Normal mean variance mixture models
C++ implementation
Matching underlying assets and martingale dynamics
Summary and conclusions
Exercises and projects
Modelling functions in C++: choices and consequences
Function pointers
Generic classes that model functions
Function objects in STL
What is polymorphism?
Performance issues in C++: classifying potential bottlenecks
Preventing unnecessary object construction
Exception handling
Templates versus inheritance
Some final tips
Temporary objects
Special features in the Boost library
Boost multiarray library
Boost random number library
STL and Boost smart pointers: final remarks
Summary and conclusions
Exercises, projects and guidelines
Uniform number generation
Pseudo random number generators
Sobol numbers
The Sobol class
Number generation due to given distributions
Acceptance/Rejection and ratio of uniforms
C++ implementation
Generating gamma distributed variates
Generating Poisson distributed variates
The Poisson process
Compensation and compounding
Poisson random measures
Jump measures
The random generator templates
Summary and conclusions
Exercises and projects
The Cholesky decomposition
The spectral decomposition
Singular value decomposition
The basics
Measures and Fourier transform
Applications to option pricing
Semi-analytical prices and their C++ implementation
Exercises and projects
Shared memory models
Sequential, concurrent and parallel programming
How fast is fast? Performance analysis of parallel programs
The life of a thread
Suitable tasks for multi-threading
Algorithm structure
Implementation mechanisms
Some model architectures
The Monte Carlo engine
The market model system
Analysing and designing large software systems: a summary of the steps
Exercises and projects
Loop optimisation
Loop interchange
Loop fission and fusion
Loop unrolling
Loop tiling
Serial loop optimisation in Monte Carlo applications
Threads in OpenMP
Data sharing
Ensuring private variable initialisation and finalisation
Reduction operations
The copyin clause and threadprivate directive
Work-sharing and parallel regions
Work-sharing constructs
The nowait clause
Nested loop optimisation
Scheduling in OpenMP
OpenMP for the Monte Carlo method
Exercises and projects
Introduction and objectives
Test scenarios
Numerical approximations for the Heston model
Testing different schemes and scenarios
Lessons learned
Extensions, calibration and more
Other numerical methods for Heston
Exercises and projects
Introduction and objectives
Interfaces and data structures
The structure of an ATL project and its classes
Implementing the methods in IDTExtensibility
Creating my first ATL project: the steps
Automation interfaces
Useful utilities and interoperability projects
COM add-in
Automation add-in
The utilities class
Exercises and projects
  • Чтобы скачать этот файл зарегистрируйтесь и/или войдите на сайт используя форму сверху.
  • Регистрация