Modern Computational Finance
Реклама. ООО «ЛитРес», ИНН: 7719571260.
Оглавление
Antoine Savine. Modern Computational Finance
Table of Contents
Guide
Pages
Modern Computational Finance. Scripting for Derivatives and xVA
My Life in Script by Jesper Andreasen
Introduction
NOTES
CHAPTER 1 Opening Remarks. INTRODUCTION
1.1 SCRIPTING IS NOT ONLY FOR EXOTICS
1.2 SCRIPTING IS FOR CASH‐FLOWS NOT PAYOFFS
1.3 SIMULATION MODELS
1.4 PRE‐PROCESSING
1.5 VISITORS
1.6 MODERN IMPLEMENTATION IN C++
1.7 SCRIPT TEMPLATES
NOTES
CHAPTER 2 Expression Trees
2.1 IN THEORY. Anatomy of an expression
A recursive definition
Examples
2.2 IN CODE
NOTE
CHAPTER 3 Visitors. 3.1 THE VISITOR PATTERN
3.2 THE DEBUGGER VISITOR
3.3 THE VARIABLE INDEXER
3.4 PRE‐PROCESSORS
3.5 CONST VISITORS
3.6 THE EVALUATOR
3.7 COMMUNICATING WITH MODELS
NOTES
CHAPTER 4 Putting Scripting Together with a Model. 4.1 A SIMPLISTIC BLACK‐SCHOLES MONTE‐CARLO SIMULATOR
4.1.1 Random number generators
4.1.2 Simulation models
4.1.3 Simulation engines
4.2 CONNECTING THE MODEL TO THE SCRIPTING FRAMEWORK
NOTES
CHAPTER 5 Core Extensions and the “Pays” Keyword
5.1 IN THEORY
5.2 IN CODE
NOTE
Introduction
CHAPTER 6 Past Evaluator
CHAPTER 7 Macros
CHAPTER 8 Schedules of Cash‐Flows
Barrier script 1
Barrier script 2
CHAPTER 9 Support for Dates
NOTE
CHAPTER 10 Predefined Schedules and Functions
CHAPTER 11 Support for Vectors
11.1 BASIC FUNCTIONALITY
11.2 ADVANCED FUNCTIONALITY
11.2.1 New node types
11.2.2 Support in the parser
11.2.3 Processing
11.2.4 Evaluation
Introduction
NOTE
CHAPTER 12 Linear Products
12.1 INTEREST RATES AND SWAPS
12.2 EQUITIES, FOREIGN EXCHANGE, AND COMMODITIES
12.3 LINEAR MODEL IMPLEMENTATION
CHAPTER 13 Fixed Income Instruments
13.1 DELAYED PAYMENTS
13.2 DISCOUNT FACTORS
13.3 THE SIMULATED DATA PROCESSOR
13.4 INDEXING
13.5 UPGRADING “PAYS” TO SUPPORT DELAYED PAYMENTS
13.6 ANNUITIES
13.7 FORWARD DISCOUNT FACTORS
13.8 BACK TO EQUITIES
13.9 LIBOR AND RATE FIXINGS
13.10 SCRIPTS FOR SWAPS AND OPTIONS
CHAPTER 14 Multiple Underlying Assets. 14.1 MULTIPLE ASSETS
14.2 MULTIPLE CURRENCIES
CHAPTER 15 American Monte‐Carlo
15.1 LEAST SQUARES METHOD
15.2 ONE PROXY
15.3 ADDITIONAL REGRESSION VARIABLES
15.4 FEEDBACK AND EXERCISE
15.5 MULTIPLE EXERCISE AND RECURSION
NOTES
Introduction
CHAPTER 16 Risk Sensitivities with Monte‐Carlo. 16.1 RISK INSTABILITIES
16.2 TWO APPROACHES TOWARD A SOLUTION
16.3 SMOOTHING FOR DIGITALS AND BARRIERS
16.4 SMOOTHING FOR SCRIPTED TRANSACTIONS
NOTE
CHAPTER 17 Support for Smoothing
CHAPTER 18 An Automated Smoothing Algorithm
18.1 BASIC ALGORITHM
18.2 NESTED AND COMBINED CONDITIONS
18.3 AFFECTED VARIABLES
18.4 FURTHER OPTIMIZATION
NOTE
CHAPTER 19 Fuzzy Logic
NOTE
CHAPTER 20 Condition Domains
20.1 FUZZY EVALUATION OF DISCRETE CONDITIONS. 20.1.1 Condition domains
20.1.2 Constant conditions
20.1.3 Boolean conditions
20.1.4 Binary conditions
20.1.5 Discrete conditions
20.1.6 Putting it all together
20.2 IDENTIFICATION OF CONDITION DOMAINS
20.3 CONSTANT EXPRESSIONS
NOTE
CHAPTER 21 Limitations
21.1 DEAD AND ALIVE
21.2 NON‐LINEAR USE OF FUZZY VARIABLES
CHAPTER 22 The Smoothing Factor
22.1 SCRIPTING SUPPORT
22.2 AUTOMATIC DETERMINATION
CHAPTER 23 xVA
NOTE
CHAPTER 24 Branching
CHAPTER 25 Closing Remarks
25.1 SCRIPT EXAMPLES
Equity Call
Forex Barrier
Basket Option
Interest Rate Swap
Cap
Interest Rate Swap with Capped Coupons
Swaption
Bermuda
Exotic Path‐Dependent Bermuda
25.2 MULTI‐THREADING AND AAD
25.3 ADVANCED LSM OPTIMIZATIONS
APPENDIX A Parsing. A.1 PREPARING FOR PARSING
A.2 PARSING STATEMENTS
A.3 RECURSIVELY PARSING CONDITIONS
A.4 RECURSIVELY PARSING EXPRESSIONS
A.5 PERFORMANCE
NOTES
Bibliography
Index
WILEY END USER LICENSE AGREEMENT
Отрывок из книги
ANTOINE SAVINE AND JESPER ANDREASEN
As always, it was a general struggle to keep up with the financial innovation, and constant re‐coding of new payoffs was a painful and error prone process. We had been toying with a cocktail of Visual Basic for scripting of the payoffs and scenarios of future prices generated by C programs. However, the implementation was slow, model specific, hard to use, and generally more elephant than elegant.
.....
Scripting libraries are also typically written to be usable with a number of numerical implementations, either by forward induction like Monte‐Carlo simulations or backward induction like finite difference grids. In order to avoid unnecessary confusion, our book focuses on forward induction with Monte‐Carlo simulations, by far the most frequently used valuation context today. To further simplify our approach, we only consider path‐wise simulations. This means that simulations are provided one path (for all event dates) at a time. The model is, to us, an abstract object that generates multiple scenarios (possible evolutions of the world) and communicates them sequentially for evaluation.
An alternative that we don't consider is step‐wise simulation, where all paths are computed simultaneously, date by date. The model first generates all the possible states of the world for the first event date, then moves on to the second event date, and so on until it reaches the final maturity. Step‐wise simulation is natural with particular random generators, control variates (when paths are modified after simulation so that the expectation of some function matches some target), and, more generally, calibration inside simulations as in the particle method of [16].
.....