public static TimeSeries AsTimeSeries(this ITimeSeries <double> timeseries)
 {
     return(new TimeSeries(timeseries.AsEnumerable(), timeseries.Name, timeseries.IntegrationOrder, timeseries.Frequency));
 }