Skip to content

Commit

Permalink
Filled-out README.md.
Browse files Browse the repository at this point in the history
  • Loading branch information
andleb committed Mar 18, 2020
1 parent 3bb6d62 commit cb5b127
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 3 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ if(CMAKE_BUILD_TYPE MATCHES "Debug")
message("Building in DEBUG mode, enabling testing macros.")
add_definitions(-DTESTING)
# add_definitions(-DDUMPINTERMEDIATE)
# NOTE: this dumps results of the random generators to data/
add_definitions(-DDUMPRESULTS)
endif()

Expand Down
42 changes: 39 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,45 @@
# derivatives
Approximately based on [M. Joshi's C++ Design Patterns and Derivatives Pricing](https://www.amazon.com/Patterns-Derivatives-Pricing-Mathematics-Finance/dp/0521721628), making use of updated paradigms wherever possible.
Approximately based on [M. Joshi's C++ Design Patterns and Derivatives Pricing](https://www.amazon.com/Patterns-Derivatives-Pricing-Mathematics-Finance/dp/0521721628), making use of updated paradigms wherever possible.

*C++17* strongly recommended.

## dependencies
[*cmake*](https://github.com/andleb/cmake) repository for the *CMake* scripts, included as a submodule.
## Overview
The project roughly follows the second edition of the aforementioned book, which was published in 2008. While the numerics and mathematics haven't changed, *C++* has gone through quite a bit of a revolution in the time since. Due to this fact, the original book includes some now archaic elements, such as a self-implemented smart pointer. All such were replaced with their modern equivalents. Some chapters do not correspond to a concrete problem and have been excluded; in others, the sub-problems have often been consolidated/handled in a more generic way.

The code itself is separated into the driver/playground routines, located in *mains*, and the library, located in *src*.
The *mains* correspond to each relevant chapter, look at the list of includes in each to follow along with the development of the library. The original book features a heavy evolution of concepts, especially in the first chapters. This has been compacted a bit in this project.

#### Ch. 1 - 5:
These perform *Monte-Carlo* pricing of various derivatives, with an increasing degree of software architecture.

#### Ch. 6:
This chapter implements custom random number generators and integrates them with the architecture developed in preceding chapters.

#### Ch. 7:
Deals with the pricing of exotic, more specifically, path-dependent, options via *Monte-Carlo* using all the preceding infrastructure.

#### Ch. 8:
Switches gears and introduces pricing on *trees* (or *lattices*). For this, I have developed a helper static recombinant tree class that is found in the *common* repository (see below). This allows us to price early-exercise options.

#### Ch. 9:
Deals with the concept of *implied volatility* and introduces two simple numerical root-finding routines.

#### Ch. 10, 14:
Introduce the factory pattern & apply it to the existing architecture. The latter improves on the former by making the factory completely generic.

NOTE: I have stayed away from *C*-like input/output parameters and have replaced them with *rvalue* reference inputs that get moved into, modified in place, and returned by value (moved out). I feel that this syntax is clearer and also mirrors the approach popular *Python* numerics packages, such as *Pandas*, are taking with regards to in-place modification. There is also the added benefit of zero additional performance costs afforded to us by modern *C++*.

## Dependencies & installation
[*cmake*](https://github.com/andleb/cmake) repository for the *CMake* scripts; included as a submodule.

[*common*](https://github.com/andleb/common) repository for utility classes & functions.

The project is built via *CMake*. One can, of course, modify the *CMake* configuration at will or use one's own.


## Authors

Andrej Leban

## Acknowledgments
dr. Mark Joshi (RIP)

0 comments on commit cb5b127

Please sign in to comment.