Skip to main content

Derivatives Pricing Engine

Project description

DerivX

V0.2.7-Beta Build 20210816

© 2021-2021 Xu Rendong. All Rights Reserved.

Project Summary

Derivatives Pricing Engine.

Install

C++:

Python:
pip install derivx
JavaScript:
npm install derivx

Usage

C++:

Python:
import derivx
print(derivx.Version())

For more usages please refer to test files in derivx_py folder.

DerivX is not dependent on numpy, pandas and matplotlib, but if you want to run tests, you'd better install them with:

pip install numpy pandas matplotlib
JavaScript:
const derivx = require('derivx')
console.log(derivx.Version())

For more usages please refer to test files in derivx_js folder.

DerivX is not dependent on numjs, but if you want to run tests, you'd better install it with:

npm install git+https://github.com/nicolaspanel/numjs.git

Benchmark

Environment:
  • CPU: Intel Core i7-4790 4C/8T 3.60GHz
  • RAM: 16.0GB
  • SYS: Windows 10 Pro 64-bit 20H2 19042.1110
Parameters:
  • rand_rows: 500000
  • rand_cols: 250
  • rand_seed: { 0, 1, 2, 3, 4, 5, 6, 7 }
  • dual_smooth: true
  • runs_size: 1000000
  • runs_step: 244
  • run_from: 0
  • run_days: 1
C++:
  • InitRand: 461ms - 550ms
  • InitPath: 1575ms - 1961ms

    Autocall Snowball:

  • CalcCoupon: 468ms - 564ms (there is still 200ms optimization space)
  • CalcPayoff: 965ms - 983ms per price
  • CalcDelta: 1932ms - 1983ms per price
  • CalcGamma: 2898ms - 2918ms per price
  • CalcVega: 2047ms - 2073ms per price
  • CalcTheta: 1636ms - 1647ms per price (as run_days increases this tends to CalcPayoff's time consumption)
  • CalcRho: 2106ms - 2161ms per price
  • The difference between CalcCoupon and CalcPayoff shows that different prices and barriers will cause different time consumption.

Contact Information

QQ: 277195007, WeChat: xrd_ustc, E-mail: xrd@ustc.edu

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

derivx-0.2.7-cp39-cp39-win_amd64.whl (299.2 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

derivx-0.2.7-cp38-cp38-win_amd64.whl (299.1 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

derivx-0.2.7-cp37-cp37m-win_amd64.whl (298.0 kB view hashes)

Uploaded CPython 3.7m Windows x86-64

derivx-0.2.7-cp36-cp36m-win_amd64.whl (297.9 kB view hashes)

Uploaded CPython 3.6m Windows x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page