+ All Categories
Home > Documents > Online Crime Spreadsheet Corner: Editor’s Outlook ... · † AmiBroker 5.30 .....7 On the...

Online Crime Spreadsheet Corner: Editor’s Outlook ... · † AmiBroker 5.30 .....7 On the...

Date post: 25-May-2018
Category:
Upload: phungdien
View: 216 times
Download: 1 times
Share this document with a friend
5
A ccording to a new study, “The Norton Cybercrime Report: The Human Impact,” about two-thirds of Internet users have been victims of online crime. In the U.S., that number increases to nearly three-quarters of all online users. The U.S. ranked third behind China, Brazil and India (who were tied for second). The survey highlighted the fact that users’ compla- cency could be aiding cyber criminals. Among the respondents, nearly 80% felt that cyber criminals would be caught. As a result, less than half of those surveyed that had fallen victim to a cyber crime actually reported it to authorities. Failing to report such crimes, however, allows cyber criminals to avoid detection and to victim- ize other online users. According to the survey, a little more than half of online attacks take the form of viruses and malware. Unfortunately, many computer users needlessly leave themselves open to possible attack by not using antivi- rus or firewall software because they think the software is too complicated to install or that it costs too much. Today, however, there are many anti-virus and firewall applications that are available for free and easy to install and set up. On my own home systems, I use ZoneAlarm firewall and Avast anti-virus and, knock on wood, have not been a victim of a cyber crime. And both programs are free. Henning Trading Models In this issue, I conclude my three- part series of articles on Grant Henning’s quantitative stock trading models. In the August 2010 Online Exclusive, I began with his technical- momentum model, which focuses on price momentum to identify stocks that are currently under accumula- tion. The second article, which was the September 2010 Online Exclu- sive, discussed Henning’s fundamen- tal-value model, which focuses on Online Crime Editor’s Outlook Spreadsheet Corner: Automating the Henning Technical- Momentum Trading System (continued on page 2) Fourth Quarter 2010 Volume XXIX, No. 4 h www.computerizedinvesting.com Updates • Realized ........................................ 4 • StockCharts.com.......................... 5 • ValueCruncher ............................. 6 • AmiBroker 5.30 ............................ 7 On the Internet • Stock Repurchase Activity ....... 10 Feature A Hybrid Technical-Fundamental Stock Trading System................ 16 Fundamental Focus Using the Enterprise Value Ratio ........................................... 20 Comparison The Top Online Portfolio Managers.................................... 22 Technically Speaking • The Put-Call Ratio ................. 30 (continued on page 12) I n the August 2010 CI Online Exclusive article, we dis- cussed the technical-momentum stock trading model of Grant Henning, which he outlined in his book “The Value and Momentum Trader” (John Wiley & Sons, 2010). This was the first in a series of three articles on the three trading models Henning introduces in his book (the third and final article in this series begins on page 16 while the September Online Exclusive article with the second part is available at the Computerized Investing website). Initial Watchlist For all three of his trading models, Henning employs a set of qualifying variables to winnow down the stock universe to a watchlist of roughly 200 companies. These filters are as follows: • Stock price has at least doubled over the last 52 weeks; • Stock price has risen at least 30% off of the low price of the last three months; • Stock price is over $5; and • Average daily trading volume is over 10,000 shares. For the August Online Exclusive article, we used AAII’s Stock Investor Pro fundamental stock screening and
Transcript

According to a new study, “The Norton Cybercrime Report: The Human Impact,” about two-thirds of

Internet users have been victims of online crime. In the U.S., that number increases to nearly three-quarters of all online users. The U.S. ranked third behind China, Brazil and India (who were tied for second).

The survey highlighted the fact that users’ compla-cency could be aiding cyber criminals. Among the respondents, nearly 80% felt that cyber criminals would be caught. As a result, less than half of those surveyed that had fallen victim to a cyber crime actually reported it to authorities. Failing to report such crimes, however, allows cyber criminals to avoid detection and to victim-ize other online users.

