Giter Club home page Giter Club logo

black_scholes's Introduction

SIMD Black scholes pricer

Probably the fastest black scholes pricer in the world.

This tries to be correct for all black scholes calculations including accounting for dividends and american binomial options Tested against widely known pricers for accuracy

Contains

* call
* put
* delta
* rho
* gamma
* theta
* vega
* implied_vol from price
* implied_rho from price
* strike from delta
* american put

SIMD

As a thought experiment I used this to see what performance I could eeek out of a i5 6th gen laptop compared to the the naive calculation

For 10,000,000 calls to bs_single::call()

  • Dev: ~7500ms
  • Release: ~1900ms

with RUST_FLAGS=-C -target_feature=+avx,+fma

  • Release: ~750ms

With the SIMD version with RUST_FLAGS=-C -target_feature=+avx,+fma, without Wide math functions

  • Release: ~400ms

with RUST_FLAGS=-C -target_feature=+avx,+fma, with Wide math functions

  • Release: ~100ms

So around 18x speed up when written with careful CPU consideration

License

GNU AGPL-3.0-or-later; see AGPL-v3.

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.