Here is my version of the famous Puppies of the Dow strategy, with rebalancing completely based on coarse and fine universe selection.
The rules are simple:
Each year
- Select the 10 stocks with the highest total yield
- From the stocks selected in 1. , select the 5 stocks with the lowest price.
The strategy basically tries to identify the 5 most undervalued stocks, based on the difference between their divident yields and prices.
The performance over a 10 year backtest period starts out promising, but then gets worse. Any ideas on how to improve the thing?
Douglas Stridsberg
I am innately skeptical towards strategies (or indices) that look at a stock's price. The price is just a result of outstanding # stocks and market cap and, to me, shouldn't say anything about a company.
I don't use Python but I can't see where in your code you're actually sorting by price. It does, however, seem like you're abritrarily removing stocks with a price below $5 - is that intentional? Also, that filter shouldn't do anything because (AFAIK) all current DJIA constituents have a price above $5.
Filib Uster
Exactly. the coarse filter removes stocks below 5 Dollars. You find the sorting in the FineSelectionFilter: It first sorts by total yield and from the 10 stocks with the highest total yield selects the 5 stocks with the lowest price. I.e., the strategy focuses on the difference between dividents and price.
Here are the two lines:
dogsOfTheDow = sorted(fine, key = lambda x: x.ValuationRatios.TotalYield, reverse=True) puppiesOfTheDow = sorted(dogsOfTheDow, key = lambda x: x.ValuationRatios.BuyBackYield)[:self.portfolioSize]
Douglas Stridsberg
Hey,
I'm not sure BuyBackYield is a correct proxy for price. The only two definitions I know of are:
BBY = [ Common Shares Outstanding(t-1) - Common Shares Outstanding(t) ] / Common Shares Outstanding(t-1)
BBY = $ Amount of Shares Bought Back (in some time period) / $ Market Cap
Neither of these proxy price as far as I can tell. Do you mind explaining?
Davidii111
Consider to use market cap instead of stock price.
p/e ratio is also good to look for, p/e below 10 is usually pretty under valued.
EPS Growth is also nice to use = bullish
Increasing Volume = could be bullish
How much % of the float that is short, sort out if % is too high. You dont want to enter if there is a lot of short capital in the stock.
Insider transactions. Is it many insiders buying?
I dont know if there is support for all this fundamental factors, but there you have some ideas...
Filib Uster
Thanks for your help - my point ist: According to published portfolio, this strategy should outperform its benchmarks. Since my implementation clearly isn't, there must be something wrong with the implementation. What could it be?
Douglas Stridsberg
If you mean the article you linked, then I can see a few differences:
- Firstly, that article doesn't mention whether it includes transaction costs (my guess it it doesn't)
- As discussed, your $5 exclusion is abitrary and not part of that strategy
- As discussed, you're ranking by buyback yield which is not a proxy for price
To summarise, it doesn't look like you're following the rules of the published strategy, which possibly explains why your results don't follow it either.Filib Uster
I initially thought that the lower boundary makes sense, since the original strategy is based on the Dow, as the name implies. Maybe the strategy just doesn't work so well for a Universe that is too broad and tries to replicate the QC500?
You made a good point with respect to the buyback yield. When I replace it by the price, however, the performance gets much worse:
Douglas Stridsberg
The Dow is super specific, archaic and (in my view) totally arbitrary. In my view, choosing the Dow as your underlying index is the same as cherry-picking the best stocks and introducing look-ahead bias into your backtest. I'm not at all surprised your performance with a general universe is different to that of a Dow universe.
You write: "According to published portfolio, this strategy should outperform its benchmarks. Since my implementation clearly isn't, there must be something wrong with the implementation." - I really don't think there's anything "wrong" with your implementation.
Filib Uster
Interesting point of view - so the reported success of the original strategy might actually just be luck?
Filib Uster
"In my view, choosing the Dow as your underlying index is the same as cherry-picking the best stocks and introducing look-ahead bias into your backtest. "
Where do you see look-ahead bias at work? Both the Dow composition and the fundamental data are based on historical data which is fully available at the time of the investments.
Douglas Stridsberg
From the index methodology:
"While stock selection is not governed by quantitative rules, a stock typically is added only if the company has an excellent reputation, demonstrates sustained growth and is of interest to a large number of investors. Companies should be incorporated and headquartered in the U.S. In addition, a plurality of
revenues should be derived from the U.S. Maintaining adequate sector representation within the index is also a consideration in the selection process for the Dow Jones Industrial Average™. Changes to the indices are made on an as-needed basis. There is no annual or semi-annual reconstitution. Rather, changes in response to corporate actions and market developments can be made at any time. Constituent changes are typically announced one to five days before they are scheduled to be implemented."
Perhaps I shouldn't call it "look-ahead bias" but the index is based on a bunch of non-observable, non-measurable variables and is subject to change at any time for any arbitrary reason. In my view, that immediately discredits it from being used in a quantitative universe.
Filib Uster
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!