š”– Scriptorium
✦   LIBER   ✦

šŸ“

Options and Derivatives Programming in C++23: Algorithms and Programming Techniques for the Financial Industry

āœ Scribed by Carlos Oliveira


Publisher
Apress
Year
2023
Tongue
English
Leaves
312
Edition
3
Category
Library

⬇  Acquire This Volume

No coin nor oath required. For personal study only.

✦ Synopsis


This book is a hands-on guide for programmers who want to learn how C++ is used to develop solutions for options and derivatives trading in the financial industry. It explores the main algorithms and programming techniques used in implementing systems and solutions for trading options and derivatives. This updated edition will bring forward new advances in C++ software language and libraries, with a particular focus on the new C++23 standard.

The book starts by covering C++ language features that are frequently used to write financial software for options and derivatives. These features include the STL (standard template library), generic templates, functional programming, and support for numerical code. Examples include additional support for lambda functions with simplified syntax, improvements in automatic type detection for templates, custom literals, modules, constant expressions, and improved initialization strategies for C++ objects. This book also provides how-to examples that cover all the major tools and concepts used to build working solutions for quantitative finance. It discusses how to create bug-free and efficient applications, leveraging the knowledge of object-oriented and template-based programming. It has two new chapters covering backtesting option strategies and processing financial data.. It introduces the topics covered in the book in a logical and structured way, with lots of examples that will bring them to life.

Options and Derivatives Programming in C++23 has been written with the goal of reaching readers who are looking for a concise, algorithms-based book that provides basic information through well-targeted examples and ready to use solutions.

What You Will Learn

  • Gain insight into the fundamental challenges of the options and derivatives market
  • Master the features of the C++ language used in quantitative financial programming
  • Understand quantitative finance algorithms for options and derivatives
  • Build pricing algorithms around the Black-Scholes model, and use binomial and differential equations methods

Who This Book Is For

Professional developers who have some experience with the C++ language and would like to leverage that knowledge into financial software development.

✦ Table of Contents


Table of Contents
About the Author
About the Technical Reviewer
Introduction
Chapter 1: Options Concepts
Basic Definitions
Option Greeks
Using C++23 toĀ Analyze Options
Availability
Performance
Standardization
Expressiveness
Modeling Options inĀ C++
Creating Well-Behaved Classes
Computing theĀ Option Value atĀ Expiration
Complete Listing
Using theĀ auto Keyword
Initializing Variables inĀ C++
Printing Values inĀ C++
Building andĀ Testing
Further References
Conclusion
Chapter 2: Financial Derivatives
Models forĀ Derivative Pricing
Credit Default Swaps
Collateralized Debt Obligations
FX Derivatives
Equations forĀ Derivative Modeling
Numerical Models
Binomial Trees
Simulation Models
Coding inĀ C++ withĀ theĀ STL
Generating aĀ Random Walk inĀ C++
Complete Listing
Building andĀ Testing
Further References
Conclusion
Chapter 3: Basic C++ Algorithms
Date andĀ Time Handling
Date Operations
Computing theĀ Day ofĀ theĀ Week
Using theĀ ++ Operator
Determining Trading Dates
Complete Listing
A Compact Date Representation
Complete Listings
Building andĀ Testing
Using theĀ Standard Chrono Header
Working withĀ Networks
Creating aĀ Dictionary Class
Calculating aĀ Shortest Path
Complete Listings
Building andĀ Testing
Conclusion
Chapter 4: Object-Oriented Techniques
OO Programming Concepts
Encapsulation
Inheritance
Polymorphism
Polymorphism andĀ Virtual Tables
Virtual Functions andĀ Virtual Destructors
Abstract Functions
Building Class Hierarchies
Object Composition
When toĀ Use Object-Oriented Features?
Objects andĀ C++23
Conclusion
Chapter 5: Design Patterns forĀ Options Processing
Introduction toĀ Design Patterns
The Factory Method Design Pattern
The Singleton Pattern
Using theĀ Singleton Design Pattern
Clearing House Implementation inĀ C++
The Observer Design Pattern
Complete Code
The Visitor Pattern
Conclusion
Chapter 6: Template-Based Techniques
Introduction toĀ Templates
Compilation-Time Polymorphism
Template Functions
Implementing Recursive Functions
Recursive Functions andĀ Template Classes
Containers andĀ Smart Pointers
Avoiding Lengthy Template Instantiations
Preinstantiating Templates
Templates inĀ C++23
The constexpr Syntax inĀ C++23
Conclusion
Chapter 7: STL forĀ Derivatives Programming
Introduction toĀ Algorithms inĀ theĀ STL
Sorting
Presenting Frequency Data
Copying Container Data
Finding Elements
Selecting Option Data
STL Improvements inĀ C++23
Array Slices inĀ C++23
Conclusion
Chapter 8: Functional Programming Techniques
Functional Programming Concepts
Function Objects
Functional Predicates inĀ theĀ STL
The Bind Function
Lambda Functions inĀ C++23
Complete Code
Changes toĀ Lambda Functions inĀ C++23
Change inĀ theĀ Scope ofĀ Lambda Trailing Return Type
Attributes onĀ Lambdas
Conclusion
Chapter 9: Linear Algebra Algorithms
Vector Operations
Scalar-to-Vector Operations
Vector-to-Vector Operations
Matrix Implementation
Using theĀ uBLAS Library
Complete Code
Syntax Change inĀ C++23: Multidimensional Subscripts
Conclusion
Chapter 10: Algorithms forĀ Numerical Analysis
Representing Mathematical Functions
Using Horner’s Method
Finding Roots ofĀ Equations
Newton’s Method
Integration
Complete Code
Conclusion
Chapter 11: Models Based onĀ Differential Equations
General Differential Equations
Ordinary Differential Equations
Euler’s Method
Implementing theĀ Method
The Runge-Kutta Method
Runge-Kutta Implementation
Complete Code
Conclusion
Chapter 12: Basic Models forĀ Options Pricing
Lattice Models
Binomial Model
Binomial Model Implementation
Pricing American-Style Options
Solving theĀ Black-Scholes Model
Numerical Solution ofĀ theĀ Model
Complete Code
Conclusion
Chapter 13: Monte Carlo Methods
Introduction toĀ Monte Carlo Methods
Random Number Generation
Probability Distributions
Using Common Probability Distributions
Using Random Walks
Creating Random Walks
Conclusion
Chapter 14: Backtesting Trading Strategies inĀ C++
Obtaining Historical Market Data
Data Cleaning andĀ Preprocessing
Adjustments forĀ Corporate Actions
How toĀ Design Your Trading Strategy
Backtest andĀ Validation Phase
Developing theĀ Backtesting Engine
Read Historical Market Data
Create theĀ Backtesting Engine
Conclusion
Chapter 15: Using C++ Libraries forĀ Finance
Boost Libraries
Installing Boost
Solving ODEs withĀ Boost
Solving aĀ Simple ODE
Creating Histograms withĀ Boost
The QuantLib Library
Handling Dates
Working withĀ Calendars
Computing Solutions forĀ Black-Scholes Equations
Creating aĀ C++ Interface
Complete Code
Conclusion
Chapter 16: Credit Derivatives
Introduction toĀ Credit Derivatives
Modeling Credit Derivatives
Using Barrier Options
A Solver Class forĀ Barrier Options
Barrier Option Classes inĀ QuantLib
An Example Using QuantLib
Complete Code
Conclusion
Chapter 17: Processing Financial Data
Introduction toĀ XML inĀ Finance
Using XML inĀ Finance
Understanding theĀ XML Structure
XML Tags andĀ Elements
Attributes
Hierarchy andĀ Nesting
XML Schema (XSD) andĀ Document Type Definition (DTD)
XML Parsing inĀ C++
Installing theĀ pugixml Library
XML Parsing withĀ pugixml
Performing Data Processing andĀ Analysis
Error Handling
Loading XML File andĀ Checking forĀ Errors
Checking forĀ Node Existence
Handling Missing Attributes
Other Techniques forĀ Error Checking
Using theĀ HDF5 Format
Using HDF5
Compile andĀ Run
HDF5 forĀ Trading Data
Conclusion
Index

