Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
VWAPBestEffort must start at least a minute after now -- why?
API

I'm experimenting with VWAP orders. Is there a reason that the start time must be a minute from now as opposed to 1 or 5 seconds or something like that? In the sim, the VWAP gets simulated as a market / limit order so that doesn't matter anyway and the broker gets the order faster than in a minute. This way, the order gets held up for the time between when it's submitted until the end of the next minute and only then does it start executing, which seems wrong.

3 responses

I think we did it that way because it was the practical way to get the orders into IB without them being rejected. If the order is placed with the start set in the past, it is rejected. The way to get an order placed consistently is to put a bit of a buffer in the start time. I don't recall if we tested using 30 seconds instead of a minute, or anything like that; that might work.

I haven't gotten any negative feedback from the people who are using it in real money trading. The purpose of the order type is to move a largish chunk of stock with as small of a impact on the market as possible, typically over many hours. For those purposes the loss of a few seconds hasn't been a big deal.

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.

Well, you're getting negative feedback from someone doing real-money trading now :)

I would really prefer if you released the restriction and instead, let IB handle the rejects. From what I've seen, the orders tend to hit 1-10 seconds after the last bar so I would much prefer that. In my case, I use VWAPs over a pretty short period (couple of minutes) to move shares and delaying things by a minute is bad mostly because it makes things harder to analyse and understand. The risk of an occasional reject is once I'm willing to take.

OK. I've written it up as an issue for us to tackle when we do a round of improvements to the broker code. Thank you for the feedback.