Merry Christmas everyone. I did get up early today. I have placed some presents under the tree. I have had some coffee and raisin bran. I am listening to probably my favorite Christmas album of all time.
I decided to create a small Excel Spreadsheet to help me with my new MFI Formula routine. As my readers will recall, I have committed to once a quarter randomly pick five stocks from the MFI official screen. The pick is done as follows:
- Take the to 50 stocks over $100 million.
- Take a subset of that list: stocks with market cap > $600 million and dividend yield > 2.5%.
- Use Randomizer.org to randomly pick 5 stocks from that list.
It is almost time for my 2nd tranche - next Wednesday. So I created a small worksheet to do the work. It is actually pretty cool.
Step 1 - download data from official website (Magic formula investing - Official Site) into cell a1.
The spreadsheet will then create the following table automatically:
Ticker | Market Cap | Price | Dividend | Yield |
ADMS | 249 | 16.10 | - | 0.0% |
268 | 14.55 | 0.15 | 1.0% | |
555 | 38.26 | - | 0.0% | |
3,677 | 34.07 | - | 0.0% | |
AGX | 507 | 34.80 | 0.70 | 2.0% |
553 | 14.36 | - | 0.0% | |
101 | 4.45 | 1.75 | 39.3% | |
572 | 13.90 | - | 0.0% | |
2,509 | 52.18 | 2.08 | 4.0% | |
CA | 13,796 | 31.31 | 1.00 | 3.2% |
143,115 | 28.30 | 0.74 | 2.6% | |
10,252 | 36.97 | 1.35 | 3.7% | |
3,115 | 62.88 | 1.15 | 1.8% | |
DEPO | 890 | 15.54 | - | 0.0% |
632 | 16.93 | 0.30 | 1.8% | |
9,479 | 60.30 | 0.84 | 1.4% | |
3,785 | 33.39 | 1.32 | 4.0% | |
135,391 | 91.29 | - | 0.0% | |
GORO | 158 | 3.06 | 0.12 | 3.9% |
202 | 4.22 | - | 0.0% | |
IQNT | 608 | 18.30 | 0.45 | 2.5% |
2,085 | 54.33 | 0.60 | 1.1% | |
IILG | 1,184 | 20.89 | 0.44 | 2.1% |
ITRN | 475 | 22.10 | 0.98 | 4.4% |
KING | 5,201 | 16.27 | 0.46 | 2.8% |
1,444 | 42.29 | - | 0.0% | |
LBMH | 148 | 2.82 | 0.13 | 4.5% |
LFVN | 135 | 1.34 | - | 0.0% |
LQDT | 249 | 8.19 | - | 0.0% |
227 | 17.59 | 1.77 | 10.1% | |
NHTC | 145 | 11.30 | 0.03 | 0.3% |
NSR | 1,775 | 27.59 | - | 0.0% |
2,638 | 45.27 | 1.38 | 3.0% | |
1,270 | 7.61 | 0.60 | 7.9% | |
PFMT | 335 | 6.85 | - | 0.0% |
PETS | 287 | 14.23 | 0.68 | 4.8% |
5,055 | 25.22 | 0.75 | 3.0% | |
RPXC | 780 | 13.64 | - | 0.0% |
SPOK | 379 | 17.40 | 0.50 | 2.9% |
800 | 73.86 | - | 0.0% | |
691 | 35.48 | 1.62 | 4.6% | |
3,265 | 28.60 | - | 0.0% | |
TDC | 6,869 | 45.22 | - | 0.0% |
TZOO | 190 | 12.97 | - | 0.0% |
1,508 | 29.77 | - | 0.0% | |
1,269 | 103.51 | - | 0.0% | |
VEC | 311 | 29.96 | - | 0.0% |
VIAB | 32,005 | 76.89 | 1.29 | 1.7% |
WTW | 1,537 | 27.19 | - | 0.0% |
WILN | 355 | 2.96 | 0.16 | 5.5% |
This is done with standard excel formulas along with Randy Harmelink's terrific stock market functions (EXCEL Stock Market Functions Add-in). I use the RCHGetYahooPrices with "l1" as the parameter for price and "d" as the parameter for dividend.
Step 2
I wrote a small macro which is an Advanced Filter of this table. Advanced Filters are a neat tool that allow you to take a subset of a database using certain criteria and then copies that subset into another spot in worksheet.
Here is my criteria:
Market Cap | Yield | ||
>600 | >2.4% |
(Pretty simple - just in a couple cells).
I set up the quick key f to run the macro:
Sub Macro1()
'
' Macro1 Macro
'
' Keyboard Shortcut: Ctrl+f
'
Application.Goto Reference:="Ticker"
Range("G4:K54").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range( _
"H1:K2"), CopyToRange:=Range("O2:S2"), Unique:=False
End Sub
This is not rocket science. Ticker is the name of the top left-hand cell of my database. G4:K54 is the range with the data. My criteria are in cells h1:k2. Then the final result is copied to cells starting O2.
Here is what the output looks like (after I hit f):
Number | Ticker | Market Cap | Price | Dividend | Yield |
1 | 2,509 | 52.18 | 2.08 | 4.0% | |
2 | CA | 13,796 | 31.31 | 1.00 | 3.2% |
3 | 143,115 | 28.30 | 0.74 | 2.6% | |
4 | 10,252 | 36.97 | 1.35 | 3.7% | |
5 | 3,785 | 33.39 | 1.32 | 4.0% | |
6 | IQNT | 608 | 18.30 | 0.45 | 2.5% |
7 | KING | 5,201 | 16.27 | 0.46 | 2.8% |
8 | 2,638 | 45.27 | 1.38 | 3.0% | |
9 | 1,270 | 7.61 | 0.60 | 7.9% | |
10 | 5,055 | 25.22 | 0.75 | 3.0% | |
11 | 691 | 35.48 | 1.62 | 4.6% |
So if I wanted to lower the allowable dividend yield to 1%, I just change it in the criteria and hit f again.
Number | Ticker | Market Cap | Price | Dividend | Yield |
1 | 2,509 | 52.18 | 2.08 | 4.0% | |
2 | CA | 13,796 | 31.31 | 1.00 | 3.2% |
3 | 143,115 | 28.30 | 0.74 | 2.6% | |
4 | 10,252 | 36.97 | 1.35 | 3.7% | |
5 | 3,115 | 62.88 | 1.15 | 1.8% | |
6 | 632 | 16.93 | 0.30 | 1.8% | |
7 | 9,479 | 60.30 | 0.84 | 1.4% | |
8 | 3,785 | 33.39 | 1.32 | 4.0% | |
9 | IQNT | 608 | 18.30 | 0.45 | 2.5% |
10 | 2,085 | 54.33 | 0.60 | 1.1% | |
11 | IILG | 1,184 | 20.89 | 0.44 | 2.1% |
12 | KING | 5,201 | 16.27 | 0.46 | 2.8% |
13 | 2,638 | 45.27 | 1.38 | 3.0% | |
14 | 1,270 | 7.61 | 0.60 | 7.9% | |
15 | 5,055 | 25.22 | 0.75 | 3.0% | |
16 | 691 | 35.48 | 1.62 | 4.6% | |
17 | VIAB | 32,005 | 76.89 | 1.29 | 1.7% |
Pretty snappy. Back to the original table, which had 11 choices. I now go to Research Randomizer to randomly pick 5 distinct integers between 1 and 11.
|
Copyright ©1997-2008 by Geoffrey C. Urbaniak and Scott Plous | Site Statistics |
Cool - I just saw where I can add a Randomizer Box. I may try that.
Randomizer output:
|
|
I then will buy stocks 10, 5, 2, 1 and 11. Here is the table (abbreviated) again:
Number | Ticker |
1 | |
2 | CA |
3 | |
4 | |
5 | |
6 | IQNT |
7 | KING |
8 | |
9 | |
10 | |
11 |
So BKE, GME, RGR,CA and PBI. Of course this is an example. I will run the official list next week.
Merry Christmas everyone.
2 comments:
Very good info. I am going to try to recreate some of your spreadsheet work. Particularly the data retrieval .
Thanks, Karl
I'm curious why you:
"Take the to 50 stocks over $100 million" then proceed to throw out ever stock under $600M
Why not just take the top 50 over $600M, then you would likely have even more stocks to randomize
Post a Comment