BiasCorrectQ.Program.AdjDailyToMonthly C# (CSharp) Method

AdjDailyToMonthly() private static method

private static AdjDailyToMonthly ( List future, List biasedMonthly ) : List
future List
biasedMonthly List
return List
        private static List<Point> AdjDailyToMonthly(List<Point> future,
            List<Point> biasedMonthly)
        {
            var futureMonthly = DataToMonthly(future);

            Dictionary<DateTime, double> monthlyFactors =
            GetMonthlyFactors(biasedMonthly, futureMonthly);

            var rval = new List<Point> { };
            foreach (var pt in future)
            {
            DateTime key = new DateTime(pt.Date.Year, pt.Date.Month, 1);
            rval.Add(new Point(pt.Date, pt.Value * monthlyFactors[key]));
            }

            return rval;
        }