コード例 #1
0
    def test_read_one_episode(self):
        trade = Trade()

        trade.new_episode()

        num_of_records = 0

        for i in range(1000):
            if trade.new_sec():
                self.assertIsNotNone(trade.boards)
                self.assertIsNotNone(trade.buy_trade_price)
                self.assertIsNotNone(trade.sell_trade_price)
                self.assertIsNotNone(trade.buy_book_price)
                self.assertIsNotNone(trade.sell_book_vol)
                self.assertIsNotNone(trade.sell_book_price)
                self.assertIsNotNone(trade.buy_book_vol)
                self.assertIsNotNone(trade.market_sell_price)
                self.assertIsNotNone(trade.buy_trade_vol)
                self.assertIsNotNone(trade.fix_buy_price)
                self.assertIsNotNone(trade.market_buy_price)
                self.assertIsNotNone(trade.time)
                num_of_records += 1
                print(trade.time)
            else:
                break

        print(num_of_records)
コード例 #2
0
    def test_read_one_episode(self):
        trade = Trade()

        trade.new_episode()

        num_of_records = 0

        while trade.new_sec():
            self.assertIsNotNone(trade.board)
            self.assertIsNotNone(trade.buy_trade_price)
            self.assertIsNotNone(trade.sell_trade_price)
            self.assertIsNotNone(trade.buy_book_price)
            self.assertIsNotNone(trade.sell_book_vol)
            self.assertIsNotNone(trade.sell_book_price)
            self.assertIsNotNone(trade.buy_book_vol)
            self.assertIsNotNone(trade.market_sell_price)
            self.assertIsNotNone(trade.buy_trade_vol)
            self.assertIsNotNone(trade.fix_buy_price)
            self.assertIsNotNone(trade.market_buy_price)
            self.assertIsNotNone(trade.time)

            print(trade.time)

            num_of_records += 1

        print(num_of_records)
コード例 #3
0
    def test_new_episode(self):
        trade = Trade()

        trade.new_episode()

        result = trade.new_sec()

        print(result)

        print(trade.time)
コード例 #4
0
    def test_new_sec(self):
        trade = Trade()

        trade.new_episode()

        trade.new_sec()
        print(trade.time)

        trade.new_sec()
        print(trade.time)

        trade.new_sec()
        print(trade.time)

        trade.new_sec()
        print(trade.time)