Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
[seeking help] syntax error

Hey guys, I'm relatively new here. I was following the Quantopian tutorial and making a few changes myself. I kept on running into a syntax error when I try to assign context.fundamental_df=fundamental_df and update_universe(context.fundamental_df.columns.values). Any ideas what's happening here? I have posted my code below.

def before_trading_start(context, data):  
    fundamental_df=get_fundamentals(  
            query((fundamentals.valuation_ratios.pe_ratio,  
                   fundamentals.valuation.market_cap,  
                   fundamentals.valuation.enterprise_value,  
                   fundamentals.income_statement.ebitda,  
                   fundamentals.valuation_ratios.ev_to_ebitda,  
                   fundamentals.valuation_ratios.fcf_yield,  
                   fundamentals.operation_ratios.ebitda_margin,  
                   fundamentals.operation_ratios.interest_coverage)  
                  .filter(fundamentals.asset_classification.morningstar_industry_group_code==10216)  
                  .filter(fundamentals.operation_ratios.interest_coverage>0)  
                  .filter(fundamentals.valuation_ratios.fcf_yield>0)  
                  .filter(fundamentals.pe_ratio<50)  
                  .order_by(fundamentals.valuation.market_cap)  
                  .limit(10),today)  
        context.fundamental_df=fundamental_df  
        update_universe(context.fundamental_df.columns.values)  
        pass  
1 response

You are probably missing a ) somewhere, could be after the limit(10) or somewhere in there. And I don't think you can provide a date to get_fundamentals when in backtest anyway...