← Back to Blog
Architecture

Cloud-Based Live Risk: 100× Cost Reduction vs Always-On

Traditional cloud risk architectures keep servers running 24/7. Binary kernel deployment enables on-demand live risk — millisecond latency, ~100× cheaper than always-on.

Dmitri Goloubentsev
Dmitri Goloubentsev
· 3 min read
cloud live risk serverless cost reduction architecture kernel

The standard approach to cloud risk: spin up instances, load the pricing library, calibrate, and keep them running. Traders hit the service throughout the day. At night, the instances idle. You pay for 24 hours to use 8.

The problem with always-on

MetricAlways-OnOn-Demand (kernel)
Utilization30-40%~100%
Cold startNone<1 second
Monthly cost (100 products)$50K+~$500
ScalingPre-provisionedAutomatic

The 100× cost difference comes from a simple observation: a compiled kernel is a pure function. It has no state, no framework, no library dependencies at runtime. It loads in milliseconds, evaluates in microseconds, and can run on the cheapest serverless infrastructure available.

Binary kernel architecture

  1. Start of day: Record all pricing kernels. Each becomes a binary blob, a few hundred KB of compiled machine code.
  2. Deploy: Upload kernels to object storage (S3, GCS). Each kernel is versioned and immutable.
  3. Evaluate: When a price is needed, a lightweight runtime loads the kernel, sets inputs, calls forward(), returns the result. The runtime is stateless. It doesn’t know what the kernel computes.
  4. Scale: Each evaluation is independent. Lambda, Cloud Run, or any FaaS platform works. You pay per invocation, not per hour.

Security benefit

The binary kernel contains compiled machine code, not source code. A kernel for an IR swap looks like a kernel for an equity option. Both are opaque binary blobs. This is almost “Enigma-secure”: even if someone obtains the kernel, they cannot reverse-engineer the pricing logic. IP protection comes for free.

Calibration design

Two approaches:

  • Calibrate-and-embed: Run the calibration solver, bake the calibrated parameters into the kernel. Each market data snapshot produces a new kernel version. Simple, immutable, auditable.
  • Calibrate-on-demand: The kernel accepts model parameters as inputs. A separate calibration service updates parameters when market data moves. More flexible, slightly more complex.

Both work. The choice depends on how frequently your market data changes and how expensive calibration is.


Implemented using AADC, a commercial adjoint AD compiler (matlogica.com).

Want to see these results on your own portfolio?

Get in Touch

Interested in these opportunities?

Let's arrange a free demo for you and your team.

Book a Demo