Equation Screeners

Equations let you create highly specific screening criteria using custom, freeform metric comparisons. In an equation, you can use numbers, arithmetic operators (+-*/), comparison symbols (>, <, >=, <=, =), parenthesis, and Boolean operators (and, or). You can also screen on historical data (e.g., last year’s sales or EPS from 5 quarters ago).

To create a screener using equations, first open the screener manager. Then, check the box for ‘Use Freeform Equation’ at the top of Step 2. You will then see the following equation editor in Step 2 of your screener manager:

equation editor

You can edit the equation in two modes:

Assisted Mode (default) eases the process of adding metrics to your equation by letting you pick metrics from pop-up search results as you type. To insert a metric, simply start typing a metric name into the equation editor and select from the list that appears.

Text Mode lets you edit the equation as plain text so that cut, copy, and paste are fully supported. To enter a metric, type the full metric name in double quotes (for example, “Cash Flow”) into the equation editor.

These modes are selectable by the radio buttons at the top of the equation editor, called out below.

equation editor mode

In either mode, you can always find and select a metric from the left panel to insert it into the equation. Any metric shown with a calendar icon has historical data available for screening.

If you uncheck the ‘Use Freeform Equations’ box, you will go back to the main screener editor. You will not lose any of your saved equations; they will still be included in your screening criteria.

Assisted Mode

Assisted mode is the default mode for using the equation editor. To add a metric to the equation, simply begin typing the metric name in the equation form to call up a list of dynamic search results, as shown below.

searching for a metric

If you select a metric, it will be added to the equation box. If you have selected a metric with historical data (which would be shown with a calendar icon), it will default to the current value, but if you click the ‘Now’ box, it will reveal a menu where you can select from quarterly or yearly data, example shown below.

screening with historical data

From here, you can use arithmetic operators (+,-,*,/), the pow() and exp() functions for powers and exponents, comparison symbols (<, >, <=, >=, =), parenthesis, and Boolean operators (“and”, “or”) to create an equation. A comparison symbol is necessary to make an equation valid.

You can enter numerical values into the equation, use any other metric, or use any supported historical data. Below, you can see that the equation is set up to screen for stocks whose sales are 15% greater than they were a year ago, or for stocks whose EPS this quarter is 10% or greater than its EPS last quarter.

screening with an equation

Text Mode

The advantage of text mode is that it supports copy and paste. So, for example, you could easily share equation criteria with others, or you could create multiple variations on the same basic equation easily by copying and pasting. However, because the equations in text mode are entered in plain text, you must be careful to enter the equation using the precise terms and conventions. All metric names must be entered in double quotes and fully spelled out (for example, use Price/Earnings instead of P/E). The following image shows a correctly-entered equation.

equation in text mode

Like in assisted mode, metrics entered in text mode will default to the current period (“Now”). For example if you enter “Cash Flow” in your equation, it will use current cash flow values. However, you can change the period by entering a different period in brackets following the metric name, for example [Y1 for 1 year ago or [Q1] for 1 quarter ago. The above image shows an equation comparing the return on asset values from 5 and 6 years ago.

If you’re equation is not entered correctly, you will receive an error message saying that the equation is invalid. See the next section to learn how to test your equation to make sure that it is valid.

Testing and Saving Equations

You can test any equation to make sure it is valid simply by clicking the button that says ‘Test’ at the bottom of the equation editor. That will open up a small window of information like the following:

test equation

As called out in red above, you will see a message that tells you whether or not the equation is valid and, if it is valid, how many stocks pass the filter. Below that, you’ll see sample values for the metrics included in the equation (in the image above, the sample values shown are for Agilent Technologies). You can change the sample ticker using the search form.

Click ‘Close’ to close the Test window and continue editing your screener.

Click ‘Save ’ when you are finished editing an equation, and the equation will be to the criteria in Step 3, with the number of passing stocks listed just below. After you’ve saved your equation, it will still appear in the equation box, so click ‘Create New Equation’ to clear the box for a new equation. Or, you can uncheck the ‘Use Freeform Equation’ box to go back to the regular screener setup.

screening with an equation

Please note the following limitations of screener equations: Currently screener equations are used strictly as filtering criteria and cannot be weighted using the ranking feature. However, you can use equations and ranking on non-equation criteria in the same screener. Equation criteria will also not be included when you apply a screener to the table.