Derivatives Pricing Engine
Project description
DerivX
V0.3.0-Beta Build 20210820
© 2021-2021 Xu Rendong. All Rights Reserved.
Project Summary
Derivatives Pricing Engine.
- Plain Vanilla European / American options portfolio calculation.
- Plain Vanilla European / American option pricing and greek value calculation.
- Exotic Autocall Phoenix / Snowball option pricing and greek value calculation.
- Interfaces and examples for C++, Python, JavaScript.
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:
Module | Specification |
---|---|
CPU | Intel Core i7-4790 4C/8T 3.60GHz |
RAM | 16.0GB |
SYS | Windows 10 Pro 64-bit 20H2 19042.1110 |
Parameters:
Parameter | Value |
---|---|
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++:
Function | Min | Max |
---|---|---|
InitRand | 461ms | 550ms |
InitPath | 1575ms | 1961ms |
Autocall Snowball:
Function | Min | Max | Unit | Note |
---|---|---|---|---|
CalcCoupon | 468ms | 564ms | - | 1 |
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 | 2 |
CalcRho | 2106ms | 2161ms | per price | - |
- There is still 200ms optimization space.
- As run_days increases this tends to CalcPayoff's time consumption.
- 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
Release history Release notifications | RSS feed
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.3.0-cp39-cp39-win_amd64.whl
(335.4 kB
view hashes)
derivx-0.3.0-cp38-cp38-win_amd64.whl
(335.3 kB
view hashes)
derivx-0.3.0-cp37-cp37m-win_amd64.whl
(334.5 kB
view hashes)
derivx-0.3.0-cp36-cp36m-win_amd64.whl
(334.4 kB
view hashes)
Close
Hashes for derivx-0.3.0-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2715f77d740c4a28bb0289bc3ced39d5b544e71a4782547c629c3cdba990ca77 |
|
MD5 | dc63ea21b9191278f1f9ae8f4e58d92a |
|
BLAKE2b-256 | 545577b384c5de68f477367b5ae87be55d095ca52eca6dc2e8615d5abd1ddf69 |
Close
Hashes for derivx-0.3.0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c054f414581c5e99b06f983a755ccb627b436998e60c030de2e9a4eda116e330 |
|
MD5 | f73818f53ddbf3387c5b5d5fad08fae9 |
|
BLAKE2b-256 | 57c9f841058663a070e4e093884d7731a96b94ddee7ebbae3c26a56b98afe730 |
Close
Hashes for derivx-0.3.0-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a3d0aa070363435d44c0207b75281b1b549f607f89a437acbddb169a6e668a3 |
|
MD5 | 36ddf5f2dd618a3f71e6ee69d3fa9530 |
|
BLAKE2b-256 | a31d98400f56048f403fb0b50200284403feb77fc372c0d7d6238d2cf202b00f |
Close
Hashes for derivx-0.3.0-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 14f86f4a3d43889805ae054d778822fa55704840258967a94fd88f27f43b48eb |
|
MD5 | 82aabbd7f8d670409922976b293794db |
|
BLAKE2b-256 | e3e73b6cf59f66141dd85a2239a9d2934db3ca166b0e4d0bcbe8c4c196ebfdf4 |