✦ Subjects


C++20; C++; Options; Derivatives; Finance; Quantitative Finance; Programming; Trading; Machine Trading; Credit Default Swaps; Forex Derivatives; Black-Sholes; Monte-Carlo; Back Testing; Credit Derivatives; Cplusplus; C Plus Plus; Financial


šŸ“œ SIMILAR VOLUMES


Options and Derivatives Programming in C
āœ Carlos Oliveira šŸ“‚ Library šŸ“… 2023 šŸ› Apress 🌐 English

This book is a hands-on guide for programmers who want to learn how C++ is used to develop solutions for options and derivatives trading in the financial industry. It explores the main algorithms and programming techniques used in implementing systems and solutions for trading options and derivative

Options and Derivatives Programming in C
āœ Carlos Oliveira šŸ“‚ Library šŸ“… 2023 šŸ› Apress 🌐 English

<p><span>This book is a hands-on guide for programmers who want to learn how C++ is used to develop solutions for options and derivatives trading in the financial industry. It explores the main algorithms and programming techniques used in implementing systems and solutions for trading options and d

Options and Derivatives Programming in C
āœ CARLOS OLIVEIRA šŸ“‚ Library šŸ“… 2016 šŸ› Apress 🌐 English

Learn how C++ is used in the development of solutions for options and derivatives trading in the financial industry. As an important part of the financial industry, options and derivatives trading has become increasingly sophisticated. Advanced trading techniques using financial derivatives have bee

Options and Derivatives Programming in C
āœ CARLOS OLIVEIRA (auth.) šŸ“‚ Library šŸ“… 2016 šŸ› Apress 🌐 English

<p><p>This is a hands-on book for programmers wanting to learn how C++ is used in the development of solutions for options and derivatives trading in the financial industry. As an important part of the financial industry, options and derivatives trading has become increasingly sophisticated. Advance

Options and Derivatives Programming in C
āœ Carlos Oliveira šŸ“‚ Library šŸ“… 2020 šŸ› Apress 🌐 English

<p><p></p><p>Master the features of C++ that are frequently used to write financial software for options and derivatives, including the STL, templates, functional programming, and numerical libraries. This book also covers new features introduced in C++20 and other recent standard releases: modules,