According to the survey, a little more than half of online attacks take the form of viruses and malware. Unfortunately, many computer users needlessly leave themselves open to possible attack by not using antivi-rus or fi rewall software because they think the software is too complicated to install or that it costs too much. Today, however, there are many anti-virus and fi rewall applications that are available for free and easy to install and set up. On my own home systems, I use ZoneAlarm fi rewall and Avast anti-virus and, knock on wood, have not been a victim of a cyber crime. And both programs are free.

Henning Trading ModelsIn this issue, I conclude my three-

part series of articles on Grant Henning’s quantitative stock trading models. In the August 2010 Online Exclusive, I began with his technical-momentum model, which focuses on price momentum to identify stocks that are currently under accumula-tion. The second article, which was the September 2010 Online Exclu-sive, discussed Henning’s fundamen-tal-value model, which focuses on

Online Crime

Editor’s OutlookSpreadsheet Corner:Automating the Henning Technical-Momentum Trading System

(continued on page 2)

Fourth Quarter 2010Volume XXIX, No. 4

hwww.computerizedinvesting.com

Updates

• Realized ........................................4• StockCharts.com ..........................5• ValueCruncher .............................6• AmiBroker 5.30 ............................7

On the Internet

• Stock Repurchase Activity ....... 10

Feature

• A Hybrid Technical-Fundamental Stock Trading System ................ 16

Fundamental Focus

• Using the Enterprise Value Ratio ........................................... 20

Comparison

• The Top Online Portfolio Managers .................................... 22

Technically Speaking

• The Put-Call Ratio ................. 30

(continued on page 12)

In the August 2010 CI Online Exclusive article, we dis-cussed the technical-momentum stock trading model

of Grant Henning, which he outlined in his book “The Value and Momentum Trader” (John Wiley & Sons, 2010). This was the fi rst in a series of three articles on the three trading models Henning introduces in his book (the third and fi nal article in this series begins on page 16 while the September Online Exclusive article with the second part is available at the Computerized Investing website).

Initial WatchlistFor all three of his trading models, Henning employs

a set of qualifying variables to winnow down the stock universe to a watchlist of roughly 200 companies. These fi lters are as follows:

• Stock price has at least doubled over the last 52 weeks;

• Stock price has risen at least 30% off of the low price of the last three months;

• Stock price is over $5; and• Average daily trading volume is over 10,000 shares.For the August Online Exclusive article, we used AAII’s

Stock Investor Pro fundamental stock screening and

A B C D E F G H I J K L M N O P RQ1234567

Computerized Investing12

SpreadsheetCorner

design your own portfolio manager and stock analysis spreadsheets.

XLQ comes in two versions—XLQlite and XLQplus. The biggest difference between XLQlite and XLQplus is the support of third-party software—including AAII’s Stock Investor Pro—and additional data vendors. If you are looking to use Yahoo! or MSN as your data source, you will be fi ne with XLQlite. But XLQlite also lacks the more ad-vanced formulas found in XLQplus.

The versions cost $84 and $139, respectively; however, you can download and use the more robust XLQplus for free for 45 days. A paid subscription to XLQ entitles you to a year’s worth of program updates. After the fi rst year, you can renew your license each year at a discount (currently $54 for XLQplus and $31 for XLQlite). Also, AAII members receive a $25 discount the fi rst time they order XLQplus by using the code AAII-SIP.

For a more detailed review of XLQ, see the Spreadsheet Corner column in the Fourth Quarter 2009 issue of Computerized Investing, available online.

Building Our Spreadsheet

Once we ran our screen in Smart-Money Select, we exported the tick-ers of the 122 passing companies in Excel format. We then pasted these tickers in the Input Data tab in our technical-momentum spreadsheet. XLQ uses these tickers to retrieve the data we need for the companies in our watchlist. Therefore, if you are using this spreadsheet for your own analysis, be sure to enter your watchlist tickers in Column A of the Input Data worksheet, beginning with Row 1. Once you do this, XLQ will populate the rest of the spread-sheet for you. However, we will walk you through the various worksheets of this spreadsheet and the underly-ing functions.

Automating the Henning Technical-Momentum Trading System

Wayne A. Thorp, CFA

Data SheetThe raw data we use in calculating

