MatLogica | Kernel Architecture

Kernel Architecture

Kernel-Oriented Architecture: From Traditional to High-Performance Computing

Discover how MatLogica's kernel-based approach fundamentally reimagines quantitative calculations, delivering 100x-2000x performance improvements through pre-recorded computational workflows and automatic differentiation.

Executive Summary

For Managers & Decision Makers:

  • What it is: A new architectural approach that pre-records pricing workflows as reusable kernels
  • Key benefit: 600x faster portfolio pricing, 2000x faster risk calculations with sub-millisecond RFQ responses
  • Two approaches: Light touch (weeks to deploy) or full architecture (months, maximum performance)
  • Business impact: Real-time risk management, competitive electronic trading, 80% infrastructure cost reduction
  • Technical approach: Record computational graph once, execute thousands of times with minimal overhead

Continue reading for technical details or Jump to Deployment Options

The Traditional Architecture Challenge

Why object-oriented pricing systems struggle with modern performance demands

Financial markets demand real-time pricing and risk management, yet traditional object-oriented architectures execute the full calculation logic for every single evaluation. When you need to price portfolios multiple times per day, respond to quote requests in milliseconds, or run thousands of stress scenarios, this approach becomes a critical bottleneck.

The challenge intensifies as:

  • Portfolios grow in size and complexity
  • Regulatory requirements demand more frequent risk calculations
  • Electronic trading requires sub-millisecond response times
  • Risk teams need to run hundreds of scenarios for stress testing

Performance Bottlenecks in Traditional Architecture:

  • Repeated interpretation: Full calculation logic every time
  • Object creation overhead: Creating/destroying objects for each run
  • Linear scaling: Performance degrades with portfolio size
  • Sensitivity calculations: Requires bump-and-reprice for each parameter
  • Memory inefficiency: Repeated allocations and deallocations
  • Cache misses: Poor memory locality from object-oriented design

The Kernel-Oriented Solution

Record once, execute thousands of times

MatLogica's kernel-oriented architecture fundamentally changes how quantitative calculations are performed. Instead of recalculating everything from scratch, the computational workflow is recorded once as a highly optimized kernel that can be executed repeatedly with minimal overhead.

How It Works - Two Key Phases:

1. Record Phase (One-Time Cost)

The calculation workflow is executed once and captured as a computational graph. This graph is then compiled into a highly optimized machine code kernel that represents the complete pricing or risk logic.

2. Execution Phase (Repeated Usage)

The kernel can be executed hundreds or thousands of times with different market data inputs. Each execution is dramatically faster because:

  • No interpretation or object creation overhead
  • Optimized memory layout and cache usage
  • Direct machine code execution
  • Automatic vectorization and parallelization

Real-World Results: When a portfolio is recorded once at the start of the day, it can be efficiently re-evaluated many times with minimal overhead. Organizations using this approach have observed portfolio-level acceleration of 600x for pricing and over 2000x for risk sensitivities.

Architecture Comparison

Traditional vs Kernel-Oriented approaches

Aspect Traditional Object-Oriented Kernel-Oriented Architecture
Calculation Model Interpret and execute full logic each time Record once, execute optimized kernel repeatedly
Performance Consistent overhead for every calculation 100x-2000x faster after initial recording
Scalability Performance degrades linearly with portfolio size Scales efficiently to large portfolios
Risk Sensitivities Bump-and-reprice or finite differences Automatic differentiation - all sensitivities in one pass
Memory Usage Repeated allocations and deallocations Efficient memory layout with reuse
RFQ Response Time 10-100 milliseconds Sub-millisecond for standard trades
Best Use Cases One-off valuations, ad-hoc analysis Repeated calculations, real-time systems, large-scale simulations

Two Deployment Scenarios

Choose the approach that fits your needs and timeline

Scenario 1: Light Touch Approach

For: Proof of value, specific bottlenecks, quick wins - Start here for legacy and open-source systems

Overview

Integrate MatLogica's acceleration into existing systems with minimal code changes. Kernels are created for specific use cases and treated as disposable - generated when needed, discarded when no longer relevant.

Typical Use Cases
  • Monte Carlo simulations: Record portfolio once, run thousands of scenarios
  • What-if analysis: Test hypothetical trades across multiple market scenarios
  • Batch processing: Accelerate end-of-day or overnight batch runs
  • Stress testing: Evaluate portfolios against hundreds of scenarios
  • Risk sensitivities: Calculate all Greeks in a single pass
Key Benefits
  • Fast implementation: Weeks, not months
  • Minimal code changes: Wrap existing pricing calls
  • Low risk: Existing systems remain largely unchanged
  • Quick value: Immediate performance gains for targeted workflows
  • Future foundation: Can evolve to full kernel architecture
Performance Gains
  • 100x-600x acceleration for targeted workflows
  • Automatic differentiation for sensitivities
  • Efficient scenario analysis
Example Workflow: Create kernels in the morning, reuse throughout the day for real-time risk monitoring, discard at end of day. Next day starts fresh with updated portfolio.

Scenario 2: Kernel-Based Architecture (Recommended)

For: Greenfield projects OR scaling from Scenario 1 for maximum performance and all benefits

Overview

Comprehensive redesign where kernels become the foundational organizing principle. This is MatLogica's recommended approach for:

  • Greenfield projects: Build with maximum performance from day one
  • Scaling from Scenario 1: Take Light Touch success to full enterprise-wide architecture
  • Maximum performance: When you're ready for 600x-2000x gains across all workflows
