Do Geometric Brownian Motion or a SABR model sound familiar?   Here’s an interested library:

  
      

      GitHub
  

  
    

GitHub - google/tf-quant-finance: High-performance TensorFlow library for... 13

  High-performance TensorFlow library for quantitative finance. - GitHub - google/tf-quant-finance: High-performance TensorFlow library for quantitative finance.


  

  
    
    
  

  


From the repository:

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:


Foundational methods. Core mathematical methods - optimisation, interpolation, root finders, linear algebra, random and quasi-random number generation, etc.

Mid-level methods. ODE & PDE solvers, Ito process framework, Diffusion Path Generators, Copula samplers etc.

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.

…
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 2.

Introduction to TensorFlow Part 2 - Debugging and Control Flow.

Introduction to TensorFlow Part 3 - Advanced Tensor Manipulation 1.

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.
Model Calibration:

Dupire local vol calibration.
SABR model calibration.


Rate curve fitting: Hagan-West algorithm for yield curve bootstrapping and the Monotone Convex interpolation scheme.
Support for dates, day-count conventions, holidays, etc.

Examples
See tf_quant_finance/examples/ 2 for end-to-end examples. It includes tutorial notebooks such as:

American Option pricing under the Black-Scholes model 2
Monte Carlo via Euler Scheme 1
Black Scholes: Price and Implied Vol 4
Forward and Backward mode gradients in TFF 1
Root search using Brent’s method
Optimization 1
Swap Curve Fitting 2
Vectorization and XLA compilation

The above links will open Jupyter Notebooks in Colab.
…
Community


GitHub repository 13: Report bugs or make feature requests.

TensorFlow Blog 1: Stay up to date on content from the TensorFlow team and best articles from the community.

tf-quant-finance@googlegroups.com: Open mailing list for discussion and questions of this library.
TensorFlow Probability: This library will leverage methods from TensorFlow Probability (TFP).


More info:

  
      

      GitHub
  

  
    

GitHub - google/tf-quant-finance: High-performance TensorFlow library for... 13

  High-performance TensorFlow library for quantitative finance. - GitHub - google/tf-quant-finance: High-performance TensorFlow library for quantitative finance.