// ************************************************************ // CONSTRUCTORS // ************************************************************ #region // Constructor 1 : Full fledged public BloombergFetcher(DBID Dbid, string Ticker, Dictionary <string, string> FieldNames, DateTime StartDate, DateTime EndDate, Dictionary <String, Double> Scaling, List <string> OverrideFields, List <string> OverrideValues, E_PRICING_OPTION PricingOption = E_PRICING_OPTION.PRICING_OPTION_PRICE, E_PERIODICITY_SELECTION PeriodicitySelection = E_PERIODICITY_SELECTION.DAILY, E_PERIODICITY_ADJUSTMENT PeriodicityAdjustment = E_PERIODICITY_ADJUSTMENT.ACTUAL, E_NON_TRADING_DAY_FILL_OPTION NonTradingDayFillOption = E_NON_TRADING_DAY_FILL_OPTION.ACTIVE_DAYS_ONLY, E_NON_TRADING_DAY_FILL_METHOD NonTradingDayFillMethod = E_NON_TRADING_DAY_FILL_METHOD.PREVIOUS_VALUE, string OverrideCurrency = "") { // Set the DBID for the security _dbid = Dbid; // Set the security tickers _bloombergTicker = Ticker; // Set the fields to be queried _fieldNames = FieldNames; // Set the start date of time series _fromDate = StartDate; // Set the start date time series _toDate = EndDate; // Set the scaling to be applied _scaling = Scaling; // Set the override fields overrideFields = OverrideFields; // Set the override values overrideValues = OverrideValues; // Set the pricing option (price or yield) Option_PricingOption = PricingOption; // Set the periodicity (daily, weekly, monthly...) Option_PeriodicitySelection = PeriodicitySelection; // Set the periodicity adjustment (actual, calendar, fiscal) Option_PeriodicityAdjustement = PeriodicityAdjustment; // Set the NA fill option Option_NonTradingDayFillOption = NonTradingDayFillOption; // Set the NA fill method (previous data, etc.) Option_NonTradingDayFillMethod = NonTradingDayFillMethod; // Override the currency (do not use) Option_OverrideCurrency = OverrideCurrency; // Tell base which request type we're instaciating requestType = REQUEST_TYPE_HISTORICAL; }
// Constructor 3 : Ticker, Fields, Start and End dates, Periodicity public BloombergFetcher(DBID Dbid, string Ticker, Dictionary <string, string> FieldNames, DateTime StartDate, DateTime EndDate, Dictionary <String, Double> Scaling, E_PERIODICITY_SELECTION PeriodicitySelection) : this(Dbid : Dbid, Ticker : Ticker, FieldNames : FieldNames, StartDate : StartDate, EndDate : EndDate, Scaling : Scaling, OverrideFields : new List <string>(), OverrideValues : new List <string>(), PricingOption : E_PRICING_OPTION.PRICING_OPTION_PRICE, PeriodicitySelection : PeriodicitySelection, // --------- >> difference from Constructor 2 PeriodicityAdjustment : E_PERIODICITY_ADJUSTMENT.ACTUAL, NonTradingDayFillOption : E_NON_TRADING_DAY_FILL_OPTION.ALL_CALENDAR_DAYS, NonTradingDayFillMethod : E_NON_TRADING_DAY_FILL_METHOD.PREVIOUS_VALUE, OverrideCurrency : "") { }