Your Pricing and Risk Models.
6× to 1000× Faster.
Automatic Greeks.

AADC is a JIT compiler that accelerates your existing C++ and Python code with less than 1% code changes. All sensitivities computed automatically.

6–1000×
Faster execution
<1
Adjoint factor
60s → 0.4s
1000 scenarios
99%
Lower cost
$4T+derivatives valued
Production ProvenMajor Wall St and global banks
Chartis Quantitative Analytics50 2025Chartis Quantitative Analytics50 2025
Chartis QuantTech50 2023 #10QuantTech50 2023 Top 10

How AADC Works

The Problem

Many computational workloads repeat the same sequence of operations thousands or millions of times. Pricing derivatives. Computing risk sensitivities. Training ML models.

Traditional approaches re-interpret every operation on every run. Tape-based AAD stores millions of operations in memory.

Neither takes advantage of modern CPU capabilities. Gradients cost 2-5× extra computation time.

The Solution

AADC records your calculation once at runtime. It then generates a highly optimised binary kernel tailored to your specific problem.

These kernels run on standard hardware with full vectorization and automatic multithreading. No interpretive overhead. No tape.

The kernel executes 6× to 1000× faster. Gradients often compute faster than the original function alone.

Works with QuantLib, time-series ML, and scientific simulations.

What You Can Expect

6–1000×
Faster pricing and risk
<1
Adjoint factor (Greeks faster than price alone)
4 weeks
To first production results
50–99%
Cloud cost reduction

"6–1000×" means 6 times to 1000 times faster depending on your workload. C++ typically sees 6–100×. Python typically sees 100–1000×.

Unlock Superior Performance Across Trading, Risk, and Technology Roles

What MatLogica Does

We don't provide pricing models or analytics.

We accelerate YOUR existing code and help you build new models faster.

Your Python/C++ pricing code
AADC
100-1000× faster + auto Greeks

The Transformation

YOUR CODE TODAY
Exotic pricing 2-5 seconds
Greeks Bump & revalue (+593% overhead)
Cloud bill $$$$$
Optimization Manual, ongoing
YOUR CODE WITH AADC
Exotic pricing 20-50ms
Greeks Automatic AAD (+31% overhead)
Cloud bill $ (50-99% savings)
Optimization Automatic

Same codebase. Same models. Transformed performance.

BENCHMARK

See the Minimal Code Changes Required

This Monte Carlo pricing example illustrates typical AADC integration. The same pattern applies to any numerical code — finance, ML, scientific computing.

420x
faster than basic Python
73x
faster Greeks than NumPy
+83
lines of code added
+32%
AAD overhead for all Greeks

Compare implementations below. The AADC version adds minimal wrapper code while delivering dramatic speedups and automatic derivatives.

  • f gbm_constants
  • f simulate_path
  • f price_asian_option
  • f price_with_greeks
basic.py - gbm_constants
~16 hours 739 total lines
def gbm_constants(r, sigma, T, num_timesteps):
    """Compute GBM simulation constants."""
    dt = T / num_timesteps
    sqrt_dt = math.sqrt(dt)
    drift = (r - 0.5 * sigma * sigma) * dt
    vol_sqrt_dt = sigma * sqrt_dt
    return dt, sqrt_dt, drift, vol_sqrt_dt
basic.py - simulate_path
~16 hours 739 total lines
def simulate_path(S0, K, r, T, drift, vol_sqrt_dt, Z_path, num_timesteps):
    """Simulate GBM path and compute discounted payoff."""
    price = S0
    running_sum = 0.0
    for t in range(num_timesteps):
        price = price * math.exp(drift + vol_sqrt_dt * Z_path[t])
        running_sum += price

    average = running_sum / num_timesteps
    payoff = max(average - K, 0.0)
    discount = math.exp(-r * T)
    discounted_payoff = discount * payoff
    return discounted_payoff
basic.py - price_asian_option
~16 hours 739 total lines
def price_asian_option(S0, K, r, sigma, T, Z, num_scenarios, num_timesteps):
    """Price Asian option - loop over all scenarios."""
    dt, sqrt_dt, drift, vol_sqrt_dt = gbm_constants(r, sigma, T, num_timesteps)

    payoff_sum = 0.0
    for scenario in range(num_scenarios):
        payoff_sum += simulate_path(S0, K, r, T, drift, vol_sqrt_dt,
                                    Z[scenario], num_timesteps)

    return payoff_sum / num_scenarios
