All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.opengamma.strata.calc.marketdata.TimeSeriesProvider Maven / Gradle / Ivy

Go to download

Provides the ability to run calculations, manage market data and create scenarios

There is a newer version: 2.12.44
Show newest version
/*
 * Copyright (C) 2015 - present by OpenGamma Inc. and the OpenGamma group of companies
 *
 * Please see distribution for license.
 */
package com.opengamma.strata.calc.marketdata;

import com.opengamma.strata.collect.result.Result;
import com.opengamma.strata.collect.timeseries.LocalDateDoubleTimeSeries;
import com.opengamma.strata.data.ObservableId;

/**
 * A provider of time-series.
 * 

* This plugin point allows a market data supplier of time-series to be provided. */ public interface TimeSeriesProvider { /** * Returns a time-series provider that is unable to source any time-series. *

* All requests for a time-series will return a failure. * This is used to validate that no time-series have been requested that were not * already supplied in the input to the market data factory. * * @return the time-series provider */ public static TimeSeriesProvider none() { return NoTimeSeriesProvider.INSTANCE; } /** * Returns a time-series provider that returns an empty time-series for any ID. *

* All requests for a time-series will succeed, returning an empty time-series. * This is used for those cases where time-series are considered optional. * * @return the time-series provider */ public static TimeSeriesProvider empty() { return EmptyTimeSeriesProvider.INSTANCE; } //------------------------------------------------------------------------- /** * Provides the time-series for the specified identifier. *

* The implementation will provide a time-series for the identifier, returning * a failure if unable to do so. * * @param identifier the market data identifier to find * @return the time-series of market data for the specified identifier */ public abstract Result provideTimeSeries(ObservableId identifier); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy