Hi guys, I am extremely new to Quantopian and am currently facing some issues with my code:
fundamentals = init_fundamentals()
free_cash_flow_yield = (fundamentals.cash_flow_statement.free_cash_flow)/(fundamentals.valuation.enterprise_value)
COC_Proxy = (fundamentals.income_statement.interest_expense)/(fundamentals.balance_sheet.long_term_debt)
please_work = get_fundamentals(query(fundamentals.valuation_ratios.ps_ratio)
.filter(fundamentals.valuation_ratios.ps_ratio 0.026*3)
.filter(fundamentals.operation_ratios.roic > COC_Proxy)
.filter(fundamentals.company_reference.primary_exchange_id.in_(['NYSE','NAS'])
.limit(100),
'2017-04-02')
please_work.head()
This error message shows whenever I run it
FundamentalsQueryErrorTraceback (most recent call last)
in ()
13
14 .limit(100),
---> 15 '2017-04-02')
16 please_work.head()
/build/src/qexec_repo/qexec/research/api.py in get_fundamentals(query, base_date, range_specifier, filter_ordered_nulls)
94 base_date,
95 range_specifier,
---> 96 filter_ordered_nulls,
97 )
98
/build/src/qexec_repo/qexec/research/api.py in get_fundamentals_with_namespace(ns, available_date_tbl, query, base_date, range_specifier, filter_ordered_nulls)
116 filter_ordered_nulls,
117 )
--> 118 return client.get_fundamentals(query_dict)
119
120
/build/src/qexec_repo/qexec/research/web/client.pyc in get_fundamentals(self, query_dict)
147 query_dict['columns'],
148 query_dict['dates'],
--> 149 query_dict['return_panel'],
150 )
151
/build/src/qexec_repo/qexec/research/web/helpers.pyc in method(*args, **kwargs)
132 # If we make it to here, that means we have a 200. It still might
133 # signify an error in our application logic though.
--> 134 return parsejson_response(response)
135 return _method
136
/build/src/qexec_repo/qexec/research/web/helpers.pyc in parse_json_response(response)
96 data = response.json()
97 if 'error' in data:
---> 98 raise dict_to_exception(data)
99 return data
100
FundamentalsQueryError: (psycopg2.DataError) division by zero
Could you guys tell me what went wrong?