So, I am new to quant analysis and I have been busy going through algo's that users have posted. One such algo sets up the securities that will be traded in a static fashion. "context.sids = { sid(19662): 0.1, sid(0000): 0.2 }" etc. The algorithm then uses this dict to trade. I have been trying to change this to a dynamic stock selection. However, when I set up my pipeline and want to use the data within, this statement returns a list
"context.longs = pipeline_output('my_pipeline') "
"context.sids = context.longs[context.longs['longs']]"
I now have to convert the rest of the algorith to deal with a list and because I don't have a deep enough understanding of Python, I'm failing, miserably. My question is, how can I turn this list into a dict?