Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Lecture 32 Fundamental Factors

In the Lecture notes the Returns are deduced for various groups of stocks, grouped by market cap, PE etc.

However, in the notes it uses the code

"R_biggest = results[results.biggest]['Returns'].groupby(level = 0).mean()" to calculate the returns for the highest market cap stocks

My code keeps returning an error stating that essentially the dataframe results has no attribute "biggest", or in the case of my code "high_market_cap". I was wondering whether anybody could help with this error. Is it solely because I've changed the definition from biggest = high_market_cap stocks to high_market_cap = high_market_cap stocks?

Any help would be much appreciated.
Many thanks.