Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Arb with ETF and Underlying

I've been playing around with Quantopian for a while, but this is my first post to the forum. I've created an algorithm that trades on a given ETF and some underlyings. Here, I chose to use VGT (Vanguard Tech) and its 12 largest underlyings. The algo calculates the beta for each underlying relative to the ETF, and uses that along with the MACD as a trading signal.
The arb strategy is to short the etf and long the underlyings that are expected to outperform it based on the two trading signals.

1 response

You need to add some logic to manage your cash. You are using millions more than you actually have. Take a look at order_target_percent. I recommend modifying your code to take advantage of the alternative order methods.