public virtual IList <TimePointStats> start(UserOutput output) { Thread.CurrentThread.Name = "Main engine execution thread"; double result = 1; initPopulation(); TimePoint timePoint = new TimePoint(engineSettings.startTimePoint); IList <TimePointStats> timePointStats = new List <TimePointStats>(); while (engineSettings.endTimePoint.CompareTo(timePoint) >= 0) { TimePointStats stat = executeTimePoint(timePoint, output); if (stat != null) { timePointStats.Add(stat); result *= (stat.PercentEarned / 100 + 1); profitRecorder.recordProfit(stat.PercentEarned); output.reportProfitForTimePoint(timePoint, (result - 1) * 100, stat.PercentEarned); } timePoint = timePoint.next(); } if (engineSettings.performTraining) { savePopulation(output); } showSummary(output); return(timePointStats); }