Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
LOOK-AHEAD BIAS : Point-in-Time Fundamental Data in Research

Is there a way to access the 'file date' used to avoid look-ahead bias for fundamental data via the research app? I'm referrring to from the documentation:

"Point in Time When running a backtest, Quantopian doesn't use the as_of date for exposing the data to your algorithm. Rather, a new value is exposed at the "point in time" in the past when the metric would be known to you. This day is called the file date"

On a related note the Morningstar data appears to have significant look-ahead issues. For instance the 'morningstar_sector_code' in 2002-onward has an 'as_of' date in 2014. Am I misunderstanding this data?

print(dp.loc['morningstar_sector_code_as_of'].to_string())

security Equity(553 [ASEI])
algo_date
2002-09-09 00:00:00+00:00 2014-05-01
2003-09-08 00:00:00+00:00 2014-05-01
2004-09-07 00:00:00+00:00 2014-05-01
2005-09-07 00:00:00+00:00 2014-05-01
2006-09-07 00:00:00+00:00 2014-05-01
2007-09-07 00:00:00+00:00 2014-05-01
2008-09-08 00:00:00+00:00 2014-05-01
2009-09-08 00:00:00+00:00 2014-05-01
2010-09-07 00:00:00+00:00 2014-05-01
2011-09-07 00:00:00+00:00 2014-05-01
2012-09-07 00:00:00+00:00 2014-05-01
2013-09-09 00:00:00+00:00 2014-05-01
2014-09-08 00:00:00+00:00 2014-08-29
2015-09-04 00:00:00+00:00 2015-05-14

3 responses

Hi Jason,
For that particular field (sector code) we've not yet implemented point-in-time values with the data from Morningstar. So in this case, don't blame Morningstar -- this is something on our backlog to implement. I believe this is the only field exposed from Morningstar that isn't point in time.

Generally, the backtester enforces a lack of look-ahead bias in the fundamental data.

In the research environment, the date column that indexes the resultant panel from a get_fundamentals() call indicates "as of" date for each set of data. So you're left to enforce the lack of look-ahead bias yourself with the information returned.

Disclaimer

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances.

If you haven't implement point-in-time values for this particular field, than what is the meaning of the query date? Sector values do vary over time for a given security so presumably these are the sector assignments as of that date.

Also, I think the problem applies to many other data items as well. For instance:

print(dp.loc['primary_exchange_id_as_of'].to_string())
security Equity(39 [DDC])
algo_date
2013-09-09 00:00:00+00:00 2014-05-01
2014-09-08 00:00:00+00:00 2014-09-03
2015-09-04 00:00:00+00:00 2015-09-02

print(dp.loc['company_status_as_of'].to_string())
security Equity(39 [DDC])
algo_date
2013-09-09 00:00:00+00:00 2014-05-01
2014-09-08 00:00:00+00:00 2014-09-03
2015-09-04 00:00:00+00:00 2015-09-02

In the meantime I will look further into the 'as_of' dates.

thanks, J

If you haven't implement point-in-time values for this particular field, than what is the meaning of the query date? Sector values do vary over time for a given security so presumably these are the sector assignments as of that date.

You are correct, sector values do change over time. We have an outstanding feature to build to ensure this single field abides by the point-in-timeness of the other 600+ fields. In the meantime, this field uses the same data model and access API as the other 600+ fields.