the technical-momentum model vari-ables are retrieved within the Data Sheet worksheet, which is shown in Figure 1. Here XLQ has pulled the company (name), ticker, and exchange along with the current, 52-week high and low, and three-month low (3-mo low) prices.

Here are the functions we used in Cells A5 through H5, respectively:

A5: =xlqName(‘Input Data’!A2,”msn”)B5: =‘Input Data’!A2C5: =xlqExchange(‘Input Data’!A2)D5: =xlqPrice(‘Input Data’!A2)E5: =xlq52WeekHigh(‘Input Data’!A2)F5: =xlq52WeekLow(‘Input Data’!A2)G5: =xlqhLowestClose(‘Input

Data’!A2,’Input Data’!$D$1)H5: =xlqhLowestCloseDate(‘Input

Data’!A2,’Input Data’!$D$1)

Each of these functions relies on the tickers we entered in the Input Data worksheet. So whenever the tickers in that worksheet change, the impact fl ows through the other work-sheets in the spreadsheet.

The functions for cells A5 through F5 are referred to as “day quote formulas” in XLQ-speak. While the formulas may look intimidating, they do not require any programming knowledge. If you know your way around a spreadsheet, you shouldn’t have any problems with the XLQ formulas. With a little patience, you will come to understand the logic.

Looking at the formula for cell D5, which is pulling the latest price quote, we can break it down into its component parts. As with any other functions or formulas in Excel, you begin with the equals sign (=):

=xlqPrice(‘Input Data’!A2)

This formula then retrieves the last trade price for the ticker in cell A2 of the Input Data worksheet. The data provider used—Yahoo! or MSN—is set in the XLQ preferences. Both

research database program to screen for this initial watchlist of compa-nies. Looking for an online screening source that also allows you to export your screening results proved to be more diffi cult than anticipated. In the end, we used the SmartMoney Select screener, which allowed us to screen for the 52-week price change as well as minimum share price and average daily volume. We were then able to export our screening results as an Excel spreadsheet fi le, a function that few other online screeners provide. As of the close of August 27, 2010, 122 stocks met these qualifying crite-ria to form our initial watchlist.

Once Henning has his initial watchlist, he begins analyzing several different variables, all of which are based on current and historical price data. To automate the collection of the necessary data and the calcula-tion of these variables, we created a spreadsheet template. You can down-load this template from the Comput-erized Investing website at the online version of this article.

XLQToday investors can access a wealth

of free data from the Internet. While many websites, such as Google Fi-nance and Yahoo! Finance offer free historical quotes for stocks, mutual funds and ETFs, they are not readily accessible for “batch processing”—collecting a range of historical data for a group of companies. However, there are relatively inexpensive utili-ties available that do just that. One that we use extensively is XLQ from Q-Matix (www.qmatix).

XLQ delivers live and historical stock, index, mutual fund, option, future, or currency data pulled from either free or subscription-based Internet data services (the type of instruments and data provided var-ies from vendor to vendor). Beyond retrieving data, it provides you with a set of formulas that you can use to

(continued from page 1)

13Fourth Quarter 2010

SpreadsheetCorner

these services offer delayed intraday quotes.

However, you can also specify the source in the formula, perhaps over-riding the program default:

=xlqPrice(‘Input Data’!A2, “MSN”)

This formula would then display the latest trade price provided by MSN for the ticker in cell A2 of the Input Data worksheet.

Cells G5 and H5 use “historical quote formulas” that retrieve prior-period data for a symbol from a specifi c source.

With the historical formulas, you can retrieve historical data from spe-cifi c dates or from a specifi c number of periods ago. You can also identify the highest or lowest intraday price (as well as the highest closing price) for a symbol over a specifi ed period of time.

In XLQ, historical quote formulas differ slightly from the day quote formulas:

=xlqhFunction(“symbol”, “date reference”, “source”)

Looking at cell G5’s formula:

=xlqhLowestClose(‘Input Data’!A2,’Input Data’!$D$1)

This formula displays the lowest closing price for the ticker symbol in cell A2 of the Input Data worksheet, with the look-back period being the number entered in cell D1 of the Input Data worksheet. We look at the last 65 trading days when looking for the lowest price, as this roughly equates to the 90-day period Henning uses for his analysis. Therefore, we have entered -65 into cell D1 of the Input Data worksheet (where we also paste the watchlist tickers).

