Esempio n. 1
0
 public double Min(MonthlyTimeSeriesApiModel monthlyTimeSeries, DateTime from, DateTime to)
 {
     return(Filter(monthlyTimeSeries, from, to).Min(m => m.Low));;
 }
Esempio n. 2
0
 private List <MonthlyQuoteApiModel> Filter(MonthlyTimeSeriesApiModel monthlyTimeSeries, DateTime from, DateTime to)
 {
     return(monthlyTimeSeries.MonthlyTimeSeries
            .Where(m => DateTime.Parse(m.Key) >= from && DateTime.Parse(m.Key) <= to)
            .Select(m => m.Value).ToList());
 }
Esempio n. 3
0
 public double Avg(MonthlyTimeSeriesApiModel monthlyTimeSeries, DateTime from, DateTime to)
 {
     return(Filter(monthlyTimeSeries, from, to).Average(m => m.Close));
 }