Giter Club home page Giter Club logo

fst-cuda-option-pricing's Introduction

About

This program compute the price of European and American options in the GPU, under jump diffusion. It uses the fourier time-stepping method to doing so.

It is mainly an implementation of the theses of Lippa (2013) and Surkov (2009), with the heavy lifting done in CUDA.

Installation

This program requires CUDA and FFTW (for the CPU version), as well as a NVidia graphics card that supports recent versions of CUDA.

To download CUDA, see NVidia website.

sudo apt-get install fftw3 fftw3-dev pkg-config

To build the program, simply use make. By default, this will compile the program such that all computations are done in double-precision. However, some GPUs may not support double-precision. In which case, make float compiles a single-precision version. Note that the single-precision version of the code may not be robust - it is supported only for testing purposes and uses some rather questionable ifdef hacks.

Usage

The program can be run using ./option and ./option --cpu for the CPU version. A number of command-line parameters can be used to precify the parameters of the option (e.g. strike price). For the full list, see the parsing code in main() and refer to the test file for examples.

There are two test files: test_diffusion.sh and test_pure.sh. The former runs the option calculation code for European and American options with or without jump diffusion (Merton or Kou). The latter runs the option calculation for European and American options for pure jump models (Variance Gamma and CGMY).

Note that the pure jump model code currently is not able to produce the correct results, this is a work-in-progress.

fst-cuda-option-pricing's People

Contributors

rudi-c avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.