Example #1
0
    def setUp(self):
        TestUnitSetUpStage.setUp(self)

        self.sell_order = create_filled_order(trade_summary=self.trade_summary,
                                              underlying=self.underlying,
                                              spread='BACKRATIO',
                                              contract='CALL',
                                              side='SELL',
                                              quantity=-1,
                                              strike=43,
                                              price=1.42,
                                              net_price=-0.58)

        self.buy_order = create_filled_order(trade_summary=self.trade_summary,
                                             underlying=self.underlying,
                                             spread='BACKRATIO',
                                             contract='CALL',
                                             side='BUY',
                                             quantity=2,
                                             strike=46,
                                             price=.42,
                                             net_price=0.0)

        self.contract_right = 100

        filled_orders = FilledOrder.objects.filter(underlying=self.underlying)

        self.long_call_backratio = StageLongCallBackratio(
            filled_orders=filled_orders, contract_right=self.contract_right)