I've been studying Quantopian documentation for the past few days and it seems that a lot of critical information is scattered across Community posts and API docs while I expected it to be somewhere in the FAQ. People ask the same questions over and over again.
I am ok using search, but it feels not very productive and in many cases the answers are 1-2 years old, so it's not clear whether they are still valid or not.
Key points:
- Quantopian is designed for intraday trading - live trading will always use GTD orders, however backtesting always uses GTC orders
- As a consequence, in order to reuse the same algo in backtesting and live, it should manually cancel all orders at 3:59 PM (bar ending at 3:59)
- For overnight position strategies the algo should manually re-submit orders at the beginning of each new day (including stops)
- Trailing stops are not supported - should be done manually
- Regular stops are tricky too, for clean backtesting stops should be placed at the next bar after the market order is filled (and use the actual fill price as a base)
- Order modifications are not supported - should be resubmitted
- OCO orders are not supported - there is no way to submit a stop order after the main order is filled (partially or in full)
- There is no way to define stock universe using stock average volume or price range, only as a percentile of the Dollar Volume traded
- Positions and orders are tracked by Zipline framework and may, in theory, diverge from IB (overnight positions, stock delisting, M&A, manual orders, margin call etc). (Asked separately)
Questions / Calls to action:
A. Could you please confirm that the points above are correct?
B. Would Quantopian staff consider making an API FAQ or at least putting these in the "Important Concepts" section?
C. Many of the answers also imply re-implementing tricky order management concepts by hand, which seems like something Zipline should do, or again should be a part of some sort of a "cookbook", hopefully tested and approved by the staff and the community?
Thank you!