basic.py - price_with_greeks
~16 hours 739 total lines
def price_with_greeks(S0, K, r, sigma, T, Z, num_scenarios, num_timesteps):
    """Compute price and Greeks via bump-and-revalue (4 pricings)."""
    bump = 1e-6
    price = price_asian_option(S0, K, r, sigma, T, Z, num_scenarios, num_timesteps)
    delta = (price_asian_option(S0 + bump, K, r, sigma, T, Z, num_scenarios, num_timesteps) - price) / bump
    rho   = (price_asian_option(S0, K, r + bump, sigma, T, Z, num_scenarios, num_timesteps) - price) / bump
    vega  = (price_asian_option(S0, K, r, sigma + bump, T, Z, num_scenarios, num_timesteps) - price) / bump
    return price, delta, rho, vega

# Greeks require 4 full pricings - 4x the compute cost!
aadc_pricer.py - gbm_constants
136s 822 total lines
def gbm_constants(r, sigma, T, num_timesteps):
    """Compute GBM simulation constants."""
    dt = T / num_timesteps
    sqrt_dt = np.sqrt(dt)
    drift = (r - 0.5 * sigma * sigma) * dt
    vol_sqrt_dt = sigma * sqrt_dt
    return dt, sqrt_dt, drift, vol_sqrt_dt

# Identical to naive - AADC works with regular Python code!
aadc_pricer.py - simulate_path
136s 822 total lines
def simulate_path(S0, K, r, T, drift, vol_sqrt_dt, Z_vals, num_timesteps):
    """Simulate GBM path and compute discounted payoff."""
    price = S0
    running_sum = aadc.idouble(0.0)                                  # AADC
    for t in range(num_timesteps):
        price = price * np.exp(drift + vol_sqrt_dt * Z_vals[t])
        running_sum = running_sum + price

    average = running_sum / num_timesteps
    payoff = np.maximum(average - K, 0.0)
    discount = np.exp(-r * T)
    discounted_payoff = discount * payoff
    return discounted_payoff

# Only change: aadc.idouble for running_sum - enables AAD!
aadc_pricer.py - price_asian_option
136s 822 total lines
def price_asian_option(S0, K, r, sigma, T, Z, num_scenarios, num_timesteps, num_threads=4):
    """Price Asian option using AADC - loop over all scenarios."""
    workers = aadc.ThreadPool(num_threads)                           # AADC

    # --- Record computation graph ---
    funcs = aadc.Functions()                                         # AADC
    funcs.start_recording()                                          # AADC

    # Active variables (use idouble instead of float)
    S0_v    = aadc.idouble(S0);    S0_arg    = S0_v.mark_as_input()   # AADC
    r_v     = aadc.idouble(r);     r_arg     = r_v.mark_as_input()    # AADC
    sigma_v = aadc.idouble(sigma); sigma_arg = sigma_v.mark_as_input()# AADC
    K_v     = aadc.idouble(K);     K_arg     = K_v.mark_as_input_no_diff()  # AADC
    T_v     = aadc.idouble(T);     T_arg     = T_v.mark_as_input_no_diff()  # AADC

    # ... record path simulation ...

    payoff_res = discounted_payoff.mark_as_output()                  # AADC
    funcs.stop_recording()                                           # AADC

    # Evaluate vectorized across scenarios
    request = {payoff_res: [S0_arg, r_arg, sigma_arg]}               # AADC
    results = aadc.evaluate(funcs, request, inputs, workers)         # AADC

    return results, payoff_res, S0_arg, r_arg, sigma_arg
aadc_pricer.py - price_with_greeks
136s 822 total lines
def price_with_greeks(S0, K, r, sigma, T, Z, num_scenarios, num_timesteps, num_threads=4):
    """Compute price and Greeks via AAD (1 forward + 1 adjoint pass)."""
    results, payoff_res, S0_arg, r_arg, sigma_arg = price_asian_option(
        S0, K, r, sigma, T, Z, num_scenarios, num_timesteps, num_threads
    )

    # --- Extract results ---                                        # AADC
    discounted_payoffs = results[0][payoff_res]                      # AADC
    price = float(np.mean(discounted_payoffs))                       # AADC

    # Greeks from single adjoint pass (no extra pricings needed!)    # AADC
    delta = float(np.mean(results[1][payoff_res][S0_arg]))           # AADC
    rho   = float(np.mean(results[1][payoff_res][r_arg]))            # AADC
    vega  = float(np.mean(results[1][payoff_res][sigma_arg]))        # AADC

    return price, delta, rho, vega

