Crates.io | black_scholes_pricer |
lib.rs | black_scholes_pricer |
version | 0.2.1 |
source | src |
created_at | 2020-09-08 10:27:22.620898 |
updated_at | 2020-09-08 10:31:47.977004 |
description | Scalar and SIMD vectorised versions of black scholes and binomial option pricing |
homepage | |
repository | https://github.com/ronniec95/black_scholes |
max_upload_size | |
id | 286096 |
size | 89,134 |
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
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()
with RUST_FLAGS=-C -target_feature=+avx,+fma
With the SIMD version
with RUST_FLAGS=-C -target_feature=+avx,+fma
, without Wide math functions
with RUST_FLAGS=-C -target_feature=+avx,+fma
, with Wide math functions
So around 18x speed up when written with careful CPU consideration