Back to Community
Help..Data of the grains futures looks not ideal at all...

I was so glad when received the email said futures are available now... But after I set about building oilshare spread algo, I found something undesirable....

First... The soybean oil price can just display like 0.319 rather than 0.319x, which you can see on the attached notebook... It's really bad. Why? Because the 4th decimal place is the tick number... which means, 0.319 to 0.318 has 10 tick! That's a huge move, since soybean oil just move about 55 ticks each day..... Do you have any idea to get the 4 decimal digits data? Without that I can't test intraday trading on soybean oil,, and also unable to build Oilshare spread formula

The other thing is about the continuous_future rolling... I don't want it to rolling based on calendar, because that's not I am doing in the real trading.. But if I change the option to base on volume, the soybean oil and the soybean meal may not roll into a new contract in the same day. Is there any way to change two products into a new contract in the same day and still base on the volume? It's important for building spread...

The third is the time zone, do you guys have any idea to set or offset the timezone into local time? I trade CBOT products, so every day the close of grains is at 13:20:00,, which seems like is 18:20:00 from the database...

I am new to quantopian and have no idea how to fix these..

Thanks a lot if you guys have any suggestions...

Loading notebook preview...
Notebook previews are currently unavailable.
2 responses

Hi Manlin,

Thanks for bringing these issues to our attention.

We'll have a look at the precision on the pricing data for contracts with a tick size < 0.001, you're right that it should be more precise.

For continuous futures, the roll attribute simply specifies the logic for when a continuous future starts pointing to the next contract, it doesn't actually roll positions in your portfolio. The only time that any automatic transactions occur is on the auto_close_date when contracts are automatically closed. To get volume based rolling at the same time on multiple contracts, you can add logic to your algorithm that triggers when any of the volume roll continuous futures start pointing to the next contract. When that happens, you can trigger your other contracts to move to the next position using data.current_chain() to get the list of upcoming contracts.

For the time zone issue, you can use tz_convert to convert to local time zone (see attached notebook). Right now, our daily bars are constructed on 6pm-6pm activity, meaning the 'close', 'open', 'high', 'low', and 'volume' for day N capture the window of activity between 6pm on day N-1 to 6pm on day N (Eastern Time).

Loading notebook preview...
Notebook previews are currently unavailable.

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.


What is the approx time to fix this decimal issue ?

Looks like Quantopian is limiting to 3 decimal places but some futures symbols required more decimal places.

to name a few :
AD Australian Dollar
BP British Pound
CD Canadian Dollar
EC Euro FX
JY Japanese Yen