I am developing a Calculations library in c# using Math.Net library. I have several methods in the library that would be receiving IEnumerable double list of values. I need to calculate the annual and monthly values and return those to the caller method. Could somebody tell me if this is the right way of doing it. I chose to use dictionary object
public Dictionary<string, double> ArithmeticMean(IEnumerable<double> ReturnsList)
{
Dictionary<string, double> arithmethicMean = new Dictionary<string, double>();
var returnList = ReturnsList.Mean();
arithmethicMean.Add("Monthly", returnList);
arithmethicMean.Add("Annual", returnList * Math.Pow(12, 0.5));
return arithmethicMean;
}