Tongdaxin associates the financial function FINANCE to write fundamental indicator formulas

The associated financial function FINANCE can be used to call some basic financial data of a stock, such as the number of shareholders, asset-liability ratio, total assets, operating income, earnings per share, etc., for fundamental analysis. This article uses the price-earning ratio PE, gross profit margin GPM, return on net assets ROE, price-earning ratio relative to earnings growth ratio PEG as examples to learn how to use some FINANCE functions.

One, Ichi eing rate PE

The price-to-earnings ratio (PE) is a measure of a company's current stock price relative to its earnings per share. It helps investors evaluate a company's valuation level and return on investment.

How to calculate the price-to-earnings ratio:

P/E ratio = market value/net profit = stock price/earnings per share

Generally, the higher the P/E ratio, the more optimistic the market is about the company's future earnings expectations. However, the P/E ratio cannot alone determine the investment value of a stock. The specific situation of the company must also be considered comprehensively. In addition, companies in different industries have different profitability characteristics and Growth prospects, therefore the price-to-earnings ratios of companies in different industries also vary.

There are three common ways to calculate the P/E ratio: static P/E ratio, dynamic P/E ratio, and rolling P/E ratio (TTM). The static P/E ratio uses the latest annual net profit as the benchmark, which reflects the past situation, and the data is lagging; the dynamic P/E ratio uses the forecast value of future annual net profit, paying more attention to the company's future earnings growth potential, but there is uncertainty; The rolling price-to-earnings ratio uses the net profits of the last four quarters, which can reflect the company's situation in a timely manner, but it lacks forward-lookingness.

In the financial function FINANCE related to Tongdaxin, there are two functions for earnings per share, namely:

FINANCE(33), earnings per share, which is the converted full-year earnings.

FINANCE(38), earnings per share, the latest financial report data of listed companies.

Through the FINANCE function, combined with the DYNAINFO function introduced before, only the dynamic price-earnings ratio can be calculated.

PE action:DYNAINFO(7)/FINANCE(33);

However, for the current price-to-earnings ratio, DYNAINFO directly provides relevant functions without writing formulas to calculate it. Regarding the historical price-earnings ratio, this article will not expand on it yet.

DYNAINFO(38);{static price-earnings ratio}

DYNAINFO(39);{dynamic price-earnings ratio}

DYNAINFO(40);{rolling price-to-earnings ratio}

2. Gross profit margin GPM

Gross profit margin (Gross Profit Margin) refers to the ratio of the remaining profit after the company's sales revenue minus the cost of sales to sales revenue. Gross profit margin can be used to measure the company's upstream and downstream status, and often represents a company's moat width and monopoly power. .

Gross profit margin calculation formula:

Gross profit margin = gross profit / sales revenue × 100%

A high gross profit margin indicates that the company can maintain a high profit level in the process of selling products or services, and the company has strong profitability. However, an excessively high gross profit margin may also mean that the price is too high, resulting in a decline in market share.

In the same industry, a higher gross profit margin usually means that the company has strong competitiveness and advantages and can obtain higher sales prices or lower costs in the market. You can evaluate the competitiveness and profitability of different companies in the same industry by comparing their gross profit margins.

Gross profit margin indicator formula:

GPM:=(FINANCE(20)-FINANCE(21))/FINANCE(20)*100;

Among them, FINANCE(20) represents operating income, and FINANCE(21) ​​represents operating costs. Note: These two functions are the latest financial report data of listed companies.

3.Return on Net Assets ROE

Return on equity (ROE) is one of the important indicators to measure a company's profitability, and it is also a financial indicator that Warren Buffett attaches great importance to. By calculating the ratio of the company's net profit and net assets, the company's net profit is compared with shareholders' equity to measure the relationship between corporate profits and invested capital and reflect the income level of shareholders' equity.

Return on equity ROE calculation formula:

Return on equity ROE = Net profit / Net assets × 100%

Among them, net profit is the profit of a company after deducting various expenses and taxes within a certain period, and net assets are the total assets of the company minus liabilities.

ROE is an important reference indicator of a company's profitability. The higher the return on equity value, the stronger the company's profitability and the higher the return to shareholders. Generally, the ROE of high-quality domestic companies remains above 15%. However, ROE is affected by a variety of factors. There may be large differences in ROE levels between different industries. Therefore, it needs to be analyzed based on specific circumstances. Higher is not necessarily better.

Return on equity index formula:

ROE:=FINANCE(30)/FINANCE(19)*100;

Among them, FINANCE(30) represents the net profit attributable to the parent company, and FINANCE(19) represents shareholders' equity (net assets). Note: These two functions are the latest financial report data of listed companies.

4.P/E ratio relative to earnings growth ratio PEG

The price-to-earnings ratio relative to earnings growth (PEG) is an indicator used to measure stock valuation and is also an indicator valued by the famous fund manager Peter Lynch. PEG combines the price-to-earnings ratio PE and earnings growth rate, making up for the shortcomings of the price-to-earnings ratio PE in estimating the dynamic growth of the company, and can more comprehensively evaluate a company's investment potential. PEG focuses on growth companies and is suitable for evaluating the stock value of growth companies.

The price-to-earnings ratio relative to earnings growth ratio PEG calculation formula:

PEG = price-to-earnings ratio / earnings growth rate

