private Report RunBackTesting(Func <TradingSystem> tradingSystemBuilder) { using (PerfMon.Profile("Performing back-testing")) { var stockListBuilder = new StockListBuilder(); stockListBuilder.Add(StockArgs.Catalog); var task = new BackTestingTask(tradingSystemBuilder, new DibaBroker()); var report = task.Evaluate(stockListBuilder.Stocks, DateTime.Today.GetMostRecentTradingDay()); return(report); } }
private Report RunStockRankingEvaluation(Func <TradingSystem> tradingSystemBuilder) { using (PerfMon.Profile("Performing evaluation")) { var stockListBuilder = new StockListBuilder(); stockListBuilder.Add(StockArgs.Catalog); var task = new StockRankingTask(tradingSystemBuilder); var report = task.Evaluate(stockListBuilder.Stocks, DateTime.Today.GetMostRecentTradingDay()); return(report); } }
protected override void Interpret() { var stockList = new StockListBuilder(); stockList.Add(StockArgs.Stocks); if (!stockList.Stocks.Any()) { Console.WriteLine("No stocks given"); return; } foreach (var stock in stockList.Stocks) { this.Scope().Stock = stock; Import(); } }
protected override void Interpret() { DatumDefines.StockPrice.Create(); var stockList = new StockListBuilder(); stockList.Add(StockArgs.Stocks); if (!stockList.Stocks.Any()) { Console.WriteLine("No stocks given"); return; } using (myTom = Engine.ServiceProvider.CreateEntityRepository()) { foreach (var stock in stockList.Stocks) { this.Scope().Stock = stock; Import(); } } }