Welcome to the C++ course focused on high-performance programming for quantitative finance. This repository contains all the materials, code examples, and exercises for the course.
This course explores C++ programming techniques essential for building high-performance financial applications, with a particular focus on sorting algorithms and their applications in quantitative finance. Throughout the course, we'll cover:
- Sorting algorithms and their performance characteristics in financial contexts
- Memory management techniques for high-frequency trading systems
- Concurrency patterns for parallel financial calculations
- Optimization strategies specific to financial workloads
├── Week1/ # Week 1: Sorting Algorithms in Finance
│ ├── README.md # Week 1 overview and exercises
│ ├── Homework/ # Homework assignments
│ ├── order_book_sorting_exercise.cpp
│ └── sorting_benchmark.cpp
│
├── Week2/ # Week 2: Memory Management
│ └── README.md # Week 2 overview and exercises
│
├── Week3/ # Week 3: Concurrency and Parallelism
│ └── README.md # Week 3 overview and exercises
│
├── Resources/ # Shared resources for all weeks
│ ├── Slides/ # Presentation materials
│ │ └── Week1_Presentation.md
│ │
│ ├── Code_Examples/ # Example code and demonstrations
│ │ └── sorting_algorithms_manim.py
│ │
│ └── README.md # Resources overview
│
└── README.md # This file
- C++17 compatible compiler (GCC 7+, Clang 5+, or MSVC 19.14+)
- Python 3.7+ (for Manim animations)
- Git
-
Clone this repository:
git clone https://github.com/yourusername/cpp-finance-course.git cd cpp-finance-course -
For C++ examples:
# Compile a C++ example g++ -std=c++17 -O3 Week1/sorting_benchmark.cpp -o sorting_benchmark # Run the compiled program ./sorting_benchmark
-
For Manim animations:
# Create a virtual environment python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate # Install dependencies pip install manim numpy # Run an animation manim -pqh Resources/Code_Examples/sorting_algorithms_manim.py SortingAlgorithm
- Introduction to C++ in finance
- Sorting algorithms comparison
- std::sort deep dive
- Order book sorting implementation
- Memory models and performance
- Custom allocators for financial data structures
- Memory pools and arenas
- Lock-free data structures
- Thread-safe financial data structures
- Parallel algorithms for financial calculations
- SIMD acceleration for vector operations
- Modern C++ concurrency features
This repository is primarily for educational purposes. If you find errors or have suggestions for improvements:
- Fork the repository
- Create a new branch for your changes
- Submit a pull request with a clear description of your additions
All materials in this repository are provided for educational purposes. Please respect the intellectual property rights and do not redistribute without permission.
- Thanks to all contributors and students who help improve these materials
- Special thanks to the C++ community for developing such a powerful language for financial applications