'Initialize function shared between test algos.'

def default_initialize(self):

    def initialize(context):
        context.ordered = False
        context.set_commission(PerShare(0, 0))
        context.set_slippage(FixedSlippage(spread=0))
        context.num_positions = []
        context.cash = []
    return initialize
