Esempio n. 1
0
        protected void RecalculateBasketCountry(
            BasketCountryModel model,
            TargetingType targetingType,
            BroadGlobalActivePortfolio portfolio,
            ICollection <BgaPortfolioSecurityTargetInfo> result,
            IDataManager manager,
            CalculationTicket ticket
            )
        {
            var baseValue = model.Base.Value(ticket);

            if (!baseValue.HasValue)
            {
                throw new ValidationException(new ErrorIssue("There is no base value defined for the \"" + model.Basket.Country.Name + "\" country (ISO: " + model.Basket.Country.IsoCode + ")."));
            }

            var portfolioScaledValue = model.PortfolioScaled.Value(ticket);

            if (!portfolioScaledValue.HasValue)
            {
                throw new ValidationException(new ErrorIssue("There is no portfolio scaled value defined for the \"" + model.Basket.Country.Name + "\" country (ISO: " + model.Basket.Country.IsoCode + ")."));
            }

            this.RecalculateSecurityTargets(
                portfolioScaledValue.Value,
                model.Basket,
                targetingType,
                portfolio,
                result,
                manager,
                ticket
                );
        }
Esempio n. 2
0
        public Decimal Populate(BasketCountryModel basketCountry, BenchmarkValueResolver valueResolver)
        {
            var value = valueResolver.GetBenchmark(basketCountry.Country.IsoCode.Value);

            basketCountry.Benchmark = value;
            return(value);
        }
 public void Resolve(BasketCountryModel model)
 {
     this.Result = CalculateRescaledBase(
         model.Base.EditedValue,
         model.PortfolioAdjustment.EditedValue,
         this.baseWherePortfoioAdjustmentSetTotal,
         this.porfolioAdjustmentTotal,
         tracer
         );
 }
Esempio n. 4
0
 public void Resolve(BasketCountryModel model)
 {
     this.hopper.RecalculateBasketCountry(
         model,
         this.targetingType,
         this.portfolio,
         this.result,
         this.manager,
         this.ticket
         );
 }
Esempio n. 5
0
 public void Resolve(BasketCountryModel model)
 {
     model.Base.RegisterForBeingWatched(this.watcher, null);
     model.PortfolioAdjustment.RegisterForBeingWatched(this.watcher, null);
 }
Esempio n. 6
0
 public void Resolve(BasketCountryModel model)
 {
     this.Result = this.populator.Populate(model, this.valueResolver);
 }
Esempio n. 7
0
 public void Resolve(BasketCountryModel model)
 {
     model.Base.InitialValue = this.valueResolver.GetBaseValue(model.Basket.Id);
 }
        public IChange TryTransformToChange(BasketCountryModel model)
        {
            var result = this.TransformToChange(model.Basket.Id, model.Base);

            return(result);
        }
 public void Resolve(BasketCountryModel model)
 {
     this.ResultOpt = this.transformer.TryTransformToChange(model);
 }
Esempio n. 10
0
 public void Resolve(BasketCountryModel model)
 {
     // do nothing
 }
 protected IChange TryTransformToChange(BasketCountryModel model)
 {
     return(this.TryTransformToChange(model.Basket.Id, model.PortfolioAdjustment));
 }
Esempio n. 12
0
 public void Resolve(BasketCountryModel model)
 {
     this.traverser.TraverseBasketCountry(model, this.result);
 }
Esempio n. 13
0
 protected void TraverseBasketCountry(BasketCountryModel model, ICollection <IGlobeResident> result)
 {
     result.Add(model);
 }
 public void Resolve(BasketCountryModel model)
 {
     this.Result = this.parent.BasketCountryTemplate;
 }
Esempio n. 15
0
 public void Resolve(BasketCountryModel model)
 {
     this.Result = model.PortfolioAdjustment.EditedValue.HasValue ? model.Base.EditedValue : null;
 }