OPEN-SOURCE SCRIPT

Sortino Ratio

The Sortino ratio is a variation of the Sharpe ratio that differentiates harmful volatility from total overall volatility using the asset's standard deviation of negative portfolio returns—downside deviation—instead of the total standard deviation of portfolio returns. The Sortino ratio takes an asset or portfolio's return and subtracts the risk-free rate and then divides that amount by the asset's downside deviation. The ratio was named after Frank A. Sortino.

What Can the Sortino Ratio Tell You?

The Sortino ratio is useful for investors, analysts, and portfolio managers to evaluate an investment's return for a given level of bad risk. Since this ratio uses only the downside deviation as its risk measure, it addresses the problem of using total risk, or standard deviation, which is important because upside volatility is beneficial to investors and isn't a factor most investors worry about.

The Difference Between the Sortino Ratio and the Sharpe Ratio

The Sortino ratio improves upon the Sharpe ratio by isolating downside or negative volatility from total volatility by dividing excess return by the downside deviation instead of the total standard deviation of a portfolio or asset.

The Sharpe ratio punishes the investment for good risk, which provides positive returns for investors. However, determining which ratio to use depends on whether the investor wants to focus on total or standard deviation or just downside deviation.

CONCLUSION: THE HIGHER THE RATIO, THE BETTER IT IS.

Note: The default risk-free rate is based on the Malaysian rate. Please change based on your country rate.
Note: The default length is based on 1 year Malaysia trading day (11/6/2020 - 11/6/2021).
Note: Sortino ratio is good for assessing a long-term investment, and thus, please use a longer time frame to get a better risk assessment.

Please let me know if this script contains any mistake. Cheers!
Volatility

Skrypt open-source

W prawdziwym duchu TradingView autor tego skryptu opublikował go jako open source, aby inwestorzy mogli go zrozumieć i zweryfikować. Pozdrowienia dla autora! Możesz go używać bezpłatnie, ale ponowne użycie tego kodu w publikacji podlega Zasadom Regulaminu. Możesz go oznaczyć jako ulubione, aby użyć go na wykresie.

Chcesz użyć tego skryptu na wykresie?

Wyłączenie odpowiedzialności