Dear all,
cleaning up my code, I was trying to feed in a dictionary values to Symbols() such as
context.instrument = {'equity':'SPY', 'tresury':'TLT', 'hedge_tres':'TMV', 'cash':'SHY'}
context.stocks = symbols(context.instrument.values())
I have also tried the following fomat:
context.instrument = {'equity':'SPY', 'tresury':'TLT', 'hedge_tres':'TMV', 'cash':'SHY'}
t = context.instrument.values()
context.stocks = symbols('\''+'\',\' '.join(t)+'\'')
neither seem to be working. Any ideas ?
I want to be able to call context.instrument['equity'] in my code rather than context.stocks[0] - It improves readability for the kind of strategies I'm working on.