Jamie Gritton's MI Backtester

Screen Builder

Build your own screens from Value LineŽ data. Stocks can be selected and sorted using any combination of the supplied data fields, allowing many variations of existing screens, and well as testing completely new ideas.

"Value Line" and "Timeliness" are trademarks of Value Line.

through
Starting in
Holding Period: months
Name:
menu mode

General instructions

Run the tester over the specified range of years. Available data runs from 1986 through 2011 for most screens. You may start at any month of the year, but other than January can only run through 2010/2011.

Stocks are picked from the screens every holding period (between 1 and 120 months) and held for that period.

Instead of selecting from the available screens, you may choose to enter codes from any of the backtesters to create hybrid tests. Simply copy the link listed at the top of a run & paste into the form. Also see the backtester code guide.

$ initial investment
Fixed allocation
Add $ every months
Rebalance: never always
every months
$ commission, % spread
Short-term tax: %
Long-term tax: %
Pay taxes every:
Trade day(s) after rankings

Trading simulation

Start with an initial investment. You may also add more money periodically. You can also subtract from the portfolio by adding a negative amount.

Instead of adding or subtracting a fixed amount, you can elect to keep the portfolio at a fixed allocation. This is useful for testing costs without considering the effects of compounded growth, to see what your money might do this year.

Normally, the stocks held in a screen are rebalanced on every trade. You can also specify to never rebalance, which may allow one stock to dominate a screen as it grows, or rebalance at a fixed interval (which must be a multiple of the holding period).

You can pay a fixed commission (which is applied to every buy and sell) as well as a percentage spread (half applied on buy, half on sell).

Capital-gains taxes can be applied, both short-term and long-term. Taxes may be taken out on every trade, quarterly, or annually.

Screen rankings come out on Friday, and backtests are typically done with the closing prices on the next Monday, one day after the rankings. This lag between ranking and trading can be varied from zero days (trade on Friday) and upward.

Timeliness™ -
more rules

Screen Builder instructions

Screens are built from a series of rules. Each rule is a filter that excludes stocks that don't pass - a stock must pass all rules to be selected. You may start with all stocks, restrict to a selected range of Timeliness™ ranks.

Rules (except optional initial backtest code or Timeliness™) are generally entered as algebriac/programming expressions of Value LineŽ data fields and numbers (and ocasionally quoted strings), with the comparison operators (= != > < >= <=), arithmetic operators (+ - * / **), and parentheses. The boolean operators "&" (AND) and "|" (OR) can be used to satisfy multiple conditions in a single expression. The field (column) names are represented by 3 or 4-letter codes, as explained in this field guide.

Sort rules are entered using the keywords "top" (i.e. descending) and "bottom" (i.e. ascending), followed by a number. Tie-breakers can be included as a comma-separated list of expressions before the "top" or "bottom". You may select a percentage of the current stock list (rounding down), instead of a fixed number of stocks, by appending a "%" to the number.

Some screens are built with fields that don't exist during the entire backtest period. To extend the backtest further in these cases, you can assign replacement values to missing fields. Use the special form "(fld1 | fld2)" to use the field fld2 when fld1 is unavailable. Similarly, you can use a constant when a field is unavailable, e.g. "(fld1 | 0)". Many screens also use total-return fields not available from earlier Value LineŽ data (such as tr4w - Total Return 4-Week), but this is handled automatically from the daily price data.

All this may sound pretty complicated. It is, but not unreasonably so. For example, here's the popular PEG screen. If you can make sense of that, you should be able to build your own screens as well. There's also a simpler method of building (simple) screens using pull-down menus of some fields, and a single comparison or sort operator. Only some fields are available (those that existed before 1997) and no arithmetic expressions are possible. Still, this is sufficient for many screens.