Beispiel #1
0
        protected PortfolioModel SerializePortfolio(Core.PortfolioModel model, CalculationTicket ticket)
        {
            var result = new PortfolioModel(
                this.serializer.SerializeBroadGlobalActivePorfolio(model.Portfolio),
                this.serializer.SerializeNullableExpression(model.PortfolioTargetTotal, ticket)
                );

            return(result);
        }
Beispiel #2
0
        protected Core.PortfolioModel DeserializePortfolio(PortfolioModel model, IEnumerable <Core.SecurityModel> securities)
        {
            var broadGlobalActiveProfolio      = this.deserializer.DeserializeBroadGlobalActivePorfolio(model.BroadGlobalActivePortfolio);
            var portfolioTargetTotalExpression = this.modelBuilder.CreatePortfolioTargetTotalExpression(broadGlobalActiveProfolio, securities);
            var result = new Core.PortfolioModel(
                broadGlobalActiveProfolio,
                portfolioTargetTotalExpression
                );

            return(result);
        }