Hi everyone,
Is it possible to unstack the zipline.assets object and turn it into a list of stickers like the following:
0 Equity(24 [AAPL])
1 Equity(62 [ABT])
2 Equity(67 [ADSK])
3 Equity(76 [TAP])
4 Equity(114 [ADBE])
5 Equity(128 [ADM])
into
['4I1', 'A4S', 'AA', 'AAL', 'AAPL', 'ABBV', 'ABT', 'ADBE', 'ADM',
'ADP', 'ADSK', 'AEE', 'AEP', 'AES', 'AET', 'AFL', 'AG8', 'AGN',
'AIG', 'AIS', 'AKAM', 'ALS', 'ALTR', 'AMAT', 'AMD', 'AMGN', 'ANF',
'ANTM', 'AON', 'APA', 'APC', 'APD']
I need to do that because I am trying to do a long/short strategy using custom data that I can't upload to Quantopian, but that has some untradeable stocks. So I need to take all unique stocks from that data in my Python environment, input it to my Quantopian pipeline that filters the data, take the tradeable output, and put it back to python. Calculate the deciles based on my specific values, get this list of five longs and five shorts, send it back to Quantopian and run the algorithm.
Would be much easier to upload that data to Quantopian instead of this crutch method, but it's impossible since my data does not have returns. Only tickers and carbon emissions (my factor variable).
Thanks!