Achieve cost-efficient, secure cloud Live Risk using Code Generation AAD for fast sensitivity computation. Deploy encrypted binary kernels without exposing proprietary models or trade data.
Costs, flexibility, and scalability drive banks to transition risk systems to the cloud. The ultimate goal is "Live Risk" - real-time portfolio risk that updates with every market tick. However, achieving this cost-effectively remains elusive with traditional "lift-and-shift" cloud migration approaches.
There are two distinct approaches to cloud Live Risk:
Problems:
Benefits:
Problems:
A cost-efficient and future-proof alternative: Use modern Code Generation AAD to generate efficient binary kernels representing curve-building, portfolio pricing, and risk calculations. These kernels can be securely deployed on cloud at the start of the trading day for continuous tick-level risk throughout the day.
20-50x faster than original analytics
~100x cost reduction vs always-on approach
Millisecond portfolio risk computation
Secure deployment - models and data stay on premises
No latency - kernels ready at market open
MatLogica's Automatic Adjoint Differentiation Compiler (AADC) delivers precisely this.
Consider a large portfolio including various trades with models of varying complexity, plus curve-building functionality. The objective is **tick-level pricing and risk** for this complex model.
Achieving this with an always-on "lift & shift" approach would be prohibitively expensive and expose proprietary models and trade data to cloud environments.
During a single execution of the original analytics, AADC generates binary kernels representing the optimized and compressed elementary operations of the original program. Optionally, an extra kernel computes the backward pass of automatic differentiation to calculate all risks.
Remarkably, these kernels are almost Enigma-secure. AADC receives a sequence of elementary operations from the original analytics with all loops unrolled and only hard-coded values representing strikes, expiry dates, or valuation dates.
With no visibility of the original models, AADC generates optimized and compressed kernels where all business-critical information is hidden between the ones and zeros. Even the same portfolio generates different binary representations from one trading day to another.
For cloud execution, AADC kernels are generated for specific hardware, meaning the kernel can be serialized immediately and sent for execution on the cloud at the start of a trading day. Proprietary models and trade data remain on premises.
Several architectural options are available depending on trading business nature, existing infrastructure, and processes. You can implement AADC for all trades or retain valuation of certain instruments in original analytics while aggregating with AADC-computed measures.
This might sound like "always-on," but thanks to AADC, computational resources required are **far less than normal "lift-and-shift" always-on approaches.** Expensive cloud resources are not wasted.
When pricing a new configuration, kernel generation time is part of overall execution. To reduce this overhead, MatLogica has developed a specialized graph compiler that generates machine code directly during program execution without relying on external compilers.
However, kernel generation can take seconds to minutes for complex structures. We suggest two approaches to optimize performance:
Portfolio pricing and risk that remains predominantly static during the trading day.
Approach: Generate kernel at beginning of day, reuse throughout. Regenerate on events (significant portfolio changes).
For larger functions, kernel generation takes longer - evaluate regeneration frequency accordingly.
New trades, pre-trade analysis, intraday activities.
Approach: Generate kernels on-the-fly and send to cloud for execution. Aggregate with existing position and risks.
In practice, solution architects should segregate recordings according to business nature, portfolio structure, instruments, update frequency, business requirements, and existing technology stack to deliver optimal performance.
Kernel creation is triggered by the Quant Library on events that change portfolio state
Once generated, the kernel ships to cloud (grid), ready to receive market data updates, process them (including curve building, solvers/minimizers), and return risk/pricing information for aggregation and display to traders.
This document presents a high-level solution architecture using MatLogica AADC for cloud execution without exposing any proprietary data or models.
Contact us to discuss your cloud migration strategy and Live Risk requirements