Rest API calls for SwapCalibration

#1

Hi ,

We have a use case where we are implementing a discount curve calibration using Opengamma libraries using below code.

CalibrationMeasures calibrationMeasures = CalibrationMeasures.MARKET_QUOTE;

CurveGroupMarketDataFunction curveGroupMarketDataFunction = new CurveGroupMarketDataFunction(calibrationMeasures);

CurveGroupId curveGroupId = CurveGroupId.of("EUR-EURIBOR6M");

MarketDataRequirements reqs = curveGroupMarketDataFunction.requirements(curveGroupId, marketDataConfig);

MarketDataFactory marketDataFactory = StandardComponents.marketDataFactory();

MarketData calibratedMarketData = marketDataFactory.create(reqs, marketDataConfig, marketData, refData); 

// get the calibrated curves

CurveId eurDscId = CurveId.of(CurveGroupName.of("EUR-EURIBOR6M").toString(), "ZC-EUR-SWAP-ZERO-RATES-CURVE");

RatesMarketDataLookup lookup = RatesMarketDataLookup.of(ImmutableMap.of(Currency.EUR, eurDscId),ImmutableMap.of(IborIndices.EUR_EURIBOR_6M, eurDscId));

RatesProvider provider = lookup.ratesProvider(calibratedMarketData);

We have a requirement to invoke these functions using a REST API call.Is there an API support for REST calls in Strata ? If yes then is there a sample example we can follow?

Regards
Surima

0 Likes

#2

There is no REST API in Strata - its just a library. We have created a service internally that wraps code similar code to this, so we know it can be done without too much hassle.

0 Likes