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; }
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); }
public void Resolve(CashModel model) { this.ResultOpt = null; }
protected IEnumerable <IValidationIssue> ValidateCash(CashModel cash, CalculationTicket ticket) { return(cash.Base.Validate(ticket)); }
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); }