
Equal-weight ETF allocation with automatic rebalancing - fawce
https://www.quantopian.com/sector-etf-rotation
======
Beliavsky
The strategy equally weights the stock sectors in the S&P 500 using ETFs. In a
rising stock market this would incur capital gains taxes in a taxable account.
If you are saving regularly, you could direct your new investments towards the
sectors that have underperformed to get closer to equal weighting without
selling the outperforming sectors.

------
tom_b
Very neat. After a brief foray into reading about HFT, I've started reading
more about algorithmic (non-HFT) trading.

I'd love to hear if other HN readers are playing with algorithmic trading. I
occasionally think quantitative trading would be fun because of the
intersection of math/stats and CS. Of course, that's an "in the abstract"
statement. Depending on it for my mortgage would be . . . different.

~~~
chollida1
I do algorithmic trading, and write the underlying systems and algos, for a
living, not high frequency, though I did once get to 200 messages a second:)

The stress is always there, though you become desensitized to it after a
while, or you just quit in a stress induced rage:(

I'm Canadian so my knowledge is skewed to the Canadian markets.

My email is in my profile if you'd like to chat.

------
fsk
I'd feel VERY uncomfortable giving a 3rd party the password to my brokerage
account. Too many bad things can happen.

Yes, I know you take property security. There's always some bug or flaw you
don't know about. Because you're logging in to the clients brokerage account,
that means your software has access to their UNENCRYPTED UNHASHED password.

Also, there are reasons to NOT automatically rebalance every 21 days. Long-
term games are better than short-term gains (unless it's an IRA). In addition
to commissions, there's the cost of the bid/ask spread, not included in your
calculation.

~~~
minimax
Does it say somewhere that they store your IB username and password? Their
documentation suggests otherwise.

 _You will need to authenticate to your Interactive Brokers_ account. (Note:
Quantopian does not store your brokerage password.)*

[https://www.quantopian.com/help#overview-
livetrading](https://www.quantopian.com/help#overview-livetrading)

------
bradleyjg
I don't see the fundamental distinction between this and a S&P 500 index fund.
Instead of carrying out one rebalancing (at whatever frequency) there's now
two rebalacning steps -- one at the sector level and then another one to
account for market cap changes within the sector. The net result of either
strategy looks to be an imperfectly realized approximation of the performance
a continuously adjusted market cap weighted portfolio of those 500 stocks.

Is the claim that this is somehow a better approximation? Are there some tax
loss harvesting benefits? What am I missing?

~~~
aet
The costs of this strategy are hidden in the trading. Every time you trade,
you incur a cost. Lets say your brokerage commission is $0 - you still pay the
spread when you trade and taxes when you sell. Fees for this look reasonable,
but why not hold VTSAX which holds approximately 3700 stocks at 0.05% (5bp)
expense a year.

~~~
jannotti
They claim that their backtesting mechanism accounts for the spread. Your
guess is as good as mine whether they do so perfectly.

------
smrtinsert
Out of curiousity does anyone do algo trading on options? Maybe through IBs
java api?

------
minimax
How does it execute the rebalance trades? Just MOC or something like that?

~~~
fawce
No, it places orders market orders in any of the ETFs we need to rebalance
mid-morning. Orders go out around 10:15am NY time on rebalance days.

Also, the chart in the page is from actual trading on a roughly $25k account,
and updates each day.

~~~
minimax
It would be very interesting to see the chart of actual trading next to a
similar chart generated by the Quantopian backtester.

Very impressed with the product btw. Good work.

~~~
jstauth
That's a great question, I've been working up a more detailed analysis of
implementation shortfall (and thinking about ways to make this automated) -
but your question prompted me to post a quick comparison here that you can
look at for some current results: [https://www.quantopian.com/posts/live-
results-vs-backtest-re...](https://www.quantopian.com/posts/live-results-vs-
backtest-results-at-a-glance)

Full disclosure, I work for Quantopian and I wrote this strategy.