# All Greeks computed in ONE pass - +31% overhead vs +593%!
optimised.cpp - gbm_constants
731s 877 total lines
void gbm_constants(double r, double vol, double T, size_t num_timesteps,
                   double& dt, double& sqrt_dt, double& drift, double& vol_sqrt_dt) {
    /**Compute GBM simulation constants.*/
    dt = T / static_cast<double>(num_timesteps);
    sqrt_dt = std::sqrt(dt);
    drift = (r - 0.5 * vol * vol) * dt;
    vol_sqrt_dt = vol * sqrt_dt;
}
optimised.cpp - simulate_path
731s 877 total lines
// Scalar version (portable, works on ARM/Apple Silicon)
double simulate_path_scalar(double S0, double K, double drift, double vol_sqrt_dt,
                            const double* Z_row, size_t num_timesteps) {
    /**Simulate GBM path and compute payoff (scalar version).*/
    double price = S0;
    double running_sum = 0.0;

    for (size_t t = 0; t < num_timesteps; ++t) {
        price = price * std::exp(drift + vol_sqrt_dt * Z_row[t]);
        running_sum += price;
    }

    double average = running_sum / static_cast<double>(num_timesteps);
    double payoff = std::max(average - K, 0.0);
    return payoff;
}

// AVX2 SIMD version also available for x86-64 (~2x faster)
optimised.cpp - price_asian_option
731s 877 total lines
// Core pricing function (auto-selects AVX2 or scalar)
double price_asian_option(
    double S0, double K, double r, double vol, double T,
    const double* Z, size_t num_scenarios, size_t num_timesteps
) {
    double dt, sqrt_dt, drift, vol_sqrt_dt;
    gbm_constants(r, vol, T, num_timesteps, dt, sqrt_dt, drift, vol_sqrt_dt);

#if USE_AVX2
    // Broadcast constants to SIMD registers
    const __m256d drift_vec = _mm256_set1_pd(drift);
    const __m256d vol_sqrt_dt_vec = _mm256_set1_pd(vol_sqrt_dt);
    const __m256d S0_vec = _mm256_set1_pd(S0);
    size_t row_stride = (num_timesteps + SIMD_WIDTH - 1) & ~(SIMD_WIDTH - 1);
#else
    size_t row_stride = num_timesteps;
#endif

    double payoff_sum = 0.0;
    for (size_t scenario = 0; scenario < num_scenarios; ++scenario) {
        const double* Z_row = Z + scenario * row_stride;
#if USE_AVX2
        payoff_sum += simulate_path_avx(S0, K, drift, vol_sqrt_dt, Z_row, num_timesteps,
                                        drift_vec, vol_sqrt_dt_vec, S0_vec);
#else
        payoff_sum += simulate_path_scalar(S0, K, drift, vol_sqrt_dt, Z_row, num_timesteps);
#endif
    }

    return std::exp(-r * T) * (payoff_sum / static_cast<double>(num_scenarios));
}
optimised.cpp - price_with_greeks
731s 877 total lines
// Greeks via bump-and-revalue (requires 4 full pricings)
constexpr double BUMP_SIZE = 1e-6;

void price_with_greeks(
    double S0, double K, double r, double vol, double T,
    const double* Z, size_t num_scenarios, size_t num_timesteps,
    double& price, double& delta, double& rho, double& vega
) {
    price = price_asian_option(S0, K, r, vol, T, Z, num_scenarios, num_timesteps);
    double p_dS = price_asian_option(S0 + BUMP_SIZE, K, r, vol, T, Z, num_scenarios, num_timesteps);
    double p_dr = price_asian_option(S0, K, r + BUMP_SIZE, vol, T, Z, num_scenarios, num_timesteps);
    double p_dv = price_asian_option(S0, K, r, vol + BUMP_SIZE, T, Z, num_scenarios, num_timesteps);
    delta = (p_dS - price) / BUMP_SIZE;
    rho   = (p_dr - price) / BUMP_SIZE;
    vega  = (p_dv - price) / BUMP_SIZE;
}

// Even with AVX2 SIMD, Greeks add +582% overhead (7 evaluations)!

Key insight: AADC delivers 420x faster than Basic Python and 73x faster Greeks than NumPy — outperforming hand-optimised C++ by 5.4x.

Greeks via AAD: 1 forward + 1 adjoint pass - +32% overhead vs +306% for NumPy bump-and-revalue.

Choose Your Implementation Path

MatLogica's automatic adjoint differentiation (AAD) technology delivers breakthrough performance and easy integration across any environment—whether modernizing legacy systems, building greenfield applications, accelerating open-source libraries like QuantLib and ORE, or optimizing cloud costs.

What Practitioners Say

Example: Live Risk System

Live Risk

Turn Batch into Real-Time

Turn your batch-processing risk analytics into "always on" Live Risk server.

This example is based on QuantLib, supercharged by MatLogica AADC. Hit "Launch The Live Risk App" in the widget to see it live!

Read More

Calculate Your Savings

See exact savings for your portfolio size and cloud spend. Takes 45 seconds.

Open ROI Calculator

Book a Call

30 minutes. See AADC in action and discuss your use case.