Core Principles
  • Hierarchical organization: Portfolios as hierarchies of sub-portfolios and kernels
  • Persistent kernels: Created at start of day, maintained throughout
  • Layered kernel types: Market data calibration, pricing, risk calculation, quote generation
  • Smart trade management: Portfolio changes via scaling factors, not kernel recreation
When to Scale from Scenario 1

Consider moving from Light Touch to Full Architecture when you need:

  • Real-time pricing and risk management across all workflows
  • Sub-millisecond RFQ responses for electronic trading
  • Maximum performance (600x-2000x) enterprise-wide
  • Scalability for portfolio growth and complexity
  • Consistent kernel-based approach across all systems
Daily Lifecycle

Start of Day:

  • Market data calibration kernel created and cached
  • Portfolio pricing kernels generated for trades at market open
  • Standard trade kernels pre-recorded

During Trading:

  • Market data updates flow through calibration kernel
  • Portfolio pricing uses cached kernels with minimal latency
  • Standard trade quotes: sub-millisecond, zero initialization
  • Custom trade quotes: 1-2s first quote, then sub-millisecond
Performance Characteristics
  • Portfolio pricing: 600x speed-up
  • Risk sensitivities: 2000x+ acceleration with automatic differentiation
  • Standard RFQ: Sub-millisecond with zero initialization
  • Scenario analysis: Hundreds of scenarios in time traditional systems take for one
Key Benefits
  • Maximum performance: Full potential of kernel acceleration
  • Real-time capability: Competitive electronic trading
  • Scalability: Supports complex portfolio organizations
  • Future-ready: Designed for growth and increasing complexity
  • Operational excellence: Consistent architecture across all workflows
Technical Capabilities
  • Language flexibility: Python or C++ with mixed-mode execution
  • Cloud ready: Kernels can be serialized for distribution
  • Memory efficient: Scaling factors avoid kernel recreation
Real-World Example: One client using ORE achieves ~600x speed-up for portfolio pricing. Trade-level acceleration appears modest, but portfolio-level benefits are massive due to efficient kernel reuse.
Natural Progression Path:

Start: Scenario 1 (Light Touch) for proof of value and specific bottlenecks

Scale: Scenario 2 (Full Architecture) when results prove ROI and you're ready for enterprise-wide transformation

Result: Maximum performance with minimized risk through phased implementation

Choosing the Right Approach

Factor Light Touch Kernel-Based Architecture
Implementation Time Weeks Months
Code Changes Minimal Significant architectural changes
Performance Gain 100x-600x for targeted workflows 600x-2000x across entire system
Risk Level Low - minimal system changes Moderate - requires architectural planning
Future Growth Path Can evolve to full architecture Built for scalability from day one
Best For Proof of value, targeted bottlenecks, quick wins with legacy and open-source systems Greenfield projects OR scaling from Scenario 1 for maximum performance across all workflows

Business Value & Strategic Benefits

Operational Excellence

  • Real-time decision making: Transform from periodic batch to continuous monitoring
  • Reduced infrastructure costs: Same results with fewer compute resources
  • Faster time to market: Respond to opportunities faster than competitors
  • Enhanced client service: Tighter spreads and faster quotes

Risk Management

  • Comprehensive analysis: All Greeks and risk metrics in one pass
  • Extensive testing: Hundreds of regulatory stress scenarios
  • Improved risk limits: Real-time monitoring and enforcement
  • Better decisions: More informed risk-taking with complete data

Competitive Advantages

  • Electronic trading excellence: Compete where milliseconds matter
  • Complex product capability: Exotics as efficient as vanilla
  • Scalable growth: Portfolio growth without proportional infrastructure
  • Innovation platform: Foundation for future quantitative innovations

Key Performance Metrics

  • 600x faster: Portfolio pricing compared to traditional
  • 2000x+ faster: Risk sensitivity calculations
  • Sub-millisecond: Response time for standard trade quotes
  • 80% reduction: Cloud and infrastructure costs

The Best of Both Worlds

Kernel-oriented architecture lets you develop with object-oriented practices (clean code, maintainability, extensibility) while executing with high-performance computing capabilities (vectorization, automatic differentiation, minimal overhead). You no longer have to choose between code quality and performance.

Real-World Performance

Proven results from production deployments

600x
Portfolio Pricing

Speed-up achieved by clients using ORE with kernel architecture

2000x+
Risk Sensitivities

Acceleration for sensitivity calculations using automatic differentiation

<1ms
RFQ Response

Sub-millisecond pricing for standard trades with pre-recorded kernels

Understanding the Numbers

The kernel recording step is required for any new configuration (e.g., new trade or portfolio). Initial performance includes recording + evaluation time (around 11x for par sensitivities). However, once recorded, subsequent evaluations operate in the high-performance regime with 2000x+ acceleration.

At the portfolio level, the portfolio is recorded once and then re-evaluated intraday. Portfolio changes are handled through notional adjustments and sub-portfolio kernels, avoiding full re-recording. This is why portfolio performance scales so efficiently.

Experience 100x-2000x Performance Improvements

Discover how kernel-oriented architecture can transform your quantitative computing capabilities

Start with Light Touch for quick wins, or build a Kernel-Based Architecture for maximum performance