private MarketDataFxRateProvider(MarketData marketData, ObservableSource fxRatesSource, Currency triangulationCurrency)
 {
     JodaBeanUtils.notNull(marketData, "marketData");
     JodaBeanUtils.notNull(fxRatesSource, "fxRatesSource");
     this.marketData            = marketData;
     this.fxRatesSource         = fxRatesSource;
     this.triangulationCurrency = triangulationCurrency;
 }
        //-----------------------------------------------------------------------
        public virtual void coverage()
        {
            ObservableSource test = ObservableSource.of("Foo");

            assertEquals(test.ToString(), "Foo");
            assertSerialization(test);
            assertJodaConvert(typeof(ObservableSource), test);
        }
 /// <summary>
 /// Obtains an instance representing the FX rate for a currency pair, specifying the source.
 /// </summary>
 /// <param name="base">  the base currency of the pair </param>
 /// <param name="counter">  the counter currency of the pair </param>
 /// <param name="observableSource">  the source of the observable market data used to create the rate </param>
 /// <returns> an ID for the FX rate for the currency pair </returns>
 public static FxRateId of(Currency @base, Currency counter, ObservableSource observableSource)
 {
     return(new FxRateId(CurrencyPair.of(@base, counter), observableSource));
 }
 /// <summary>
 /// Obtains an instance representing the FX rate for a currency pair, specifying the source.
 /// </summary>
 /// <param name="currencyPair">  a currency pair </param>
 /// <param name="observableSource">  the source of the observable market data used to create the rate </param>
 /// <returns> an ID for the FX rate for the currency pair </returns>
 public static FxRateId of(CurrencyPair currencyPair, ObservableSource observableSource)
 {
     return(new FxRateId(currencyPair, observableSource));
 }
Example #5
0
 /// <summary>
 /// Obtains an instance representing an FX matrix, specifying the source.
 /// </summary>
 /// <param name="observableSource">  the source of the observable market data used to create the rate </param>
 /// <returns> an identifier for the FX matrix </returns>
 public static FxMatrixId of(ObservableSource observableSource)
 {
     return(new FxMatrixId(observableSource));
 }
Example #6
0
 private FxMatrixId(ObservableSource observableSource)
 {
     JodaBeanUtils.notNull(observableSource, "observableSource");
     this.observableSource = observableSource;
 }
 /// <summary>
 /// Obtains an instance which takes FX rates from the market data,
 /// specifying the source of FX rates.
 /// <para>
 /// The source of FX rates is rarely needed, as most applications only need one set of FX rates.
 ///
 /// </para>
 /// </summary>
 /// <param name="marketData">  market data used for looking up FX rates </param>
 /// <param name="fxRatesSource">  the source of market data for FX rates </param>
 /// <returns> the provider </returns>
 public static MarketDataFxRateProvider of(MarketData marketData, ObservableSource fxRatesSource)
 {
     return(new MarketDataFxRateProvider(marketData, fxRatesSource, null));
 }
 /// <summary>
 /// Obtains an instance which takes FX rates from the market data,
 /// specifying the source of FX rates.
 /// <para>
 /// The source of FX rates is rarely needed, as most applications only need one set of FX rates.
 ///
 /// </para>
 /// </summary>
 /// <param name="marketData">  market data used for looking up FX rates </param>
 /// <param name="fxRatesSource">  the source of market data for FX rates </param>
 /// <param name="triangulationCurrency">  the triangulation currency to use </param>
 /// <returns> the provider </returns>
 public static MarketDataFxRateProvider of(MarketData marketData, ObservableSource fxRatesSource, Currency triangulationCurrency)
 {
     ArgChecker.notNull(triangulationCurrency, "triangulationCurrency");
     return(new MarketDataFxRateProvider(marketData, fxRatesSource, triangulationCurrency));
 }
 public virtual ObservableId withObservableSource(ObservableSource obsSource)
 {
     return(this);
 }