Пример #1
0
    def setUp(self):
        TestReadyUp.setUp(self)
        self.ready_all(key=3)

        position = Position.objects.first()
        self.pos_set = PositionSet(position)

        self.leg_one_context = leg_one.LegOneContext(self.pos_set)
Пример #2
0
    def setUp(self):
        TestReadyUp.setUp(self)
        self.ready_all(key=3)

        position = Position.objects.first()
        self.pos_set = PositionSet(position)

        self.leg_one_context = leg_one.LegOneContext(self.pos_set)
Пример #3
0
    def setUp(self):
        TestReadyUp.setUp(self)
        self.ready_all(key=1)

        position = Position.objects.first()
        self.pos_set = PositionSet(position)

        print 'Symbol: %s\n' % self.pos_set.stock.position.symbol

        self.stock_short = stock.StockShort(self.pos_set)
Пример #4
0
    def setUp(self):
        TestReadyUp.setUp(self)
        self.ready_all(key=1)

        position = Position.objects.first()
        self.pos_set = PositionSet(position)

        print 'Symbol: %s\n' % self.pos_set.stock.position.symbol

        self.stock_short = stock.StockShort(self.pos_set)
Пример #5
0
    def setUp(self):
        TestReadyUp.setUp(self)

        self.ready_all(key=1)
        position = Position.objects.first()
        pos_set = PositionSet(position)

        self.stock_context = stock.StockContext(pos_set)

        self.set_prices = [12.5, 20.7, 33.94, 8.71, 114.81]
        self.set_conditions = ['>', '<', '==', '<=', '>=']
        self.test_prices = [13.9, 22.67, 33.94, 7.66, 100.88]
Пример #6
0
    def setUp(self):
        TestReadyUp.setUp(self)
        self.ready_all(key=2)

        position = Position.objects.first()
        self.pos_set = PositionSet(position)

        self.hedge_context = hedge.HedgeContext(self.pos_set)

        self.set_prices = [12.5, 20.7, 33.94, 8.71, 114.81]
        self.set_conditions = ['>', '<', '==', '<=', '>=']
        self.test_prices = [13.9, 22.67, 33.94, 7.66, 100.88]
Пример #7
0
    def setUp(self):
        TestReadyUp.setUp(self)
        self.ready_all(key=3)

        position = Position.objects.get(symbol='AAPL')
        self.pos_set = PositionSet(position)

        self.call_long = leg_one.CallLong(self.pos_set)

        self.option_price = float(self.call_long.pos_set.option.trade_price)
        self.option_strike = float(self.call_long.pos_set.option.strike_price)
        self.option_quantity = float(self.call_long.pos_set.option.quantity)
        self.option_right = int(self.call_long.pos_set.option.right)
Пример #8
0
    def setUp(self):
        TestReadyUp.setUp(self)
        self.ready_all(key=3)

        position = Position.objects.get(symbol='FSLR')
        self.pos_set = PositionSet(position)

        self.put_naked = leg_one.PutNaked(self.pos_set)

        self.option_price = float(self.put_naked.pos_set.option.trade_price)
        self.option_strike = float(self.put_naked.pos_set.option.strike_price)
        self.option_quantity = float(self.put_naked.pos_set.option.quantity)
        self.option_right = int(self.put_naked.pos_set.option.right)
Пример #9
0
    def setUp(self):
        TestReadyUp.setUp(self)
        self.ready_all(key=3)

        position = Position.objects.get(symbol='AAPL')
        self.pos_set = PositionSet(position)

        self.call_long = leg_one.CallLong(self.pos_set)

        self.option_price = float(self.call_long.pos_set.option.trade_price)
        self.option_strike = float(self.call_long.pos_set.option.strike_price)
        self.option_quantity = float(self.call_long.pos_set.option.quantity)
        self.option_right = int(self.call_long.pos_set.option.right)
Пример #10
0
    def setUp(self):
        TestReadyUp.setUp(self)
        self.ready_all(key=3)

        position = Position.objects.get(symbol='FSLR')
        self.pos_set = PositionSet(position)

        self.put_naked = leg_one.PutNaked(self.pos_set)

        self.option_price = float(self.put_naked.pos_set.option.trade_price)
        self.option_strike = float(self.put_naked.pos_set.option.strike_price)
        self.option_quantity = float(self.put_naked.pos_set.option.quantity)
        self.option_right = int(self.put_naked.pos_set.option.right)
Пример #11
0
    def setUp(self):
        TestReadyUp.setUp(self)

        self.ready_all(key=2)
        position = Position.objects.get(symbol='BAC')
        self.pos_set = PositionSet(position)

        self.protective_call = hedge.ProtectiveCall(self.pos_set)

        self.stock_price = float(self.protective_call.pos_set.stock.trade_price)
        self.stock_quantity = float(self.protective_call.pos_set.stock.quantity)
        self.option_price = float(self.protective_call.pos_set.option.trade_price)
        self.option_strike = float(self.protective_call.pos_set.option.strike_price)
Пример #12
0
    def setUp(self):
        TestReadyUp.setUp(self)
        self.ready_all(key=2)

        position = Position.objects.get(symbol='C')
        self.pos_set = PositionSet(position)

        self.covered_put = hedge.CoveredPut(self.pos_set)

        self.stock_price = float(self.covered_put.pos_set.stock.trade_price)
        self.stock_quantity = float(self.covered_put.pos_set.stock.quantity)
        self.option_price = float(self.covered_put.pos_set.option.trade_price)
        self.option_strike = float(self.covered_put.pos_set.option.strike_price)
Пример #13
0
    def setUp(self):
        TestReadyUp.setUp(self)
        self.ready_all(key=2)

        position = Position.objects.get(symbol='C')
        self.pos_set = PositionSet(position)

        self.covered_put = hedge.CoveredPut(self.pos_set)

        self.stock_price = float(self.covered_put.pos_set.stock.trade_price)
        self.stock_quantity = float(self.covered_put.pos_set.stock.quantity)
        self.option_price = float(self.covered_put.pos_set.option.trade_price)
        self.option_strike = float(
            self.covered_put.pos_set.option.strike_price)
Пример #14
0
    def setUp(self):
        TestReadyUp.setUp(self)

        self.ready_all(key=2)
        position = Position.objects.get(symbol='BAC')
        self.pos_set = PositionSet(position)

        self.protective_call = hedge.ProtectiveCall(self.pos_set)

        self.stock_price = float(
            self.protective_call.pos_set.stock.trade_price)
        self.stock_quantity = float(
            self.protective_call.pos_set.stock.quantity)
        self.option_price = float(
            self.protective_call.pos_set.option.trade_price)
        self.option_strike = float(
            self.protective_call.pos_set.option.strike_price)
Пример #15
0
    def setUp(self):
        TestReadyUp.setUp(self)

        self.option = PositionOption()
Пример #16
0
    def setUp(self):
        TestReadyUp.setUp(self)

        self.option = PositionOption()