BiasCorrectQ.Program.GetMonthlyFactors C# (CSharp) Method

GetMonthlyFactors() private static method

Dictionary of key=DateTime, value=monthly_factor where DateTime is first of month
private static GetMonthlyFactors ( List biasedMonthly, List futureMonthly ) : double>.Dictionary
biasedMonthly List
futureMonthly List
return double>.Dictionary
        private static Dictionary<DateTime, double> GetMonthlyFactors(
            List<Point> biasedMonthly, List<Point> futureMonthly)
        {
            var rval = new Dictionary<DateTime, double> { };
            for (int i = 0; i < biasedMonthly.Count; i++)
            {
            var bcPt = biasedMonthly[i];
            var futPt = futureMonthly[i];

            DateTime key = new DateTime(bcPt.Date.Year, bcPt.Date.Month, 1);

            if (futPt.Value <= 0)
            {
                rval.Add(key, 0);
            }
            else
            {
                rval.Add(key, bcPt.Value / futPt.Value);
            }
            }
            return rval;
        }