Hi All,

I am attempting to build, using the Algorithm Framework, a part of ResolveAssetManagements ensemble approach to Gary Antonacci's Global Equities Momentum (GEM). Their version, instead of picking the best performing lookback period, picks an ensemble of lookback periods, and trades them all (amongst other things). 

I have been able to build this startegy in a Jupter Notebook using ticker strings to build the DataFrame Columns and lookback periods (ints) as index values & Int again as DF values themselves. When I transfer this to Lean I run into the problem that Symbol Objects are not callable(?) and Indicator values, not being Int's, means  I cannot do comparative analysis (><) between them.

I am trying to get my head around how to best implement Symbol objects and Indicator Objects in a Dataframe.
BUT is a DF even the best way to do this analysis??

#1: df[symbol] doesnt work. I think it's because a QuantConnect Symbol object is not callable? I've tried str(symbol) ive tried accessing first elements of symbols with symbol[0] but nothing seems to work. I am trying to avoid hard coding ticker strings "SPY" "VEU" etc... which does work.

#2: Even if I hard code ticker_strings and gain access to the values... I still can't do a comparison between them. I think this is because I havent used .Current.Value, however, when I build the DF using that I lose my indicator lookback indexing!

ISSUE: Rookie programmer trying to convert a dict of dicts into a dataframe, without losing a direct link between values and index, in orde to do comparative analysis. I can build the DataFrame but then run into trouble accessing it using Symbols as the columns, Indicator lookbacks as the Index.
Also, when attempting to do comparative analysis between assets on MomentumPercent Indicators I get another error as I did not build the DataFrame using .Current.Value
 

Why didn't I? Because when I do that I lose my lookback indexing in the dataframe. I did try creating a list of lookbacks[] and appending the lookback periods to use as an index but then I couldnt be sure the values would always match up with the appropriate index?

 

Anyway, have a look at the code - Any assistance you can offer would be very much appreciated.

Author