CAPM Calculator [TrendX_]

CAPM calculator is a powerful tool that helps find the cost of equity, which is the minimum return that shareholders require to invest in a company.

With the CAPM calculator, you can assess how well your trading strategy performs compared to the market. The goal of your strategy is to earn higher returns than what you would get by investing in the market with the same level of risk. This is called the risk-adjusted cost of capital, and it represents the minimum return that you should accept for your investment.


A simple way to measure this is to compare the Compound annual growth rate (CAGR) of the trading strategy with the “Compound CAPM”, which is the CAGR of investing in the market with the same beta as the strategy.

If the trading strategy has a higher CAGR than the “Compound CAPM”, it means that it has outperformed the market on a risk-adjusted basis.

This is a sign of an effective trading strategy.


The results achieved in the past are not all reliable sources of what will happen in the future. There are many factors and uncertainties that can affect the outcome of any endeavor, and no one can guarantee or predict with certainty what will occur.

Therefore, you should always exercise caution and judgment when making decisions based on past performance.

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.


The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?