INVITE-ONLY SCRIPT

Financial Ratio Analysis (with / without Competitors)

Updated
What Is Financial Ratio Analysis?
Financial Ratio Analysis is a quantitative technique used to assess a company's liquidity, operational efficiency, and profitability by examining its financial statements, including the balance sheet, income statement, and cash flow statement. It provides valuable insights into a company's performance over time and allows for comparisons with other companies within the same industry or sector.

What Are the Uses of Financial Ratio Analysis?
Analysis of financial ratios serves two main purposes:

1. Track company performance
Determining individual financial ratios per period and tracking the change in their values over time is done to spot trends that may be developing in a company.

Current Ratio for Adobe Inc. ADBE
snapshot

2. Make comparative judgments regarding company performance
Comparing financial ratios with those of major competitors enables the identification of whether a company is performing better or worse than the industry average. This comparative analysis aids in understanding the company's competitive position and potential areas for improvement.

For comparison, the script would automatically select a maximum of 5 competitors from the US markets based on the ticker's industry. This ensures a relevant comparison with industry peers to evaluate performance and assess competitive positioning.

To compare the Free Cash Flow Margin of Apple Inc. AAPL with its competitors.
snapshot

To compare the Free Cash Flow Margin of Apple Inc. AAPL with its competitors’ average.
snapshot

Customized competitors list
To customize your own competitors list, you can specify the companies or tickers you want to include in the comparison. This allows for a tailored analysis based on your specific preferences and industry knowledge.

Example:
To compare PayPal PYPL with MELI , DLO, and PAY, users can input the following text into the competitors list:

NASDAQ:MELI,NASDAQ:DLO,NASDAQ:PYPL,NYSE:PAY;

This will ensure that the comparison includes these specific companies alongside PayPal.
snapshot

Financial ratios are grouped into the following categories:
  • Liquidity ratios
  • Leverage ratios
  • Efficiency ratios
  • Profitability ratios
  • Market value ratios


Liquidity Ratios
Liquidity ratios are financial ratios that measure a company’s ability to repay both short-term and long-term obligations.

Current Ratio measures a company’s ability to pay off short-term liabilities with current assets:
Current ratio = Total current assets / Total current liabilities

Cash To Debt Ratio measures a company’s ability to pay off short-term liabilities with cash and cash equivalents. A high ratio indicates a company can pay off its debt and remain solvent into the foreseeable future. In addition, it also means that if necessary, the company can take on a larger amount of debt because it has the cash to support that.
Cash to debt ratio = Cash and Short Term Investments / Total debt

Leverage Financial Ratios
Leverage ratios measure the amount of capital that comes from debt. In other words, leverage financial ratios are used to evaluate a company’s debt levels.

Debt To Assets Ratio measures the relative amount of a company’s assets that are provided from debt. This indicator is a measure of assets that are growing at the expense of debt. Because of this, you can see how a company acquired its assets over time. It can be used to assess a company's ability to meet its current debt obligations.
Debt to assets ratio = Total debt / Total assets

Debt To Equity Ratio calculates the weight of total debt and financial liabilities against shareholders’ equity:
Debt to equity ratio = Total liabilities / Shareholder’s equity

Interest Coverage Ratio shows how easily a company can pay its interest expenses:
Interest coverage ratio = Operating income / Interest expense

Efficiency Ratios
Efficiency ratios, also known as activity financial ratios, are used to measure how well a company is utilizing its assets and resources.

Research & Development (R&D) Expense to Revenue Ratio measures the percentage of sales that is allocated to R&D expenditures.
R&D to revenue ratio = Research and development expense / Total revenue * 100%

Asset Turnover Ratio measures a company’s ability to generate sales from assets. The higher it is, the more efficient the company is, since higher ratios mean that the company generates more income per dollar of assets. Conversely, if the company has a low Asset turnover, this indicates that it is inefficiently using its assets.
Asset turnover ratio = Revenue / Average total assets for two periods

Inventory Turnover shows how quickly a company sells its stock. A low turnover can mean weak sales, while a high one can mean good sales or insufficient stock. Inventory turnover is an important indicator of a company's performance.
Inventory turnover = Cost of goods sold / Total inventories

