Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
In Live trading is there an open order expiry timeline?

Here is my stats from live trading:

Positions SPY 54 $168.97 $9,104.40 ($20.09)
Orders and Fills
2013-08-13 09:34:00 SPY Limit 14 $168.62 Filled
2013-08-13 09:03:00 SPY Limit 14 $168.95 Filled
2013-08-13 08:32:00 SPY Limit 10 $169.35 Filled
2013-08-12 09:02:00 SPY Limit 16 $169.09 Filled
2013-08-12 08:31:00 SPY Limit 26 $168.40 Open

My question is why the first order placed (on 8-12 8:31 US Central) is still open? Default order on brokers expire at End of Day (but you have to override this, if you want the order to be open beyond the DAY).

What is the default expiry for Quantopian live trading/back testing orders? I would argue the algorithmic order placed today would be stale on the next trading day, because the information of algo generating the decision for the order may have changed and therefore you may not place this order on the next trading day.

Alternatively, there could be a duration parameter for orders, where you could have options of DAY (default) or Good Until Cancelled(with certain time limit) like most brokers offer.

4 responses

The default is that orders are open until canceled. There are tools that you can use to find open orders and cancel orders in the help docs.

I definitely can see the merit of having multiple order types, and we'll probably implement them eventually. At least for now our strategy is to give you the very basic tool set, and then let you build the behavior you want. I suspect that someone will build a day_order function and share it here on the website. If it gets a lot of adoption, that will be an indicator for us about what we should be building.

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.

Dan,

This is a follow-up on the first log that I had. From my live trading, as of today I still have the first order status as "Open" (in duplicate) even though I can see my position increase by 26 this morning when market opened with a sharp drop and price went below 168.40. Why this bevavior?

Orders and Fills
2013-08-13 09:34:00 SPY Limit 14 $168.62 Filled
2013-08-13 09:03:00 SPY Limit 14 $168.95 Filled
2013-08-13 08:32:00 SPY Limit 10 $169.35 Filled
2013-08-12 09:02:00 SPY Limit 16 $169.09 Filled
2013-08-12 08:31:00 SPY Limit 26 $168.40 Filled
2013-08-12 08:31:00 SPY Limit 26 $168.40 Open

See screenshot of this live trade

That looks like a bug to me. It looks like one of the orders is listed twice in the UI. It definitely should be investigated further.

Can you please email me the URL of your algorithm so I can investigate it further? I don't need to look at the code, but the URL will have the information I need to search the logs. [email protected]

OK, it's a known bug that we haven't fixed yet. If you have an order that is open overnight, we are incorrectly listing the order twice in the live trading UI. The problem has to do with the order being open on one day and filled on another day, and that's causing our display logic to freak out a little. (That's a technical term ;)

It's a complex fix, and it's not a problem in the underlying performance of the algo, so it won't be fixed right away. We'll get to it, though, for sure.