market-data-lib module, with Spring configuration classes available in the market-data-config module.
Supported interpolation types
This API supports linear, linear with volatility-to-variance transformations for surfaces, cubic and spline interpolation, with theInterpolationMode class in the com.activeviam.marketdata.lib.interpolation.services.intf package providing valid options.
Handling market data
The interpolation API expects the known data points to be expressed as an array of doubles with corresponding double arrays of coordinates (tenors/moneyness). The retrieval interfaces packaged with the market data API allow you to retrieve curves or surfaces as values and associated coordinates.Data mapping
Market data values are always expressed as doubles, whereas coordinates will likely be expressed as other data types, based on the structure of the underlying market data store. To map these data types to the required interpolation double values, the following interfaces and implementations are provided:Interpolator Interfaces
Interpolators are objects that return an interpolated point when provided with correctly configured known data points and the required coordinates. All interpolators must implement theIInterpolator interface:
Each interpolator is constructed with a factory that formats the input data correctly for that specific interpolator. These factories implement the
IInterpolatorFactory interface:
Both
IInterpolator and IInterpolatorFactory interfaces extend the IInterpolatorSettings interface, which contains methods that describe the type of interpolation handled by that interpolator.
You can also find a number of convenient interfaces, which extend the
IInterpolationSettings interface and provide common settings as default methods.
Interpolation transformation
For some use cases, both the input data for an interpolator and the result of the interpolation need to be transformed. To simplify the creation and configuration of transformations, we provide the following classes:Interpolator Implementations
The majority of interpolators provided in Atoti Market Data use the Apache Commons Math library. As the Apache library expects unflattened matrices, conversion and sorting is handled through data classes in thecom.activeviam.marketdata.lib.interpolation.interpolators.commonsmath.data package:
Several interpolators are provided in the
com.activeviam.marketdata.lib.interpolation.interpolators.commonsmath.impl package.
Further, custom interpolators let you carry out linear interpolation on any number of axes. You can find them in the
com.activeviam.marketdata.lib.interpolation.interpolators.impl package.
Interpolator factories
The following interpolator factory classes are available. Implementations ofIInterpolatorFactory are available in the same package and these construct interpolators that work along one, two, or three axes, as follows:
Interpolation services
The following interpolation services are available:- The
IInterpolatorBuilderServiceinterface, with correspondingInterpolatorBuilderServiceimplementation, collects the interpolator factories and allows the retrieval of an interpolator for the given mode, values, and number of coordinate axes. The retrieved interpolator is constructed with the correct known data points. - The
IInterpolationService<V, D, P>interface, providing a method for interpolating aVvalue for a specificPpoint, using aCompositeKeycache key, anInterpolationModeandDknown data and a specificPpoint.
com.activeviam.marketdata.lib.interpolation.services.intf package with the implementations in the com.activeviam.marketdata.lib.interpolation.services.impl package.
Spring configuration classes
Several Spring configuration classes are provided in thecom.activeviam.marketdata.config.interpolation package of the market-data-config module, providing interpolation services and interpolator factory Spring beans. When you add the market-data-spring-boot-starter as a dependency in your project, the AllMarketDataInterpolationConfig class will be autoconfigured.