Technical-Momentum Calculations

Once the data has been pulled into the Data Sheet worksheet we can start calculating the variables Hen-ning uses in his technical-momentum

model. For this, we created yet an-other worksheet in our spreadsheet—Technical-Momentum Calculations—where we entered the functions to calculate the fi ve variables underlying this technical-momentum model (Figure 2):

• 52-week multiple;• % lag;• investment value;• three-month price gain; and• rank.

52-Week MultipleThe 52-week multiple represents

the number of times the stock price has “multiplied” from the 52-week low to its current level or:

Current Price ÷ 52-Week Low Price

In the Data Input worksheet, which is again where the underlying data for these variables is being pulled, the current price is in Column D of the Data Sheet and the 52-week low price is in Column F of the same worksheet, so that the func-tion for the 52-week multiple in the Technical-Momentum Calculations worksheet is:

B4: =’Data Sheet’!D5/’Data Sheet’!F5

Percentage LagThe percentage lag variable in Hen-

ning’s technical-momentum model measures the degree to which the current stock price is below, or lags, the 52-week high price. Similar to the more common percentage of 52-week high that many momentum strategies use, it is calculated as follows:

[52-Week High Price – Current Price – $0.02] ÷ 52-Week High Price

Henning discovered that if the cur-rent price equaled the 52-week high, the resulting 0.0 value for percent-age lag would interfere with other variables in the model that use the percentage lag value in their calcula-tion. As a result, Henning arbitrarily deducts $0.02 from the current price when he calculates the percentage lag. However, we also discovered that, since the 52-week high is up-dated in most databases only after the end of each trading day, there is the potential for the current price to exceed the 52-week high during the course of the trading day. As a result, it is also possible for the percentage lag to be negative, thereby disrupt-ing some of the other variables in the model that use this variable. There-

Figure 1. Raw Data Worksheet

SpreadsheetCorner

Computerized Investing14

Three-Month Price GainHenning uses a unique three-

month price change fi gure for both his technical-momentum model and when generating his initial watchlist. He looks at the percentage change from a stock’s low price over the last three months to its current level:

[(Current Price – Three-Month Low Price) ÷ Three-Month Low Price] × 100

When we were discussing the Data Sheet items, we covered how we were able to retrieve the lowest closing price over the last 65 trading days (a rough equivalent of 90 calen-dar days) using the historical quote formulas. Now that we have the three-month low price (cell G5 in the Data Sheet worksheet), we can use it to calculate the percentage difference between it and the current price (cell D5 in the Data Sheet worksheet):

E4: =((‘Data Sheet’!D5-’Data Sheet’!G5)/’Data Sheet’!G5)*100

RankThe last variable Henning uses

for this technical-momentum model involves ranking the watchlist from lowest to highest based on the invest-ment value and then comparing this adjusted rank to the three-month

fore, we used an if-then statement in our percentage lag function in the Technical-Momentum Calculations worksheet that returns a percent-age lag value of 0.001 if the current price (Column D of the Data Sheet) exceeds the 52-week high (Column E of the Data Sheet):

C4: =IF(((‘Data Sheet’!E5-’Data Sheet’!D5-0.02)/’Data Sheet’!E5)<=0,0.001,((‘Data Sheet’!E5-’Data Sheet’!D5-0.02)/’Data Sheet’!E5))

Investment ValueThe next variable Henning uses

in his technical-momentum model is one that he created—investment value. It is a weighted rate-of-ascent (price change) value—52-week price multiple—divided by a weighted percent lag value. Specifi cally, the formula is as follows:

(3 × 52-Week Multiple) ÷ (2 × % Lag)

Since we calculate these variables in Columns B and C, respectively, of the Technical-Momentum Calcula-tions worksheet, we do not have to pull data from any of the other work-sheets in the spreadsheet:

D4: =(3*B4)/(2*C4)

price gain. He does this using the rank function in the Microsoft Excel spreadsheet program.

In Excel, Henning uses the rank function to fi rst order and smooth the investment value for each stock in the watchlist. The results of this ranking are then divided by each stock’s three-month price gain to give priority to those stocks experiencing strong upward price momentum over the last three months.

