コード例 #1
0
ファイル: SimpleBackTesting.cs プロジェクト: riyanhax/Maui
        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);
            }
        }
コード例 #2
0
        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);
            }
        }
コード例 #3
0
ファイル: Ticker.cs プロジェクト: riyanhax/Maui
        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();
            }
        }
コード例 #4
0
ファイル: ImportPrices.cs プロジェクト: riyanhax/Maui
        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();
                }
            }
        }