MoneyScience Financial Training
Course Length: 3 Days | Cost: £3000
Course contents
Day 1: Advanced Object-Oriented and Generic C++
Day 1: Advanced Object-Oriented and Generic C++
Memory Management, Issues
- Static, stack and heap memory management
- Wild pointers, dangling pointers, double free bugs, memory leaks
- Using object factories to control object lifecycle
- Single object and object array allocation and deallocation
Memory Management, Solutions
- The pimpl idiom; STL auto_ptr
- Using Builder pattern to coordinate object lifetime
- Overview of Boost smart pointers
- Scoped and shared pointers
- Casting and Run-Time Type Information (RTTI)
- Static and dynamic casting overview
- dynamic_cast and static_cast
- Exception handling issues
- Boost lexical_cast
Polymorphism Functions
- Dynamic polymorphism: virtual and pure virtual functions
- Polymorphism and algorithms in computational finance
- Polymorphism, inheritance and composition, what’s best?
- Performance issues with dynamic polymorphism
Static Polymorphism
- Curiously Recurring Template Pattern (CRTP)
- Where does static_cast fit it?
- Where to use CRTP
- CRTP and performance improvements
Advanced Generic Programming (GP) in C++
- Template classes and template functions
- Partial specialization
- Default parameters, template template parameters
- Template member functions
- Nested templates and data structures
Combining OOP and GP
- Inheritance scenarios
- Composition; combining composition with inheritance
- Policy-based design and traits classes
- When OOP and when GP?
Day 2: STL, Boost Libraries and Design
STL Containers
- Sequential and associative containers
- Lists, vector and queues
- Maps, sets and multimaps
- Modelling option data with maps and Property Sets
STL Algorithms and Iterators
- Mutating and non-mutating algorithms
- Searching and sorting
- Inserting and removing data
Using STL in Applications
- Using STL with class adapters
- STL-compatible data structures
- Complexity analysis and performance tests
Function Pointers and Function Objects
- C function pointers: advantages and disadvantages
- Function objects and their applications
- Functions in boost; binding
- Performance issues
String Algorithms
- Regular expressions
- Trimming and conversion
- Find and replace
- Find iterator
- Join and split
Random Number Library
- Concepts
- Random number variate generators
- Random number library distributions
- Applications
uBLAS (Basic Linear Algebra System)
- Vectors, matrices and their operations
- Patterned matrices (sparse, triangular, ..)
- Expression templates to improve performance
- Applications of uBLAS classes
Essential Patterns: Creational
- Factory method and abstract factory
- Creating complex objects using Builder
- Singleton<T>
Essential Patterns: Structural
- Composite and nested objects
- Bridge and implementation-independence
- Extending object structure with Decorator
Essential Patterns: Behavioural
- Strategy and algorithms
- Extending class functionality with Visitor
- Template method pattern and customisable frameworks
Day 3: Design and Applications to Computational Finance
Multithreading: Theory
- What is a thread? Thread lifecycle
- Shared data models
- Thread synchronization and notification
- Speedup and race conditions
Multithreading: OpenMP and boost Thread
- Overview of functionality
- Creating threads
- Speedup, accuracy and robustness
Excel-C++ Integration
- An overview of Excel add-ins
- Creating Automation add-ins and worksheet functions
- Creating COM add-ins: The steps using ATL projects
The Monte Carlo Method
- Description of the problem
- Creating a software framework for a MC engine
- Using design patterns to create flexible MC systems
- Plain options, Asians and barriers
The Finite Difference Method
- A quick introduction to FDM
- C++ classes for a FDM solver
- Explicit and implicit schemes (Crank-Nicolson, Euler, ADE)
- Presentation in Excel
Improving Application Performance
- Call by reference versus call by value
- Appropriate use of virtual functions
- Function objects versus function pointers
- Preventing unnecessary temporary object creation
Loop Optimisation
- Loop interchange
- Loop fission and fusion
- Making loops multi-threaded (OpenMP)
- Application profiling; determining a program’s serial fraction