The rank formula used in our technical-momentum spreadsheet is as follows:

F4:=IF(E4<=0,”na”,(RANK(D4,$D$4:$D$125,0)*2+100)/E4)

Once again, we use an if-then statement that fi rst looks to see if the three-month gain is negative. If not, a null or “na” is returned for that cell’s rank value. If the three-month price gain is positive, the rank components of this formula are as follows:

• RANK is the Excel spreadsheet ranking function;

• D4 is the fi rst data cell of the investment value data column;

• $D$4:$D$125 is the fi xed range of investment value cells used by the rank function;

• 0 signifi es that the ranking order will be in ascending order (small-est to largest);

• E4 is the fi rst data cell of the three-month price gain column.

Tally & RecommendationsThe fi nal step in our Henning

technical-momentum analysis is to assign weightings to each of the four variables, tally these weightings, and then assign a recommendation based on the fi nal tally. For this, we created one last worksheet in the spread-sheet—Tally & Recommendations (Figure 3).

For the technical-momentum vari-ables in columns B through E, we set up a series of if-then formulas that assign numerical weighting of 0 or 1, depending on their value:

A3: =’Technical-Momentum Calculations’!A4

Figure 2. Technical-Momentum Calculations Worksheet

SpreadsheetCorner

15Fourth Quarter 2010

B3: =IF(‘Technical-Momentum Calculations’!C4<=0.03,1,0)

C3: =IF(‘Technical-Momentum Calculations’!D4>=100,1,0)

D3: =IF(‘Technical-Momentum Calculations’!E4>100,1,0)

E3: =IF(‘Technical-Momentum Calculations’!F4<1.5,1,0)

After assigning the weighting to these four variables, we then tally these values:

F3: =SUM(B3:E3)

Lastly, we assign recommendations using Henning’s ratings scale and a nested if-then function:

G3: =IF(F3=4,”Strong Buy”,IF(F3=3,”Buy”,IF(F3=2,”Hold”,”Sell”)))

In this formula, if a company has a rating of four, as calculated in cell F3, it is awarded a Strong Buy recom-mendation; if a company has a rating of three, it is awarded a Buy recom-mendation; if a company has a rating of two, it is awarded a Hold recom-mendation; otherwise, a company is

Wayne A. Thorp, CFA, is editor of Computerized Investing and AAII’s senior fi nancial analyst. You can follow him on Twitter at www.twitter/ci_editor.

awarded a Sell recommendation.Figure 3 ranks the companies in the

Tally & Recommendations worksheet in order by highest total score to low-est. As of September 1, 2010, only two companies from our watchlist of 122 companies received any type of buy recommendation—Wainwright

Bank & Trust (Strong Buy) and HSW International (Buy).

ConclusionThis article was intended to show

you how you can use a relatively inexpensive Excel plug-in to retrieve and manipulate free price data from the Internet. As your familiarity with both Excel and XLQ grows, the lim-its to which you can craft your own fi nancial models are virtually bound-less.

Figure 3. Tally and Recommendations Worksheet

Wayne A. Thorp, CFA, editor of Computerized Investing and senior fi nancial analyst at AAII, will be giving presenta-tions at the following local chapters this fall. Please go to AAII’s Local Chapters web page at www.aaii.com/chapters for more information and to register for these meetings.

Denver ChapterTopic: “How to Analyze a Stock With AAII and Other Online Investor Tools”Date: Monday, October 11, 2010, 6:30 p.m.Location: Clements Community Center, 1580 Yarrow St., Lakewood, Colorado

Sacramento ChapterTopic: “How to Analyze a Stock”Date: Thursday, October 7, 2010, 6:30 p.m.Location: Dante Club, 2330 Fair Oaks Blvd., Sacramento, California

Silicon Valley ChapterTopic: “All-Day Investing Seminar”Date: Saturday, October 9, 2010, 8:00 a.m.Location: Lookout Restaurant at Sunnyvale Muni Golf Course, 605 Macara Ave., Sunnyvale, California

CI Editor Speaking at Local Chapters


Recommended