google /tf-quant-finance
High-performance TensorFlow library for quantitative finance.
★ 5,568⑂ 705👁 173⑃ 56● 56▤ 4
+0
日增长
5,568
stars
705
forks
173
watchers
56
prs
56
issues
4
releases
README
TF Quant Finance: TensorFlow based Quant Finance Library (ARCHIVED)
[!IMPORTANT]
This library is no longer maintained and has been archived. If you depend on
the functionality provided by this library, we suggest to fork it and continue
development elsewhere.
Table of contents
1. Introduction
2. Installation
3. TensorFlow training
4. Development roadmap
5. Examples
6. Contributing
7. Development
8. Community
9. Disclaimers
10. License
Introduction
This library provides high-performance components leveraging the hardware
acceleration support and automatic differentiation of TensorFlow. The
library will provide TensorFlow support for foundational mathematical methods,
mid-level methods, and specific pricing models. The coverage is being
expanded over the next few months.
The library is structured along three tiers:
1. Foundational methods.
Core mathematical methods - optimisation, interpolation, root finders,
linear algebra, random and quasi-random number generation, etc.
2. Mid-level methods.
ODE & PDE solvers, Ito process framework, Diffusion Path Generators,
Copula samplers etc.
3. Pricing methods and other quant finance specific utilities.
Specific Pricing models (e.g., Local Vol (LV), Stochastic Vol (SV),
Stochastic Local Vol (SLV), Hull-White (HW)) and their calibration.
Rate curve building, payoff descriptions, and schedule generation.
We aim for the library components to be easily accessible at each level. Each layer will be accompanied by many examples that can run independently of
higher-level components.
Installation
The easiest way to get started with the library is via the pip package.
Note that the library requires Python 3.7 and Tensorflow = 2.7.
First, please install the most recent version of TensorFlow by following
the TensorFlow installation instructions.
For example, you could install TensorFlow
sh
pip3 install --upgrade tensorflow
Then run
sh
pip3 install --upgrade tf-quant-finance
You maybe also have to use the option --user.
TensorFlow training
If you are not familiar with TensorFlow, an excellent place to get started is with the
following self-study introduction to TensorFlow notebooks:
Introduction to TensorFlow Part 1 - Basics.
Introduction to TensorFlow Part 2 - Debugging and Control Flow.
Introduction to TensorFlow Part 3 - Advanced Tensor Manipulation.
Development roadmap
We are working on expanding the coverage of the library. Areas under active development are:
Ito Processes: Framework for defining Ito processes.
Includes methods for sampling paths from a process and for solving the
associated backward Kolmogorov equation.
Implementation of the following specific processes/models:
Brownian Motion
Geometric Brownian Motion
Ornstein-Uhlenbeck
One-Factor Hull-White model
Heston model
Local volatility model.
Quadratic Local Vol model.
SABR model
Copulas: Support for defining and sampling from copulas.
MoTop issues
#70Discrete dividens for american options24 comments · 2022-04-05#8Approximate European option price under SABR model 21 comments · 2019-09-11#9Approximate European option price under Heston model17 comments · 2019-09-11#27Working example of fwd_gradient15 comments · 2020-03-06#13BS vol and greeks10 comments · 2019-11-20#6Analytical approximation for a spread-option price under Black-Scholes 10 comments · 2019-09-11#80Fair performance comparison with QuantLib9 comments · 2022-09-12#58SABR calibration7 comments · 2021-07-10
Latest release
TF Quant Finance 0.0.1-dev9 v0.0.1-dev9 Pre-release 2019-09-17Release notes: - added example Colab "Introduction to TensorFlow Part 2 Debugging and Control Flow" - TF Quant Finance now requires TensorFlow = 1.14 and TensorFlow Probability = 0.7.0