All Projects → google → Tf Quant Finance

google / Tf Quant Finance

Licence: apache-2.0
High-performance TensorFlow library for quantitative finance.

Programming Languages

python
139335 projects - #7 most used programming language
Jupyter Notebook
11667 projects
Starlark
911 projects

Projects that are alternatives of or similar to Tf Quant Finance

Hipsycl
Implementation of SYCL for CPUs, AMD GPUs, NVIDIA GPUs
Stars: ✭ 377 (-87.11%)
Mutual labels:  gpu, high-performance, high-performance-computing, gpu-computing
Vuh
Vulkan compute for people
Stars: ✭ 264 (-90.97%)
Mutual labels:  gpu, high-performance-computing, gpu-computing
Clojurecl
ClojureCL is a Clojure library for parallel computations with OpenCL.
Stars: ✭ 266 (-90.91%)
Mutual labels:  high-performance, high-performance-computing, gpu-computing
lubeck
High level linear algebra library for Dlang
Stars: ✭ 57 (-98.05%)
Mutual labels:  high-performance, quantitative-finance, numerical-methods
Bayadera
High-performance Bayesian Data Analysis on the GPU in Clojure
Stars: ✭ 342 (-88.31%)
Mutual labels:  gpu, high-performance-computing, gpu-computing
Neanderthal
Fast Clojure Matrix Library
Stars: ✭ 927 (-68.31%)
Mutual labels:  gpu, high-performance-computing, gpu-computing
Quant Notes
Quantitative Interview Preparation Guide, updated version here ==>
Stars: ✭ 180 (-93.85%)
Mutual labels:  finance, quantitative-finance, numerical-methods
Turingtrader
The Open-Source Backtesting Engine/ Market Simulator by Bertram Solutions.
Stars: ✭ 132 (-95.49%)
Mutual labels:  finance, quantitative-finance
Claymore
Stars: ✭ 135 (-95.38%)
Mutual labels:  high-performance-computing, gpu-computing
Pyportfolioopt
Financial portfolio optimisation in python, including classical efficient frontier, Black-Litterman, Hierarchical Risk Parity
Stars: ✭ 2,502 (-14.46%)
Mutual labels:  finance, quantitative-finance
Alpha Mind
quantitative security portfolio analysis. The analysis pipeline including data storage abstraction, alpha calculation, ML based alpha combining and portfolio calculation.
Stars: ✭ 171 (-94.15%)
Mutual labels:  finance, quantitative-finance
Tradingstrategies
Algorithmic trading strategies
Stars: ✭ 120 (-95.9%)
Mutual labels:  finance, quantitative-finance
Pyhpc Benchmarks
A suite of benchmarks to test the sequential CPU and GPU performance of most popular high-performance libraries for Python.
Stars: ✭ 119 (-95.93%)
Mutual labels:  gpu, high-performance-computing
Financial Machine Learning
A curated list of practical financial machine learning tools and applications.
Stars: ✭ 2,172 (-25.74%)
Mutual labels:  finance, quantitative-finance
Nnpack
Acceleration package for neural networks on multi-core CPUs
Stars: ✭ 1,538 (-47.42%)
Mutual labels:  high-performance, high-performance-computing
Presentations
Slide show presentations regarding data driven investing.
Stars: ✭ 162 (-94.46%)
Mutual labels:  finance, quantitative-finance
Bulbea
🐗 🐻 Deep Learning based Python Library for Stock Market Prediction and Modelling
Stars: ✭ 1,585 (-45.81%)
Mutual labels:  finance, quantitative-finance
Clojurecuda
Clojure library for CUDA development
Stars: ✭ 158 (-94.6%)
Mutual labels:  high-performance, gpu-computing
Pai
Resource scheduling and cluster management for AI
Stars: ✭ 2,223 (-24%)
Mutual labels:  gpu, gpu-computing
Finance
Here you can find all the quantitative finance algorithms that I've worked on and refined over the past year!
Stars: ✭ 194 (-93.37%)
Mutual labels:  finance, quantitative-finance

TF Quant Finance: TensorFlow based Quant Finance Library

Build Status

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.4.

First, please install the most recent version of TensorFlow by following the TensorFlow installation instructions. For example, you could install TensorFlow

pip3 install --upgrade tensorflow

Then run

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:

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/ for end-to-end examples. It includes tutorial notebooks such as:

The above links will open Jupyter Notebooks in Colab.

Contributing

We're eager to collaborate with you! See CONTRIBUTING.md for a guide on how to contribute. This project adheres to TensorFlow's code of conduct. By participating, you are expected to uphold this code.

Development

This section is for developers who want to contribute code to the library. If you are only interested in using the library, please follow the instructions in the Installation section.

Development dependencies

This library has the following dependencies:

  1. Bazel
  2. Python 3 (Bazel uses Python 3 by default)
  3. TensorFlow version >= 2.4
  4. TensorFlow Probability version between v0.11.0 and v0.12.1
  5. Numpy version 1.19.2 or higher
  6. Attrs
  7. Dataclasses (not needed if your Python version >= 3.7)

This library requires the Bazel build system. Please follow the Bazel installation instructions for your platform.

You can install TensorFlow and related dependencies using the pip3 install command:

pip3 install --upgrade tf-nightly tensorflow-probability==0.12.1 numpy==1.19.2 attrs dataclasses

Commonly used commands

Clone the GitHub repository:

git clone https://github.com/google/tf-quant-finance.git

After you run

cd tf_quant_finance

you can execute tests using the bazel test command. For example,

bazel test tf_quant_finance/math/random_ops/sobol:sobol_test

will run tests in sobol_test.py .

Tests run using Python version 3. Please make sure that you can run import tensorflow in the Python 3 shell. Otherwise, tests might fail.

Building a custom pip package

The following commands will build custom pip package from source and install it:

# sudo apt-get install bazel git python python-pip rsync # For Ubuntu.
git clone https://github.com/google/tf-quant-finance.git
cd tf-quant-finance
bazel build :build_pip_pkg
./bazel-bin/build_pip_pkg artifacts
pip install --user --upgrade artifacts/*.whl

Community

  1. GitHub repository: Report bugs or make feature requests.

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

  3. [email protected]: Open mailing list for discussion and questions of this library.

  4. TensorFlow Probability: This library will leverage methods from TensorFlow Probability (TFP).

Disclaimers

Google does not officially support this product. This library is under active development, and interfaces may change at any time.

License

This library is licensed under the Apache 2 license (see LICENSE). This library uses Sobol primitive polynomials and initial direction numbers which are licensed under the BSD license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].