Пример #1
0
 /// <summary>
 /// For backwards adjusted data the price is adjusted by a scale factor which is a combination of splits and dividends.
 /// This backwards adjusted price is used by default and fed as the current price.
 /// </summary>
 /// <param name="date">Current date of the backtest.</param>
 private void UpdateScaleFactors(DateTime date)
 {
     try
     {
         _mappedSymbol = SubscriptionAdjustment.GetMappedSymbol(_symbolMap, date);
         _priceFactor  = SubscriptionAdjustment.GetTimePriceFactor(_priceFactors, date);
     }
     catch (Exception err)
     {
         Log.Error("SubscriptionDataReader.UpdateScaleFactors(): " + err.Message);
     }
     _config.SetPriceScaleFactor(_priceFactor);
     _config.SetMappedSymbol(_mappedSymbol);
 }