예제 #1
0
        ('Simple Trader (Team Blue prediction)',
         Traders.SimpleTrader_with_team_blue_prediction()),
        ('Simple Trader (Team Green prediction)',
         Traders.SimpleTrader_with_team_green_prediction()),
        ('Simple Trader (Team Pink prediction)',
         Traders.SimpleTrader_with_team_pink_prediction()),
        ('Simple Trader (Team Red prediction)',
         Traders.SimpleTrader_with_team_red_prediction()),

        # Code-Camp Task 2 traders
        ('Team Blue DQL Trader (perfect prediction)',
         Traders.TeamBlueDqlTrader_with_perfect_prediction()),
        ('Team Green DQL Trader (perfect prediction)',
         Traders.TeamGreenDqlTrader_with_perfect_prediction()),
        ('Team Pink DQL Trader (perfect prediction)',
         Traders.TeamPinkDqlTrader_with_perfect_prediction()),
        ('Team Red DQL Trader (perfect prediction)',
         Traders.TeamRedDqlTrader_with_perfect_prediction())
    ]

    # Define portfolios for the traders and create a portfolio/trader mapping
    portfolio_trader_mappings = initialize_portfolios(
        10000.0, portfolio_name_trader_mappings)

    # Evaluate their performance over the testing period
    evaluator = PortfolioEvaluator([], True)
    evaluator.inspect_over_time_with_mapping(stock_market_data,
                                             portfolio_trader_mappings,
                                             date_offset=datetime.date(
                                                 2012, 1, 3))
예제 #2
0
        ('Simple Trader (NN binary perfect prediction)', Traders.SimpleTrader_with_nn_binary_perfect_prediction()),
        ('Simple Trader (NN binary prediction)', Traders.SimpleTrader_with_nn_binary_prediction()),

        # Code-Camp Task 0 traders
        ('Team Blue Simple Trader (perfect prediction)', Traders.TeamBlueSimpleTrader_with_perfect_prediction()),
        ('Team Green Simple Trader (perfect prediction)', Traders.TeamGreenSimpleTrader_with_perfect_prediction()),
        ('Team Black Simple Trader (perfect prediction)', Traders.TeamBlackSimpleTrader_with_perfect_prediction()),
        ('Team Red Simple Trader (perfect prediction)', Traders.TeamRedSimpleTrader_with_perfect_prediction()),
          
        # Code-Camp Task 1 traders
        ('Simple Trader (Team Blue prediction)', Traders.SimpleTrader_with_team_blue_prediction()),
        ('Simple Trader (Team Green prediction)', Traders.SimpleTrader_with_team_green_prediction()),
        ('Simple Trader (Team Black prediction)', Traders.SimpleTrader_with_team_black_prediction()),
        ('Simple Trader (Team Red prediction)', Traders.SimpleTrader_with_team_red_prediction()),
                
        # Code-Camp Task 2 traders    
        ('Team Blue DQL Trader (perfect prediction)', Traders.TeamBlueDqlTrader_with_perfect_prediction()),
        ('Team Green DQL Trader (perfect prediction)', Traders.TeamGreenDqlTrader_with_perfect_prediction()),
        ('Team Black DQL Trader (perfect prediction)', Traders.TeamBlackDqlTrader_with_perfect_prediction()),
        ('Team Red DQL Trader (perfect prediction)', Traders.TeamRedDqlTrader_with_perfect_prediction())                
                                    
    ]

    # Define portfolios for the traders and create a portfolio/trader mapping
    portfolio_trader_mappings = initialize_portfolios(10000.0, portfolio_name_trader_mappings)

    # Evaluate their performance over the testing period
    evaluator = PortfolioEvaluator([], True)
    evaluator.inspect_over_time_with_mapping(stock_market_data, portfolio_trader_mappings,
                                             date_offset=datetime.date(2012, 1, 3))