Quantcast
Channel: Hacker News 50
Viewing all articles
Browse latest Browse all 9433

Quantopian - Ranking and Trading on "Days to Cover"

$
0
0

Comments:" Quantopian - Ranking and Trading on "Days to Cover" "

URL:https://www.quantopian.com/posts/ranking-and-trading-on-days-to-cover


At our meetups in NYC and Boston this month, Jess Stauth explained how short interest can be used as a signal for investing. She has developed a very refined model at Thomson Reuters, and we collaborated on a simplified version here.

First I built a csv file of data for "days to cover" from the Nasdaq site, and threw it into s3. "Days to cover" is the number of average volume days required to cover the total short interest in a security.

I coded the attached algorithm that chooses a universe of stocks and ranks them based on the days to cover data. The algorithm looks for changes in the top ten and bottom ten stocks in the days to cover ranking, and rebalances the portfolio to have an equal dollar investment long in the top decile, and short in the short portfolio.

In addition to the algorithm returns and benchmark returns, I recorded four intermediate values:

  • decile_count -- the number of stocks in a decile, to gauge the number of positions we're building in the portfolio
  • top_turnover -- the percentage change in the top decile. only updates when the ranking changes.
  • bottom_turnover -- the percentage change in the bottom decile. only updates when the ranking changes.
  • dtoc_is_one_count -- NASDAQ doesn't report less than 1 day to cover, so this is a check to see how many stocks in the ranking are hitting the floor.

I also chose to rebalance whenever the deciles change, rather than on a monthly or bi-monthly schedule. The rebalance is incremental, so the transaction costs shouldn't be too onerous.

I'd love to see this ported to run on minutely data, to use the quandl api, or to rebalance on a monthly schedule rather than in and "event-driven" mode. Feedback is appreciated!

thanks,
fawce

aside: I mentioned my script to the guys at Quandl and they offered to put it into their mill, so now you can get short interest through their lovely api and never worry about updating the results. However, I haven't figured out yet how to get the data from quandl for a wide swath of stocks.


Viewing all articles
Browse latest Browse all 9433

Trending Articles