Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Possible Flaw in Quantopian Day Trading Logic or Just My Ignorance

I was messing around with a dual momentum strategy based on Chris De Palma's elegant interpretation of Gary Antonacci's Dual Momentum strategy. Got very nice results using Monthly and Weekly timeframes. But then I decided to see what would happen if we tried it intraday. I thought an intraday strategy would get killed by trading costs but I was curious given RobinHood's alleged zero-cost trading model .

Problem is, the same strategy that works on large time frames gets killed on intraday, no matter what the timeframe. As you see below.
Then I thought, it's because of the trading costs, so I set these to zero. Same story emerges.

In fact it was losing so much money at one point that I though, Hell, let me go short every time I would otherwise go long and close out at same times. I mean if something loses a gazillion percent doing one thing and trading costs are zero, doing the exact opposite should logically make money right?

Not according to Q's calculations. Check out this backtest and then opposite one posted thereafter. Only difference is in one I go negative the shares instead of positive.

I suspect this has to do with Q's assumption of fill prices, which assume such horrible fills that no day trading strategy can every succeed under these, but I ' m curious to see what others here think.

Thanks for your feedback.

4 responses

Here' its opposite.

A lot of strategies depend on specific rebalancing dates/times, even if they are not advertised as such. You're also only doing 30 hours of lookback, rather than 30 days - is that what you intended?

Even without commission you still get destroyed by slippage. Here is the same algo without slippage.

Mathieu,
Thanks for that.

I thought it might be the slippage, but didn't look up how to set it to zero. Now theoretically, I can apply the model I develop to a virtual IB account and get a more realistic account of true profitability. Of course, even that would be a little skewed from a live account, but it will be a lot closer.

Simon,

Actually, before fetching the history I multiply the context.formation by context.interval, or in this case 60 x 30 to get 1800 minutes.

Thanks guys