Exemplo n.º 1
0
Arquivo: Ticker.cs Projeto: bg0jr/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();
            }
        }
Exemplo n.º 2
0
        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();
                }
            }
        }
Exemplo n.º 3
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;
            }
        }
Exemplo n.º 4
0
        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;
            }
        }