Days Sales Outstanding measures the average number of days it takes for a company to collect cash from credit purchases.
Days sales outstanding = Average Accounts Receivable / Revenue x 365 Days

Days Inventory shows the time in days that is spent turning a company's inventory into sales. This metric is an indicator of a company's inventory management. Low values are preferred for Days Inventory, which means items are selling faster and there is a quick turnaround. Large values indicate that a company has invested too much in stocks and does not have time to sell them.
Days inventory = Average inventories / Cost of goods sold * Days in period

Profitability Ratios
Profitability ratios measure a company’s ability to generate income relative to revenue, balance sheet assets, operating costs, and equity.

Gross Margin compares the gross profit of a company to its net sales to show how much profit a company makes after paying its cost of goods sold:
Gross margin % = Gross income / Total revenue * 100

Operating Margin, sometimes known as the return on sales ratio, compares the operating income of a company to its net sales to determine operating efficiency:
Operating margin = Operating income / Revenue * 100%

Free Cash Flow Margin is a profitability ratio that compares a company's free cash flow to its revenue to understand the proportion of revenue that becomes free cash flow. The higher the percentage, the more cash is available from sales. A company that shows an increasing cash flow margin from year to year is certainly getting stronger with time. This is a good indicator of its probability for long-term success.
Free cash flow margin = Free Cash Flow / Total Revenue

Return On Assets measures how efficiently a company is using its assets to generate profit. A high ROA indicates that a company successfully converts invested money into income.
Return on assets = Net income before discontinued operations / Total average assets

Return On Equity measures how efficiently a company is using its equity to generate profit:
Return on equity = Net income / Shareholder’s equity

Revenue Growth refers to the increase in a company’s total revenue or income over a specific period
Revenue growth = (Current period revenue - previous period revenue) / Previous period revenue * 100%

Earnings Per Share Growth illustrates the growth of earnings per share over time.
Earnings per share growth = ( Current period EPS - previous period EPS ) / Previous period EPS * 100%

Operating Cash Flow Growth is the long term rate of growth of operating cash, the money that is actually coming into the bank from business operations.
Operating cash flow growth = ( Current period operating cash flow - previous period operating cash flow) / Previous period operating cash flow* 100%

Market Value Ratios
Market value ratios are used to evaluate the share price of a company’s stock.

Book Value Per Share calculates the per-share value of a company based on the equity available to shareholders. In case of the company liquidation, the book value per share shows the monetary value remaining for common shareholders after all assets are sold and all debt is paid. If a company’s Book value per share is higher than a market price of its share, then the stock may be considered undervalued.
Book value per share = Total common equity / Total common shares outstanding

Dividend Yield measures the amount of dividends attributed to shareholders relative to the market value per share:
Dividend yield = Dividends TTM for the primary issue excluding special dividends / Price of the primary issue

Diluted Earnings per Share (Diluted EPS)
EPS stands for earnings per share. Investors use EPS to measure how much money a company makes for every outstanding share the company has. Diluted EPS is slightly different in that it measures the earnings per share for a company if all convertible securities (such as preferred stocks, convertible debt instruments, stock options and warrants) were used to calculate the metric.
Release Notes
Solved pine script token limitation issue.
analysisEarningsfinancialFundamental AnalysisGrowthratio

Invite-only script

Access to this script is restricted to users authorized by the author and usually requires payment. You can add it to your favorites, but you will only be able to use it after requesting permission and obtaining it from its author. Contact theartofinvest for more information, or follow the author's instructions below.

TradingView does not suggest paying for a script and using it unless you 100% trust its author and understand how the script works. In many cases, you can find a good open-source alternative for free in our Community Scripts.

Author's instructions

Visit https://buy.stripe.com/aEU3fQ8XweEa6LCfZ0 for 30-days FREE Trial.

Want to use this script on a chart?

Warning: please read before requesting access.

Our in-house analysis tools:

Intrinsic Value Calculator
buy.stripe.com/14kcQq1v40Nk3zq3cc

Fear and Greed Index
buy.stripe.com/14k2bMa1Acw2ee4fYZ

Financial Ratio Analysis
buy.stripe.com/aEU3fQ8XweEa6LCfZ0
Also on:

Disclaimer