Class FXRates
- java.lang.Object
-
- com.activeviam.risk.ref.services.impl.FXRates
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,com.qfs.vector.IVector>
getDetailedMarketShift(com.qfs.store.IDatastoreVersion datastore, LocalDate asOfDate, String baseCcy, String counterCcy, com.quartetfs.biz.pivot.IActivePivot activePivot, List<Object> leafCoordinates, String marketDataSet, String scenarioSet)
Retrieve the FX market shifts between two currencies.com.qfs.vector.IVector
getMarketShift(com.qfs.store.IDatastoreVersion datastore, LocalDate asOfDate, String baseCcy, String counterCcy, com.quartetfs.biz.pivot.IActivePivot activePivot, List<Object> leafCoordinates, String marketDataSet, String scenarioSet)
Retrieve the FX market shifts between two currencies.com.quartetfs.fwk.impl.Pair<String,com.qfs.vector.IVector>
getMarketShiftDirect(com.qfs.store.IDatastoreVersion datastore, LocalDate asOfDate, String baseCcy, String counterCcy, String marketDataSet, String scenarioSet)
Double
getSpotFXRate(com.qfs.store.IDatastoreVersion datastore, LocalDate asOfDate, String baseCcy, String counterCcy, com.quartetfs.biz.pivot.IActivePivot activePivot, List<Object> leafCoordinates, String marketDataSet)
Retrieve the spot FX rate between two currencies.static Double
getSpotFXRate(com.qfs.store.IDatastoreVersion datastore, LocalDate asOfDate, String baseCcy, String counterCcy, String commonCcy, com.quartetfs.biz.pivot.IActivePivot activePivot, List<Object> leafCoordinates, String marketDataSet)
Lookup the spot FX rate between two currencies.static Double
getSpotFXRateDirect(com.qfs.store.IDatastoreVersion datastore, LocalDate asOfDate, String baseCcy, String counterCcy, String marketDataSet)
Queries the datastore directly for the spot FX rate.static Double
getSpotFXRateDirectOrReverse(com.qfs.store.IDatastoreVersion datastore, LocalDate asOfDate, String baseCcy, String counterCcy, String marketDataSet)
Queries the datastore for the direct spot rate, if not found queries the reverse spot rate and returns the reciprocal.Double
getSpotFXRateWithErrorHandling(com.qfs.store.IDatastoreVersion datastore, LocalDate asOfDate, String baseCcy, String counterCcy, com.quartetfs.biz.pivot.IActivePivot activePivot, List<Object> leafCoordinates, String marketDataSet)
Retrieve the spot FX rate between two currencies.
-
-
-
Field Detail
-
LOGGER
public static final Logger LOGGER
-
SPOT_RATE
public static final String SPOT_RATE
- See Also:
- Constant Field Values
-
commonCcy
public final String commonCcy
Common currency used for indirect FX rate lookups
-
-
Method Detail
-
getSpotFXRate
public Double getSpotFXRate(com.qfs.store.IDatastoreVersion datastore, LocalDate asOfDate, String baseCcy, String counterCcy, com.quartetfs.biz.pivot.IActivePivot activePivot, List<Object> leafCoordinates, String marketDataSet)
Retrieve the spot FX rate between two currencies.- Specified by:
getSpotFXRate
in interfaceIFXRates
- Parameters:
datastore
- The datastore version to get the FX Rates fromasOfDate
- AsOf DatebaseCcy
- base currency (USD for the USD/EUR rate)counterCcy
- quote currency (EUR for the USD/EUR rate)activePivot
- ActivePivot instanceleafCoordinates
- Coordinates extracted from additional FX Rates Level InfomarketDataSet
- Set of fx rates to use- Returns:
- FX rate between those two currencies, or null if no rate found.
-
getSpotFXRateWithErrorHandling
public Double getSpotFXRateWithErrorHandling(com.qfs.store.IDatastoreVersion datastore, LocalDate asOfDate, String baseCcy, String counterCcy, com.quartetfs.biz.pivot.IActivePivot activePivot, List<Object> leafCoordinates, String marketDataSet)
Retrieve the spot FX rate between two currencies.- Specified by:
getSpotFXRateWithErrorHandling
in interfaceIFXRates
- Parameters:
datastore
- The datastore version to get the FX Rates fromasOfDate
- AsOf DatebaseCcy
- base currency (USD for the USD/EUR rate)counterCcy
- quote currency (EUR for the USD/EUR rate)activePivot
- ActivePivot instanceleafCoordinates
- Coordinates extracted from additional FX Rates Level InfomarketDataSet
- Set of fx rates to use- Returns:
- FX rate between those two currencies, or null if no rate found.
-
getSpotFXRate
public static Double getSpotFXRate(com.qfs.store.IDatastoreVersion datastore, LocalDate asOfDate, String baseCcy, String counterCcy, String commonCcy, com.quartetfs.biz.pivot.IActivePivot activePivot, List<Object> leafCoordinates, String marketDataSet)
Lookup the spot FX rate between two currencies. Try direct lookup first, if not found try using common currency.- Parameters:
datastore
- The datastore version to get the FX Rates fromasOfDate
- AsOf DatebaseCcy
- base currency (USD for the USD/EUR rate)counterCcy
- quote currency (EUR for the USD/EUR rate)commonCcy
- common currency used for indirect lookup.activePivot
- ActivePivot instanceleafCoordinates
- Coordinates extracted from additional FX Rates Level InfomarketDataSet
- Set of fx rates to use- Returns:
- FX rate between the base and counter currencies, or null if no rate found.
-
getSpotFXRateDirectOrReverse
public static Double getSpotFXRateDirectOrReverse(com.qfs.store.IDatastoreVersion datastore, LocalDate asOfDate, String baseCcy, String counterCcy, String marketDataSet)
Queries the datastore for the direct spot rate, if not found queries the reverse spot rate and returns the reciprocal.- Parameters:
datastore
- The datastore version to get the FX Rates fromasOfDate
- AsOf DatebaseCcy
- base currency (USD for the USD/EUR rate)counterCcy
- quote currency (EUR for the USD/EUR rate)marketDataSet
- Set of fx rates to use- Returns:
- The direct or reverse rate between two currencies, depending on which is available.
-
getSpotFXRateDirect
public static Double getSpotFXRateDirect(com.qfs.store.IDatastoreVersion datastore, LocalDate asOfDate, String baseCcy, String counterCcy, String marketDataSet)
Queries the datastore directly for the spot FX rate.- Parameters:
datastore
- The datastore version to get the FX Rates fromasOfDate
- AsOf DatebaseCcy
- base currency (USD for the USD/EUR rate)counterCcy
- quote currency (EUR for the USD/EUR rate)marketDataSet
- Set of fx rates to use- Returns:
- The direct rate between two currencies, from the datastore.
-
getMarketShift
public com.qfs.vector.IVector getMarketShift(com.qfs.store.IDatastoreVersion datastore, LocalDate asOfDate, String baseCcy, String counterCcy, com.quartetfs.biz.pivot.IActivePivot activePivot, List<Object> leafCoordinates, String marketDataSet, String scenarioSet)
Description copied from interface:IFXRates
Retrieve the FX market shifts between two currencies. The shifted FX rate = (marketShift + 1) * fxRate- Specified by:
getMarketShift
in interfaceIFXRates
- Parameters:
datastore
- The datastore version to get the FX Rates fromasOfDate
- AsOf DatebaseCcy
- base currency (USD for the USD/EUR rate)counterCcy
- quote currency (EUR for the USD/EUR rate)activePivot
- ActivePivot instanceleafCoordinates
- Coordinates extracted from additional FX Rates Level InfomarketDataSet
- Set of fx rates to usescenarioSet
- The VaR scenarios that the vector must match- Returns:
- FX market shifts between those two currencies, or null if no rate found.
-
getDetailedMarketShift
public Map<String,com.qfs.vector.IVector> getDetailedMarketShift(com.qfs.store.IDatastoreVersion datastore, LocalDate asOfDate, String baseCcy, String counterCcy, com.quartetfs.biz.pivot.IActivePivot activePivot, List<Object> leafCoordinates, String marketDataSet, String scenarioSet)
Description copied from interface:IFXRates
Retrieve the FX market shifts between two currencies. The shifted FX rate = (marketShift + 1) * fxRate- Specified by:
getDetailedMarketShift
in interfaceIFXRates
- Parameters:
datastore
- The datastore version to get the FX Rates fromasOfDate
- AsOf DatebaseCcy
- base currency (USD for the USD/EUR rate)counterCcy
- quote currency (EUR for the USD/EUR rate)activePivot
- ActivePivot instanceleafCoordinates
- Coordinates extracted from additional FX Rates Level InfomarketDataSet
- Set of fx rates to usescenarioSet
- The VaR scenarios that the vector must match- Returns:
- FX market shifts between those two currencies, or null if no rate found.
-
-