view the stockworm user manual
Contents
Data Coverage
Navigation
Home
Stock Analysis
My Portfolios
Investing Tools
   Rule Sets
      Grouping of parameters in rules
   Custom Expressions
   Autoinvestor Strategies
   Autoinvestor Simulations
   Screeners
   Trading Signals
Community

Rules sets are used with screeners and autoinvestor strategies to describe groups of stocks. As the name implies, a rule set is created by assembling a series of rules. When the rules are evaluated sequentially on a given day, a list of stocks matching the rule set results. Rule sets can be as simple or as complicated as you wish to make them. The following is a plain-text description of a rule set, followed by a screen-shot of a screener implementing this rule set:

  • start with all stocks in the stockworm database
  • limit the list to small cap and greater stocks
  • limit the list to stocks which have a six month price momentum of one or greater (this means that the stock price has either stayed the same or risen over the previous six months)
  • sort the remaining stocks based upon a combination of:
    • earning growth this year (high to low)
    • price/ebo ratio (low to high) - this means that the stock is undervalued based upon the ebo valuation model
    • 6 month momentum (high to low) - high price growth
    • price/proxy ratio (low to high) - this means that the stock is undervalued based upon the proxy valuation model
  • keep the 32 highest ranked stocks based upon the above sorting criteria

Screener and trading signal rules

Screener rules (e.g. add stocks in screener) and trading signal rules (e.g. trading signal filter) provide a very powerful means for describing elements of your investment strategy. When you add one of these rules to your rule set, you will be presented with a default screener or trading signal which you will most likely want to change to one of your choosing. To do this, click the 'import' link next to the rule, select and optionally rename your screener/signal from the dialog window which appears, then hit 'import'.

Once a screener or signal is imported, you can go to the stockworm screener or trading signal section and change or even delete the screener without having any effect upon the autoinvestor rule. This is because the rule truly imports the settings for the screener or trading signal and therefore doesn't have any dependency on your saved settings. If you would like for your changes to appear in your strategy, simply re-import the screener or trading signal after making the desired changes.

Rule descriptions

The following table describes each trading rule which is available for selecting stocks using screeners and autoinvestor strategies. There are some additional rules used to close open positions which are discussed in the classic strategies section.

