Hi, have a quick question about how I can use my uploaded data within this function:
def initialize(context):
context.asset_pairs = [[symbol('XXX'), symbol('YYY'),
{'short_1': False, 'long_1': False, 'short_2': False, 'long_2': False,
'hedge_history': np.array([])}],
[symbol('ZZZ'), symbol('VVV'),
{'short_1': False, 'long_1': False, 'short_2': False, 'long_2': False,
'hedge_history': np.array([])}]]
schedule_function(rebalance, date_rules.every_day(),
time_rules.market_close(hours=2))
set_slippage(slippage.VolumeShareSlippage(volume_limit=0.025, price_impact=0.0))
set_commission(commission.PerShare(cost=0.0, min_trade_cost=0.0))
The algorithm runs fine when I put in tickers available on Quantopian. With the self-serve data how to I prepare it for use in this function?
The four data files (commodity data) have been uploaded in csv and look like this:
Symbol,Date,Close
xxx,26/06/2018,5.0732
Many thanks!