Please Note: Equations and Custom Metrics are a Premium Plus feature
Contents
In this post we’ll explore two powerful capabilities in Stock Rover; Equations and Custom Metrics.
We should begin by answering the question “What exactly are Equations and Custom Metrics?”
And to answer that question, we need to back up a bit and first answer the question “What is a Metric?”
Metrics are a foundational part of Stock Rover. They are things that have names and values. For example the current price to earnings ratio of a company, or the amount of debt a company has on its balance sheet. The values will vary for a given stock or ETF. More complex calculations, such as the Piotroski F Score are also metrics in Stock Rover.
Metrics can also be historical. For example, the amount of dividend per share a company paid 3 years ago or a company’s sales 7 years ago.
Out of the box Stock Rover comes with some 700+ metrics that cover areas such as growth, profitability, financial strength, capital efficiency, price performance, momentum, dividends, analyst ratings, stock ratings, industry and sector deciles, financial statement data, and more.
Stock Rover has many advanced metrics such as the Piotroski F-Score, Price to Graham Number, Shiller P/E, Margin of Safety, Beneish M-Score and the Altman-Z score.
Metrics are used as the columns within a View in the Stock Rover Table.
Metrics can also be used as filters when screening stocks or ETF’s. For example, find me all the stocks that have a dividend yield more than 2% and a payout ratio of less than 30% in the S&P 500.
In Stock Rover, equations contain one or more metrics along with arithmetic operators and possibly functions. They are used to compute a more complex number from one or more input metrics.
Equations are used in two ways in Stock Rover. The first is to compute a new metric from existing metrics. The second is to create a more complex filtering criteria within a screener.
Custom Metrics utilize equations to create a new named metric that you can use as a column in the Stock Rover Table or in filtering criteria for a screener.
Once created, Custom Metrics act as if they are built-in metrics within Stock Rover. This allows you to create more complex metrics from the over 700 base metrics Stock Rover provides.
Both Equations and Custom Metrics will be explained more fully in subsequent sections of this blog.
For the vast majority of use cases, the built-in metrics in Stock Rover will do 100% of the job. You can easily browse all of the over 700 the metrics Stock Rover provides via the Stock Rover Metric Browser.
Before we make the jump to custom metrics and equations, let’s take a brief look at how Stock Rover deals with built-in metrics. We will begin with a screener filtering example.
We begin by accessing the Screener Manager, both to see and to change which metrics to screen and what criteria to screen on. To access the Screener Manger, we…
Below, we see the Growth at a Reasonable Price (GARP) screener in the Screener Manager. Here, we can see the key GARP metrics being used as filters for the screener. All of the filtering conditions use the built-in metrics and a simple comparison operator.
Below we show using metrics as the columns in the Table for comparative analysis.
Despite the power of Built-In Metrics, there are cases where out-of-the-box metrics may not provide the exact data an investor is looking for. For these situations, Stock Rover provides Equations and Custom Metrics. Let’s begin with Equations.
Equations are formulas that are constructed from the built-in metrics of Stock Rover along with arithmetic operators. Equations can reference both the current and the historical values of the built-in metrics. They can also use built-in functions to aide in creating more sophisticated formula expressions.
Equations are used both in screening for more complex filtering operation, and in Custom Metrics to define how the custom metric should be computed.
Considering screening first, equations are appropriate when filtering based on a simple threshold won’t do. Our first set of examples show how to compare two Stock Rover metrics against each other.
The example equation is filtering for tickers that are in industries that are outperforming the S&P 500 over the last month.
“1-Month Return vs Industry” < "1-Month Return vs S&P 500"
Note this equation is a bit counter-intuitive because the input metrics are each comparing the ticker to the industry and to the S&P 500. So for example if a stock is outperforming the S&P 500 by 10% and the Industry by 5%, it would mean the industry is outperforming the S&P 500 by 5%. This equation captures that fact.
Let’s take a look at another equation example using the “Improving Analyst Ratings” Screener. This screener is filtering for stocks with increasingly favorable analyst ratings. This screener is available for import from the Investor Library.
The screener consists of 5 equation-based filters that are each evaluating Analyst Ratings metrics against each other as follows:
The advanced screening criteria returned 45 out of 14,375 tickers.
One of the most powerful features of equations is the ability to compare current and historical data. Stock Rover maintains history which can be used to perform time-based filtering.
The time periods that are accessible in an equation are:
Note: For a complete list of historical metrics please consult the Metric Browser where each metric is listed along with a “No” or “Yes” status for History.
The GARP Premium Plus screener shown below demonstrates how to use a combination of threshold-based screener filters and historical equation filters to find companies that exhibit Growth at a Reasonable Price (GARP) characteristics.
The historical equations are performing time-based filtering, looking for tickers that are showing increasing EPS, Sales, and Operating Income growth:
The equations highlighted in red and listed below are filtered based on historical values. The equations referencing Earnings Per Share, Sales, and Operating Income are filtered for consecutive Trailing Twelve Month increases last year and this year.
Note that the value between the brackets indicates which time period to access. [Now] means the trailing twelve months starting from the most recent period. [TTM1] means the trailing twelve months period starting from one year ago and going back 12 months. [TTM2] means the trailing twelve months period starting from two years ago.
The Vintage Value Investing’s Wealth Builder Screener which is available in the Investor Library, showcases how to use equations to create complex filtering criteria.
Below are examples of some of the equations used in the screener:
“EPS [Now] ” > “EPS [Y5] ” and “EPS [Y5] ” > “EPS [Y9] ”
(( “Return on Equity [Now] ” + “Return on Equity [Y1] ” + “Return on Equity [Y2] ” + “Return on Equity [Y3] ” + “Return on Equity [Y4] ” + “Return on Equity [Y5] ” + “Return on Equity [Y6] ” + “Return on Equity [Y7] ” + “Return on Equity [Y8] ” + “Return on Equity [Y9] ” )/10)>=15
“Long Term Debt [Now] ” <=(5* "Net Income [Now] " )
Below are two advanced examples of using the power of equations to create sophisticated screener filtering criteria.
The example below shows the use of Boolean logic in an equation.
Our equation is filtering for tickers where the EPS for the most recent quarter exceeded 1 quarter ago by 20% and the EPS of 1 quarter ago exceeded the EPS of two quarters ago by 10%. In other words accelerating earnings over the past two quarters.
In an equation, you can use numbers, arithmetic operators (+ – * /), comparison symbols (>, <, >=, <=, !=, =), Boolean operators (e.g. and, or), functions, and parenthesis for proper nesting. There are also equation screener functions which takes filtering to the next level.
For example, Stock Rover maintains history for the Tangible Equity Per Share metric going back 10-Years, but not the compound annual growth rate. What if we wanted to filter on a CAGR > 10%?
The equation below is shown in the Equation Editor, This example is using multiple equation functions to filter and return tickers where the Tangible Equity Per Share grew at a compound annual growth rate of at least 10% over the last 7 years.
In the example below we are going to build a screener from scratch that will consist of a single screener filter that is in the form of an equation.
The screener is going to filter for tickers with a quarterly Sales increase. The filter will only let tickers through where the Sales for the most recent quarter exceeds the quarterly Sales value from 1 quarter ago.
The finished equation will look as follows:
“Sales [MRQ]” > “Sales [Q1]”
Step 1: Launch Screener Manager
We are going to launch the Screener Manager and tell Stock Rover that we would like to create a new screener. The Screener Manager will then expose the Create Screener pane where we can add the appropriate filtering criteria.
From the Create Screener pane we can create filters using any combination of these options:
Step 2: Select the Equation Editor
Clicking on the “Add Free Form Equation” button launches the Equation Editor.
Step 3: Build the Equation
We want our equation to start with the metric for Sales.
As Stock Rover maintains some 700+ metrics – we’ll go to the search box under “Metrics and Functions” and search for the desired metric.
The search returned a number of sales-related metrics along with their descriptions – we’ll select “Sales” which is highlighted in blue from the list.
When a metric that has history is selected it will appear along the top next to the “Test” button as well as in the editor. Only metrics with history appear next to the Test button.
The editor is showing “Sales[Now]” as the first part of our equation. Sales[Now] represents the total sales over the past 12 months.
We want the Sales for the most recent quarter value, so we’ll click on the edit button to change the metric to reference the desired time period.
We can now select the time period for the first part of our equation.
History can be selected as follows:
To build the second part of the equation we’ll repeat searching for and selecting Sales.
We’ll then edit the time period and choose the time period from “1 Quarter Ago”.
Note: When you are comfortable with the syntax you can also simply type freeform into the Equation Editor.
Below we see that the equation “Sales [MRQ]” > “Sales [Q1]” has been created.
Clicking the Test button verifies the equation syntax is correct.
We tested using IBM – and see the Most Recent Quarter and 1 Quarter Ago values displayed and no errors.
Once we’ve added the filter we can confirm by clicking “OK”.
Step 5: Add the Equation to the Screener
The equation filter is now added to the Screener.
We can repeat the process to add more filters to the screener via “Add Criteria” and “Add Freefrom Equation” and when we’re done “Save” the Screener.
Custom Metrics allow you to use equations to create your own custom calculation format based on existing metrics. Once created, Custom Metrics act as if they are built-in metrics within Stock Rover.
The following examples illustrate some use cases for Custom Metrics.
We are going to create a new custom metric called “Return vs. Drawdown”. The new metric provides a sense of the risk/reward characteristics of an investment based on the trailing twelve-month return and the maximum drawdown over 5-years.
We are going to use history to create new metric. We will look at ROIC and use its history to compute the average over the last 3 years. The custom metric “ROIC vs. 3 Year Average” is showing how ROIC is faring relative to the last 3 years.
Here we show ROIC vs. 3 Year Average metric added as a new column to the Profitability View in the Stock Rover Table.
Step 1: Launch Custom Metric facility
The Custom Metric facility is accessed via the Actions pull-down in the Table, where we select “Create Custom Metric”.
In the example below we are going to create a Custom Metric that will automatically be added to our current view “EPS by Quarter” which we have highlighted in blue.
Keep in mind, that once a Custom Metric is created it can be added to any other View(s).
Step 2: Select a metric to reference in the Custom Metric
In our example we want to display the EPS value from 8-quarters ago in our Table.
We’ll first enter EPS in the search box that is located under Includable Metrics.
We see that a number of EPS-related metrics along with their descriptions are returned – we’ll select “EPS” which is highlighted in blue from the list.
Step 3: Build and Test the Custom Metric
As we want our Custom Metric to display in dollars and cents, we’ll first change the “Display Format” by selecting it from the pull-down.
The Custom Metric equation syntax is identical to that of Screener equations.
The editor is showing “EPS[Now]”. EPS[Now] represents the EPS over the past 12 months. However, we want the EPS value from 8 quarters ago, so we’ll click on the edit button to change the time period.
We’ll select “Quarters” and “8 Quarters Ago” and then click OK.
We can see our metric is now referencing EPS[Q8].
Selecting “Test” verifies the equation syntax is correct. We tested using the ticker APPL – no errors and a value of 64 cents was returned.
Once you are comfortable with the equation syntax you can also type freeform into the Custom Metric facility. In addition, this guide is a good resource when creating a Custom Metric.
The Custom Metric has now been added automatically as a column to the front of the View.
You can rearrange the columns to display in an order that best suits your requirements. In this instance, we did a drag and drop of the “EPS 8Q Ago” column heading and moved it to the end.
The custom View below consists exclusively of Custom Metrics and now is displaying the EPS values for the most recent quarter and for each quarter going back 8-quarters.
Once a Custom Metric is created it can be added to any View just like any other metric by selecting Add Column from the Table.
It is as simple as browsing for the Custom Metric and adding it.
In the example below we searched for “EPS 1” and then want to add the custom metric called “EPS 1Q Ago” as a column to our view.
Custom Metrics can be added to any of the views – be it a custom view, a default view, or any views imported from the Investor Library.
We can also use custom metric as as part of a filtering condition for a screener just like any built-in metric. Here we are using the custom metric we created earlier in the blog, ROIC vs. 3 Year Average, as a screener filtering metric.
Stock Rover comes with an impressive list of capabilities including some 700+ built in metrics.
However, you are not limited to using the built-in metrics “as is”. With Equations and Custom Metrics you can tailor further Stock Rover to address more specific or more advanced data requirements, thereby taking the analytical capabilities of Stock Rover to a whole new level.
Your email address will not be published. Required fields are marked *
Comment *
We value your privacy and will not display or share your email address
Name *
Email *
Website
Δ
This site uses Akismet to reduce spam. Learn how your comment data is processed.