Option Valleypowered by Riptide, The World's Leading AI Research Lab
Documentation · v1.0

Quick start

Install the library, load a licence and price a first book.

1. Install

tar xzf option-valley-1.0.0-linux-x86_64.tar.gz        # or -aarch64
pip install option-valley-1.0.0-linux-x86_64/python/optionvalley-1.0.0-py3-none-manylinux_2_28_x86_64.whl
export OPTION_VALLEY_LICENSE=/path/to/option-valley.lic   # from Riptide

Requirements: Linux with glibc 2.28+ (RHEL 8+, Ubuntu 20.04+, Amazon Linux 2023), Python 3.8+ with NumPy for the wheel. The CUDA module (optional) needs an NVIDIA driver for CUDA 12; the runtime is linked in.

2. Python

import numpy as np, optionvalley as ov
ov.init()                                    # reads $OPTION_VALLEY_LICENSE
print(ov.version(), ov.cpu_path(), ov.get_threads())

# European: undiscounted price on the forward = market price / discount factor
sigma, g = ov.iv_european(price_fwd, F, K, T, is_call, greeks=True)   # g["delta"], g["vega"], ...
sigma = ov.iv_european_spot(mkt_price, S, K, T, r, q, is_call)          # spot-style inputs

# every Greek to order 3 in (S, sigma, T, r, q)
d, monomials = ov.greeks_european(S, K, T, r, q, sigma, kind=0, nvars=5, order=3)

# American
p = ov.price_american(S, K, T, r, q, sigma, is_call, steps=500)
s, gv = ov.iv_american(p, S, K, T, r, q, is_call, greeks=True)

# SVI per expiry
fit = ov.fit_svi(np.log(K_slice / F_slice), iv_slice, T_slice)

3. C

#include "option_valley.h"
if (ov_init(NULL) != OV_OK) { fprintf(stderr, "%s\n", ov_last_error()); return 1; }
ov_iv_european(n, price, F, K, T, is_call, sigma, greeks /* or NULL */, NULL);

Build: cc -I include app.c -L lib -loptionvalley -Wl,-rpath,'$ORIGIN/lib' -lm. A complete example is examples/quickstart.c.

4. Raya

import 'raya/lib/option_valley.ray';
final ov = OptionValley.open('lib/liboptionvalley.so');
ov.init();
final r = ov.ivEuropeanWithGreeks(price, F, K, T, isCall);

5. Threads and CPU paths

The engine uses one process-wide pool of worker threads (default: all hardware threads; ov_set_threads or OPTION_VALLEY_THREADS). It selects the processor path at load time. All paths return identical bits.

Start a paid pilot Request the evaluation pack