Get started with AADC in 3 simple steps: see code examples, timelines, and best practices for rapid deployment. No templates required, minimal code changes, and results in weeks not months.
Unlike tape-based AAD tools that require months or years of integration effort, AADC can be deployed in weeks with minimal code changes. This AADC Integration Guide walks you through the three-step process.
MatLogica uses an unorthodox integration approach that delivers 6-100x performance results in a few weeks, while our competitors can take months or even years to implement. The required code changes are minimal and can be performed by an experienced quant developer or software engineer with little to no additional training in automatic differentiation or AAD concepts.
You can perform the AADC integration yourself using our comprehensive toolkit, invite our integration expert for hands-on assistance, or work with a certified third-party vendor to supercharge your quantitative finance systems with automatic adjoint differentiation capabilities.
Introducing a traditional operator overloading AAD library will slow down the codebase by a factor of approximately 2x during development. MatLogica has developed a unique approach that avoids this undesired performance penalty, and the code will not slow down once AADC is introduced—maintaining full speed throughout the integration and testing phases.
Our semi-automated integration approach enables you to maintain a single branch of code during the integration and development processes. MatLogica integration scripts can be part of your CI/CD pipeline, meaning that team members will not be impacted by the changes introduced during gradual rollout. You can then transition to production once you have full confidence in the results from comprehensive testing and validation!
Simple, low-risk integration in weeks
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.
Get your first function accelerated and validated within weeks
Wrap existing pricing calls without restructuring your codebase
Existing systems remain largely unchanged during integration
Performance gains for targeted workflows from day one
Get your first function accelerated and validated in weeks
Use MatLogica's Automated Integration scripts to replace standard `double` with `idouble` (AADC's active type) for variables involved in the computational flow.
double price = monteCarloPrice(
spot,
vol,
rate
);
idouble price = monteCarloPrice(
spot, // idouble
vol, // idouble
rate // idouble
);
Identify the pricing/simulation function to optimize, mark inputs and outputs, and instruct AADC to record the computational graph. This generates an optimized binary kernel.
// 1. Create AADC context
AADC::Context ctx;
// 2. Mark inputs
idouble spot = 100.0;
idouble vol = 0.2;
ctx.markInput(spot);
ctx.markInput(vol);
// 3. Start recording
ctx.startRecording();
// 4. Execute function once
idouble price = myPricingFunction(spot, vol);
// 5. Mark output
ctx.markOutput(price);
// 6. Generate kernel
auto kernel = ctx.stopRecording();
Use the generated kernel instead of the original function. Compute valuations AND all derivatives simultaneously with 6-100x performance improvement.
// Process portfolio
for (auto& trade : portfolio) {
// Set inputs
std::vector<double> inputs = {
trade.spot, trade.vol, trade.rate
};
// Execute kernel - computes price + all derivatives
auto result = kernel.execute(inputs);
// Extract results
trade.price = result.value(); // Original value
auto greeks = result.adjoints(); // All derivatives
trade.delta = greeks[0]; // ∂price/∂spot
trade.vega = greeks[1]; // ∂price/∂vol
trade.rho = greeks[2]; // ∂price/∂rate
}
| Phase | Activities | Duration | Deliverable |
|---|---|---|---|
| Week 1 | Setup, idouble integration | 5 days | idouble produced same numerical results |
| Weeks 2-4 | Identify target function, record and use recording | 5-10 days | One function accelerated, validated and ready for production |
| Weeks 5-20 | Expand to core pricing functions, parallel testing | 16 weeks | Core functions accelerated |
| Weeks 21-34 | Full library integration, comprehensive testing | 14 weeks | Complete integration tested |
| Weeks 35-48 | Production rollout, monitoring, optimization | 14 weeks | Production deployment |
Total Timeline (Typical) for Large Legacy Systems (10M+ LOC): 12 months
Schedule a consultation to discuss your integration timeline and requirements