Ejemplo n.º 1
0
 public RootModel(
     TargetingType targetingType,
     BroadGlobalActivePortfolio portfolio,
     TargetingTypeBasketBaseValueChangesetInfo latestTtbbvChangesetInfo,
     TargetingTypeBasketPortfolioTargetChangesetInfo latestTtbptChangesetInfo,
     BgaPortfolioSecurityFactorChangesetInfo latestPstoChangesetInfo,
     BuPortfolioSecurityTargetChangesetInfo latestPstChangesetInfo,
     GlobeModel globe,
     CashModel cash,
     Overlaying.RootModel factors,
     IExpression <Decimal?> portfolioScaledGrandTotalExpression,
     IExpression <Decimal?> trueExposureGrandTotal,
     IExpression <Decimal?> trueActiveGrandTotal,
     DateTime benchmarkDate,
     Boolean isUserPermittedToSave
     )
 {
     this.TargetingType        = targetingType;
     this.Portfolio            = portfolio;
     this.LatestTtbbvChangeset = latestTtbbvChangesetInfo;
     this.LatestTtbptChangeset = latestTtbptChangesetInfo;
     this.LatestPstoChangeset  = latestPstoChangesetInfo;
     this.LatestPstChangeset   = latestPstChangesetInfo;
     this.Globe   = globe;
     this.Cash    = cash;
     this.Factors = factors;
     this.PortfolioScaledGrandTotal = portfolioScaledGrandTotalExpression;
     this.TrueExposureGrandTotal    = trueExposureGrandTotal;
     this.TrueActiveGrandTotal      = trueActiveGrandTotal;
     this.BenchmarkDate             = benchmarkDate;
     this.IsUserPermittedToSave     = isUserPermittedToSave;
 }
Ejemplo n.º 2
0
        public CashModel CreateCash(Computations computations)
        {
            var result = new CashModel(
                computations.CashBase,
                computations.CashPortfolioScaled,

/*
 * Add a Cash amount to the True Exposure column.
 * a.       Formula:  True Exposure Cash = Portfolio Scaled Cash
 * b.      Include Cash Amount in the Total row of the True Exposure column.
 */
                computations.CashPortfolioScaled,

/*
 * Add a Cash amount to the True Active column.
 * a.       Formula:  True Active Cash = Portfolio Scaled Cash – Benchmark Cash (Benchmark Cash should = 0).
 * b.      Include Cash Amount in the Total row of the True Exposure column.
 */
                computations.CashPortfolioScaled
                );

            return(result);
        }
Ejemplo n.º 3
0
 public void Resolve(CashModel model)
 {
     this.ResultOpt = null;
 }
Ejemplo n.º 4
0
 protected IEnumerable <IValidationIssue> ValidateCash(CashModel cash, CalculationTicket ticket)
 {
     return(cash.Base.Validate(ticket));
 }
Ejemplo n.º 5
0
 protected void SerializeCash(IJsonWriter writer, CashModel cash, CalculationTicket ticket)
 {
     this.expressionWriter.SerializeOnceResolved(cash.Base, JsonNames.Base, writer, ticket);
     this.expressionWriter.SerializeOnceResolved(cash.PortfolioScaled, JsonNames.CashScaled, writer, ticket);
 }