1# Put any initialization logic here. The context object will be passed to
2# the other methods in your algorithm.
3def initialize(context):
4 pass
5
6# Will be called on every trade event for the securities you specify.
7def handle_data(context, data):
8 # Implement your algorithm logic here.
9
10 # data[sid(X)] holds the trade event data for that security.
11 # context.portfolio holds the current portfolio state.
12
13 # Place orders with the order(SID, amount) method.
14
15 # TODO: implement your own logic here.
16 order(sid(24), 50)