Exemple #1
0
 private ClaimTriangle ConvertIt(string productName, IEnumerable<TriangleFeedFullDataExtract> triangleRecords)
 {
     var triangle = new ClaimTriangle(productName, _collector);
     foreach (var paymentRecord in triangleRecords)
     {
         triangle[paymentRecord.OriginYear][paymentRecord.DevelopmentYear] = paymentRecord.Value;
     }
     return triangle;
 }
Exemple #2
0
        public ClaimTriangle Accumulate()
        {
            var triangle = new ClaimTriangle(ProductName, ErrorManager);

            for (int originYear = _oldestPolicyBlockOrigin; originYear <= _mostRecentPolicyBlockOrigin; originYear++)
            {
                var blockPayments = this[originYear];

                double previousValue = 0;
                for (int developmentYear = originYear; developmentYear <= blockPayments.MaxDevelopmentYear; developmentYear++)
                {
                    triangle[originYear][developmentYear] = blockPayments[developmentYear] + previousValue;
                    previousValue = triangle[originYear][developmentYear];
                }
            }
            return triangle;
        }