Thomas_Chia_Han_Yang

Stock's Intrinsic Value| DCF model

Script Description
This pine script is based on a YouTube video titled: Warren Buffett: How to Calculate the Intrinsic Value of a Stock. Warren Buffett is a famous value investor who follows the principles of his mentor Benjamin Graham. He looks for companies that have strong competitive advantages, consistent earnings, and low debt. He also considers the intrinsic value of a company, which is the present value of its future cash flows, and compares it to the market price. He prefers to buy stocks that are trading below their intrinsic value and hold them for a long time.

One of the methods that Buffett uses to estimate the intrinsic value of a company is the discounted cash flow (DCF) model. This involves projecting the free cash flow (FCF) of the company for several years and then discounting it back to the present using an appropriate discount rate. The discount rate is usually the weighted average cost of capital (WACC) of the company, which reflects its cost of equity and debt. The sum of the discounted FCFs and terminal value is the intrinsic value of the company.

Lastly, a margin of safety is included when using the DCF method for stock valuation because of uncertainty and error in estimating future cash flows and the intrinsic value of the company.

When the current price is below margin of safety, it means that the stock is currently undervalued and being price at significantly below its intrinsic value.

Guideline for determining each variable in this script
FCF growth rate: This is the annual rate at which the free cash flow (FCF) of the company is expected to grow over a forecast 10-year period. You can use historical FCF growth rates, industry averages, analyst estimates, or your assumptions to project the FCF growth rate. The higher the FCF growth rate, the higher the intrinsic value will be.

Discount rate: This is the rate of return that you require to invest in the company. It reflects the risk and opportunity cost of investing in the company. You can use the weighted average cost of capital (WACC) of the company, capital pricing model (CAPM), hurdle rate, or market rate as the discount rate. The lower the discount rate, the higher the intrinsic value.

The margin of safety: Provides a cushion against errors in the valuation or adverse events that may affect the company. The margin of safety depends on your personal preference and risk tolerance. Normally is at 15% - 30%, the higher the margin of safety you set, the lower the chance that the stock will hit that level.

How to use this script
Step 1: This script only works for stocks that have financial data of free cash flow and total common shares outstanding
Step 2: Please use a yearly chart (12-month chart)
Step 3: You are required to determine a growth rate that will grow the free cash flow 10 years into the future
Step 4: You are required to determine a discount rate for the calculations
Step 5: You are required to add a margin of safety (Accounting for uncertainty)
Step 6: The rest of the calculations will be done automatically.

Disclaimer when using this script
  • I'm not a financial advisor
  • This script is for education purposes only
  • There are risks involved with stock market investing and investors should not act upon the content or information found here without first seeking advice from an accountant, financial planner, lawyer or other professional.
  • I can’t guarantee that this script will be error-free as I still consider myself a Pinescript beginner
  • Before making any decisions, investors should always research companies individually
  • I'll not be liable for any loss incurred, arising from the use of, or reliance on, this script

Limitations of this script
  • This script only works on the yearly chart (12 monthly charts)
  • The intrinsic value of a company will be negative if the company have a negative forecasted free cash flow
  • You need to make an educated guess about the growth rate, discount rate and margin of safety
  • This script uses free cash flow instead of owner's earnings (Operating cash flow - Maintenance capital expenditure), therefore it can't accurately estimate the maintenance capital expenditure.
  • Need at least 6 years’ worth of financial data
  • Market capitalisation uses total common shares outstanding multiplied by the closing price instead of using company-level total outstanding shares multiplied by the closing price
오픈 소스 스크립트

이 스크립트의 오써는 참된 트레이딩뷰의 스피릿으로 이 스크립트를 오픈소스로 퍼블리쉬하여 트레이더들로 하여금 이해 및 검증할 수 있도록 하였습니다. 오써를 응원합니다! 스크립트를 무료로 쓸 수 있지만, 다른 퍼블리케이션에서 이 코드를 재사용하는 것은 하우스룰을 따릅니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.

차트에 이 스크립트를 사용하시겠습니까?