Buy sid * parameters['buy_amount'] * parameters['scale'][sid]
        Sell sid * parameters['sell_amount'] * parameters['scale'][sid]

def optimize(self, to_buy, to_sell):
        '''
        Buy sid * parameters['buy_amount'] * parameters['scale'][sid]
        Sell sid * parameters['sell_amount'] * parameters['scale'][sid]
        '''
        allocations = {}

        # Process every stock the same way
        for s in to_buy:
            quantity = self.properties.get('buy_amount', 100)
            if s in self.properties.get('scale', {}):
                quantity *= self.properties['scale'][s]
            # Allocate defined amount to buy
            allocations[s] = int(quantity)

        # NOTE You must provide sell_amount if you want to short
        for s in to_sell:
            quantity = self.properties.get(
                'sell_amount', self.portfolio.positions[s].amount)
            if s in self.properties.get('scale', {}):
                quantity *= self.properties['scale'][s]
            # Allocate defined amount to buy
            allocations[s] = -int(quantity)

        # Defaults values
        e_ret = 0
        e_risk = 1
        return allocations, e_ret, e_risk