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

Hi,
I have a second level data of prices for a day starting from 9:30:21 to 15:59:59 containing 23000 rows. I want to run it on zipline.
I formatted the data into a pandas dataframe and ran it on my algorithm. My algorithm contains a batch transform which has a window length of 100 rows. The batch transform runs arima model and predicts a value for each 100 values dataframe provided by handle_data function.
The algorithm runs perfectly for yahoo daily-level data but when i give it the second level data it outputs:
INFO: Performance: Simulated 1 trading days out of 1.
INFO: Performance: first open: 2013-05-15 13:31:00+00:00
INFO: Performance: last close: 2013-05-15 20:00:00+00:00

The code doesn't even enter the batch transform code during execution.
I want to know how to modify the zipline functions to accept second level data and provide outputs for such a small timeframe and also provide the risk report and portfolio values for this kind of data.

2 responses

HI Arjun,

Zipline, like Quantopian, does not support second-level data. If you try to run your data, it will take the last datapoint in the minute and use that as the value for the minute bar. It does not aggregate other metrics (such as volume) - it will only take the value from the last second for the entire trade bar. If you're interested in maintaining the integrity of the second-level data, you will need to clean it up and aggregate it yourself before piping it into Zipline.

If you have other Zipline questions, here is the Google group: https://groups.google.com/forum/#!forum/zipline

Cheers,
Alisa

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.

Thanks alisha for clearing that up.