Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
docs on 'data'.

Hi,

The docs for 'handle_data' allude to further documentation on the 'data' variable with the phrase 'Read More Below'. After having read all of the docs below, I failed to see where that structure was clearly laid out.

Also, this fails to produce any output to the log (as the log window just waits indefinitely for logging during a backtest):
log.info("data.keys: %s" % list(islice(data.keys(), 10)))

One more thing-- are options supported?

Thanks!

5 responses

Hi,

You can read about data properties here https://www.quantopian.com/help#api-event-properties

Options are not supported. You can find more detailed answer in the FAQ: https://www.quantopian.com/faq
This post worth reading too: https://www.quantopian.com/posts/options-trading-quick-simple-question-im-a-newbee

Regards,
Ed

Hello Jonathan,

Also consider the history API, which now supports both daily and minutely bars. The use of history to access the data has a number of advantages:

  • The data for all securities listed in the algo are delivered conveniently in a single Pandas DataFrame object with timestamps.
  • Trailing data are available at the start of the backtest (i.e. the backtest is "warmed up").
  • You have direct control of the automatic filling of missing data (see https://www.quantopian.com/help#ide-history).

Grant

Hi Grant & Ed,

Thank you kindly for your answers. This should be all I need to get started with the platform!

--Jonathan

Oh, actually one more thing:
any idea why the logging isn't coming through?

Jonathan, could you explain what you're seeing when the logs aren't coming through? Perhaps that code line isn't getting hit in your backtest? Better yet, if you invite me to collaborate on your algorithm, I can take a closer look and help out. In the IDE, press the 'Collaborate' button in the top right-hand corner and add my email address ([email protected]). We'll get your algo up and running!

Also, to see more details on objects, try the newly released debugger! You can read our announcement and see the documentation. Hope that helps!

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.