open rule description
add all stocks add all of the stocks in the stockworm database to the list of stocks (excludes stocks which are delisted on a given date)
add market index stocks add all of the stocks which are members of a selected index (e.g. sp1500) on a given date to the list of stocks. Note that Stockworm only has records of these index members back to 2000 (dow and standard and poors indices) and 2002 (other indices), so simulation dates should be limited when using this rule.
add stocks in screener add all of the stocks returned by a given screener to the list of stocks
add stocks with market cap limits add all stocks which pass the given market cap limits
add stocks with price limits add all stocks which pass the given price limits
add symbols explicitly specify a list of candidate stocks for open positions
avoid wash sales this rule prevents the autoinvestor from re-opening a position which has been closed at a loss within the last 30 days (a wash sale). This rule is included in strategies only (not screeners).
blackout time blackout time is a period of time after a position is closed during which the strategy is forbidden to acquire the stock. This rule is included in strategies only (not screeners).
exclude market index stocks Exclude all of the stocks which are members of a selected index (e.g. sp1500) on a given date from the list of stocks. Note that Stockworm only has records of these index members back to 2000 (dow and standard and poors indices) and 2002 (other indices), so simulation dates should be limited when using this rule.
excluded symbols open position recommendations will never be issued for any stocks in the excluded symbols list
filter stocks remove stocks from the list which do not fall within the minimum and maximum limits that you provide (e.g. remove stocks with a price-to-earnings ratio greater than 20)
filter stocks by medians remove stocks from the list which do not fall within the median limits that you impose. the median options include medians for the market as a whole (market median), median for the respective industry of each stock (industry median) or the median for the current list of stocks (stock list median). various comparison operators are available (greater than, less than, etc.)
filter stocks - custom remove stocks from the list which fail to meet your included custom filter
historical high price filter keep stocks which have a closing price which falls within the specified minimum and maximum percentage of each stock's respective historical high price. for example, you could keep all stocks which are within 70% and 90% of their respective 1 year high price.
hold stocks by list position This rule will move a current holding to the top of the list if the holding is within the top 'n' positions in the list. The purpose of this rule is to stabilize a strategy by making sure that current holdings are moved to the top of the list unless they fall outside of the top 'n' stocks in the rule set.
keep stocks by list position This rule takes the list of stocks which have been created by previous rules and limits the list by the respective position of stocks in the list. For example, you could keep 10 stocks starting at the 5th position in the list.
limit exchanges This rule filters the list of stocks to include only stocks within the specified exchanges (AMEX, NYSE, etc.).
limit industries This rule filters the list of stocks to include only stocks within the specified industries (Aerospace, Automotive, etc.).
limit issue types This rule filters the list of stocks to include only stocks within the specified issue types (common stocks, adrs, etc.).
limit market index stocks This rule filters the list of stocks to include only stocks which are members of a selected index (e.g. sp1500) on a given date from the list of stocks. Note that Stockworm only has records of these index members back to 2000 (dow and standard and poors indices) and 2002 (other indices), so simulation dates should be limited when using this rule.
liquidity The liquidity rule is used to limit the effect of large purchases upon the price of the stock. For example, a 5% liquidity setting means that stocks any stock which an autoinvestor strategy would require the portfolio to purchase more than 5% of the average daily trading volume would be eliminated from the list of stocks. This rule is included in strategies only (not screeners).
market cap limits This rule filters any stocks which fall outside of the specified market cap range.
market signal open rule the market signal rule is used to prevent the rule set from recommending any stock purchases when the market is not in a 'buy' or 'sell' state for the given technical signal. the 'market' is defined by the dow jones, nasdaq, s&p 500 or a custom symbol. You can specify the maximum number of periods since the market signal occurred from 1 period ago (most recent) on up. specifying 0 or leaving the maximum periods field blank will allow stock purchases as long as the market is in the appropriate signal state ('buy' or 'sell') regardless of when the signal occurred.
market trend rule the market trend rule is used to prevent the rule set from recommending any stock purchases when the market is trending in an undesired direction. The 'market' is defined by the dow jones, nasdaq, s&p 500 or a custom symbol. The 'trend' is defined as a rising or falling value of the market symbol over a time period which you specify.
maximum hold time This rule is used to remove any stocks which are in the current list which have been held for longer than the specified holding period within the time period of consideration. This rule is included in strategies only (not screeners).
minimum hold time This rule is used to move current holdings to the top of the list if they have been held for less than the minimum hold time. This rule is included in strategies only (not screeners).
maximum stocks per industry This rule takes the list of stocks and limits the number of stocks from each industry to the value set by the user. The rule is used to assure industry diversification in the result set.
move current holdings This rule searches the list of stocks produced by prior rules and, if any current holding are found, they are moved to the top or bottom of the list (per your specification). This rule is used to somewhat limit trading volatility by increasing the ranking of current holdings in the list of stocks. This rule is included in strategies only (not screeners).
price limits any position which is opened by the autoinvestor has a stock price greater than or equal to the minimum price and less than or equal to the maximum price.
rebalancing hold time This rule is used to either move current holdings to the top of the list or isolate the list to current holdings unless it is time for, e.g. quarterly rebalancing, in which case the holding's list position is unaltered. When used as the last open rule, this is very close to using the strategy 'rebalancing' setting. The purpose of this rule versus the strategy 'rebalancing' setting is that extra rules (e.g. stop gain or loss) can be added after the rebalancing hold rule. You can therefore create a strategy which rebalances, e.g. quarterly, *unless* a position has a stop gain or loss, in which case the position would be replaced. This rule is included in new strategies only (not screeners or classic strategies). Please note that the global trading frequency setting (near, e.g. 'stock count' and other parameters) should be 'daily' when this rule is in use to avoid unexpected results.
remove stocks in
(not in) screener
remove all stocks from the list of open candidates which appear (do not appear) in the selected screen (you can optionally reorder the list based upon the screener results as well). This rule is included in strategies only (not screeners).
sort stocks by similarity The similar sort rule allows you to order your list the best to worst match to the financial parameters of a stock or list of stocks which you enter (if more than one stock is entered, the screener will develop an average profile of the stocks in this field). The rule has the option of establishing a financial profile based only upon fundamentals (default), based only upon technicals or based upon both. The data for the similar stocks' financial profile can come from today or from a variety of times in the past. If, for example, you would like to screen for stocks which are similar to the financial profile of another stock six months ago, then you would select '6 months ago' in the from field. This rule is best suited for use with screeners to, e.g. find stock similar to some of your favorites. The rule does not have a logical application to strategies.
sort stocks The sort stocks rule allows you to sort stocks by any of the financial parameters provided in the selection box, based upon Stockworm's financial rankings. You can sort the stocks from high to low, low to high or from median to extremes, based upon your sort order selection. You also have the option of sorting based upon the relative position of a given stock parameter within the market as a whole, within the respective industry of the stock, or both.
sort stocks - custom The custom sort rule allows you to sort the stocks by any custom expression which you desire to use.
sort stocks - multi The sort stocks multi rule provides you with the same ranking based sort options as the sort stocks rule except that you can simultaneously sort by multiple factors (just keep selecting from the 'add sort item' until you have all of the sort items of interest). For each sort item which you add, you have one additional option which is the importance of the sort item. The more important a given sort item, the more weighting it will be given re-ordering the list of stocks in a combined sort. For example, consider a two-item multi-sort rule with the first item being 'very important' and the next item being 'somewhat important'. With this example, the results will be much more impacted by a given stock's value for the first sort item than the second sort item.
stop gain/loss The stop gain/loss rule allows you to exclude any stock which you held in your portfolio and then gained or lost a specified percentage upon selling the holding. You can specify the type of gain or loss (standard or trailing gains or losses) and the time period prior to the current day within which a search will be performed for sales matching your rule settings. This rule is included in strategies only (not screeners).
trading signal filter removes all stocks from the list of candidates for which the specified trading signal is not in a 'buy' state for long positions or not in a 'sell' state for short positions. you can specify the maximum number of periods since the signal occurred from 1 period ago (most recent) on up. specifying 0 or leaving the maximum periods field blank will return all stocks with the appropriate signal