Among them, the price-to-earnings ratio is the ratio of the company's stock price to its earnings per share, which represents the market's expectations for the company's future earnings. The profit growth rate represents the company's future profit growth rate. Generally speaking, it is the company's profit compound growth rate in the next 3-5 years. However, prediction is difficult. Although the research reports of securities companies will give some forecast data, which can be used to calculate PEG, but it is also difficult to obtain data, so the compound growth rate of the past 3-5 years can be used as a reference.

The lower the PEG value, the lower the valuation. Generally speaking, a PEG less than 1 is considered a sign of undervaluation, while a PEG greater than 1 is considered a sign of overvaluation. However, PEG is an interest-rate sensitive valuation indicator, and the risk-free rate of return must also be considered.

The advantage of PEG is that it combines the price-to-earnings ratio with the earnings growth rate, taking a more comprehensive consideration of the company's growth potential. Higher earnings growth can support a relatively higher P/E ratio, while a lower P/E ratio provides a certain margin of safety. Therefore, PEG can help find stocks with growth potential and reasonable valuations.

However, it should also be noted that the PEG indicator also has some limitations. If earnings growth is irregular, the calculated compound growth rate may have a large error, and the calculated PEG reference value will be very low. Therefore, PEG is only suitable for companies with stable performance and highly predictable profit growth rates, and cannot be simply applied mechanically.

The price-to-earnings ratio relative to earnings growth ratio indicator formula:

PEG:DYNAINFO(39)/FINANCE(43);

Among them, DYNAINFO (39) represents the dynamic price-to-earnings ratio, and FINANCE (43) represents the year-on-year growth rate of net profit. This is the latest financial report data of listed companies. It is obviously not practical to use only the latest financial report data. Moreover, the formula uses the dynamic price-to-earnings ratio, and some people think that it is more appropriate to use the rolling price-to-earnings ratio TTM. However, this formula is the way to write the PEG formula that comes with Tongdaxin software, and is used as an example in this article.

5. FINANCE function comprehensively uses the sub-chart indicator formula

DRAWTEXT_FIX(1,0,0.1,0,'[Section]'),COLORYELLOW;

DRAWTEXT_FIX(1,0,0.2,0,STRCAT(' [Industry]—',HYBLOCK)),COLORYELLOW;

DRAWTEXT_FIX(1,0,0.3,0,STRCAT(' [Region]—',DYBLOCK)),COLORYELLOW;

DRAWTEXT_FIX(1,0,0.4,0,STRCAT(' [Concept]—',GNBLOCK)),COLORYELLOW;

PE dynamic:=DYNAINFO(7)/FINANCE(33);{dynamic price-earnings ratio}

PB:=DYNAINFO(7)/FINANCE(34);{Price to Book Ratio}

PS:=FINANCE(1)*DYNAINFO(7)/FINANCE(20);{price-to-sales ratio}

GPM:=(FINANCE(20)-FINANCE(21))/FINANCE(20)*100;{Gross profit margin}

NPM:=FINANCE(30)/FINANCE(20)*100;{Net profit margin}

ROE:=FINANCE(30)/FINANCE(19)*100;{Return on Net Assets};

PEG:=DYNAINFO(39)/FINANCE(43);{P/E ratio relative to earnings growth ratio}

DRAWTEXT_FIX(1,0.9,0.1,1,'Dynamic P/E Ratio:'),COLORYELLOW;

DRAWTEXT_FIX(1,0.9,0.2,1,'city rate:'),COLORYELLOW;

DRAWTEXT_FIX(1,0.9,0.3,1,'Price to sales ratio:'),COLORYELLOW;

DRAWTEXT_FIX(1,0.9,0.4,1,'Gross profit margin:'),COLORYELLOW;

DRAWTEXT_FIX(1,0.9,0.5,1,'Net profit margin:'),COLORYELLOW;

DRAWTEXT_FIX(1,0.9,0.6,1,'ROE:'),COLORYELLOW;

DRAWTEXT_FIX(1,0.9,0.7,1,'P/E ratio relative to earnings growth ratio:'),COLORYELLOW;

DRAWTEXT_FIX(1,0.9,0.1,0,CON2STR(PE dynamic,2)),COLORWHITE;

DRAWTEXT_FIX(1,0.9,0.2,0,CON2STR(PB,2)),COLORWHITE;

DRAWTEXT_FIX(1,0.9,0.3,0,CON2STR(PS,2)),COLORWHITE;

DRAWTEXT_FIX(1,0.9,0.4,0,STRCAT(CON2STR(GPM,2),'%')),COLORWHITE;

DRAWTEXT_FIX(1,0.9,0.5,0,STRCAT(CON2STR(NPM,2),'%')),COLORWHITE;

DRAWTEXT_FIX(1,0.9,0.6,0,STRCAT(CON2STR(ROE,2),'%')),COLORWHITE;

DRAWTEXT_FIX(1,0.9,0.7,0,CON2STR(PEG,2)),COLORWHITE;

Finally, let me explain that the related financial function FINANCE has some limitations. It usually only supports the latest financial report data of listed companies and focuses on the company's short-term fundamentals. If you want to obtain historical data, you can only use professional financial data functions, which will not be expanded on in this article.

Pay attention to Technical Pie and learn more about Tongdaxin indicator formula writing. All rights reserved, please indicate the source.

Friendly reminder: This article is only for learning and communicating technical indicator formulas and does not constitute any investment advice. Investment is risky, so be cautious when entering the market.

Guess you like

Origin blog.csdn.net/m0_74754828/article/details/133885726