So, I am copying some of the code from the "Fundamental Factor Models" and I am trying to pull all unique assets in the index by using the code
asset_list = results.index.levels[1].unique()
and it returns a list of the assets, but when I try to subset the pipeline output by some of the assets in that list, it returns an empty data frame. I tested this to see what was happening and I took the
len(result.index.levels[1].unique())
and compared it to the
len(results.index.levels[1])
and they both result in the same length.
Maybe this test doesn't actually tell me anything, but point is the formula is returning equity names that are not actually in my pipeline output. If I try to subset my output by certain assets in that asset_list it returns nothing. I attached the notebook so you can see what I mean. Can someone tell me why it is doing this?