8699STrs15) is the backtest's "code" and is everything you need to know to reproduce the test run. It's also known as the "URL code" since it's found in URLs that point to a particular test run.
All codes are of the form:
The general options at the beginning of the code mostly come from the trading simulator. They may appear in any order, though they should come after the year/month numbers. The options are:
The last part of the code is interpreted by the specific tester used.
They generally share a common format of one or more screen codes followed
by options. All testers use the same screens codes, which come on one of
three forms. Many common screens have built-in two-letter lowercase
codes and are accessible through drop-down menus in the backtest entry
In addition to actual screens, there are two-letter codes to some indices and other pesudo-screens:
For example, the standard screen "RSW" (10 stocks) can be referred to in these three ways (among others):
Ss is a screen code, followed by two 1-or-2 digit numbers, which
are the ranks to buy. Note the two numbers are run together without any
spaces or other separators. A 2-digit code is easy, e.g.
is ranks 1-5. A 4-digit code is two 2-digit ranks,
1025 is ranks 10-25. A 3-digit code is a 1-digit rank
and a 2-digit rank. e.g.
110 is ranks 1-10.
This "from-to" rank encoding appears in many other testers as well.
T# # | ss)
X] rule [
A screen is defined by a series of rules, separated by uppercase
X". Rules are made up of field names,
numbers, strings, and algebraic operators. The
first rule may also be a Timeliness™ range marked by a capital
T" and two digits, or a screen code.
The field names are made up of lowercase letters and digits, and are
listed in the Screen Builder Field Guide.
Numbers consist of digits and an optional decimal point. Strings are any
text surrounded by capital "
Q" (see below); all letters in
strings must be lowercase, and all non-URL symbols must be properly
encoded. Operators (and a few other related symbols) are capital letters
with the following encodings:
Syntactically, a rule is any free-form concatenation of the above parts. But in reality, it must make sense to the computer.
s) #] [
First, the screen codes are listed for all screens used in the SOS. Next
comes the number of positions to use per screen. Then the maximum score
is preceded by a lowercase "
m" (defaults to the number of
positions). If the SOS must match a minimum number of screens, that
number is preceded by a lowercase "
s" (or a lowercase
u" if the screens should be unique). If there's a limit of
stocks to select, it's preceded by a lowercase "
not a one or an uppercase "
I"). This limit code is used in
h#] ... [
For each screen in the blender, the following:
First, the screen code, optionally followed by the ranks for that screen (if the screen isn't a backtest code). Optionally, a percentage of the portfolio to allocate to that screen (defaults to split evenly) preceded by a lowercase "
p", and a holding period preceded by
By default, the blender (as opposed to the sceens within the blend) is
rebalanced annually. A different rebalance period may be specified with
b", which may be 0 to never rebalance.
First, the screen codes for the two screens to overlap. This is followed
by a single-digit pad code: 0=none, 1=first, 2=second, 3=both. Then the
ranks to hold in the Standard format. If there's a limit of stocks to
select, it's preceded by a lowercase "
First, the screen code the the "buy" screen, followed by the "transition"
screen if there is one. Next are the ranks to buy. The "sell below"
rank, if any, is preceded by a lowercase "
s". If there's a
"sell below" rank for the transition screen, it's preceded by a lowercase
t# | # #) [
First, the screen code, followed by the trading period. In "dozens" mode,
i.e. buy some number of stocks not already held, the number of stocks per
period is preceded by a lowercase "
t". In "dual semi" mode,
indicate the ranks to hold in the Standard format.
A rebalance code may be specified: "
n" for no rebalancing,
m" for margin rebalancing, "
c" for cash
rebalancing, and "
s" for cash rebalancing with a shown
balance. If no code is specified, it defaults to "
First, the screen codes are listed for the index, the low screen, and the high screen. The index may be a regular screen code, or one of the following index codes:
||Dow Jones Industrial Average|
||S&P 500, dividend-adjusted|
After the screens are the ranks to buy/compare (unless the screens are
backtest codes, in which case all ranks are used). The number of periods
to look back is preceded by a lowecase "
p", and the
percentage cutoff for the index screen is preceded by a lowercase
c". The hold-'till-switch option is specified by a
The all-months codes don't include the mm part of the standard code header, since there is no one month associated with the summary.
First a screen code, followed by the ranks to use. If the screen is a backtest code, no ranks are specified.
t) # [
First, the screen code to pick options from. Next are the ranks to use
(unless the screen is a backtest code, in which case all ranks are used).
The volatility percentage is preceded by a lowercase "
Then for each option category:
First, an option code:
l (long stock),
P (write put),
v (covered call),
d (cash), or
t (T-bills). Next, the percentage
of the portfolio to put into this option type. For call and put options,
the %OTM is preceded by a lowercase "
o" and the number of
months out is preceded by a lowercase "
First, one or more screen codes, followed by the limit of stocks to
select, if any. The code "
s" indicates a seasonal crystal ball.
First, the screen code, followed by the ranks to consider. If there's
limit of stocks to select, it's preceded by a lowercase "
First, the screen codes are listed for all screens compared. Next are
the ranks to buy/compare (unless the screens are backtest codes, in which
case all ranks are used), then an "
s" for "seasonal" lookbacks
or an "
x" for regular lookbacks, followed by the number of
years or periods to look back.
o# #] [
First, the screen codes for the two screens to overlap, and the ranks to
consider for the freshmen test in the Standard format. Next comes the
ranks to use for the overlap, preceded by a lowercase "
If there's a limit of stocks to select, it's preceded by a lowercase
s] # # [
For each overlap to try, the following:
First, the screen codes for the two screens to overlap. A lowercase "
f" for a freshmen overlap, and a lowercase "
to pick the second overlapped stock. Then come the ranks to overlap in
Standard format (the
s option must
precede this). If there's a limit of stocks to select, it's preceded by
a lowercase "
pq12", which is PEG13 1-2.
Nothing to it, really :-).