Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Is Hedging Allowed at Quantopian?

I am a newbie and I have a few basic questions:

1) Can I hold a buy trade and a sell trade at the same time for S&P, DowJones, and other trading instruments?
2) Can I have multiple buy trades with different stops losses and take profits?

2 responses

@Uncle B. Your trading options are based on what an account at InteractiveBrokers can provide. On top of that there are additional restrictions imposed by Quantopian.

Are you asking can you hold a long and short position in the same instrument? No. You would have to have two client accounts each connected to separate strategies to affect such a position. Otherwise such a "hedge" would just be selling your long or covering your short (reducing your open position). You can short securities, so you could take an short position in a similar instrument to hedge, provided the instrument offers enough shortable shares.

Or are you asking can you have an open buy long limit and an open sell short limit at the same time? Yes. But you'll have to manage those carefully. No OCA pass through is provided. As Quantopian only offers minutely granularity for execution examination you could easily be filled on bracketed orders depending on volatility during the minute your strategy is out of touch with the market. If you need true scaled entries or exits, in tight or volatile markets, you may want to trade your own ATS.

[These comments reflect my understanding of the Q's behavior.]

Thanks.