Sortino ratio of 4,000?
See original GitHub issueThis may just be a problem with data, but I am getting blown up sortino ratios. I thought they had to be much smaller.
For instance:
import yfinance as yf
msft = yf.Ticker("ETH-USD")
def getSortino(h, p):
sh = []
for i in range(0, len(h)):
if i > p:
a = h['Close'].iloc[i-p:i]
sh.append(ta.sortino_ratio(a))
else: sh.append(0)
return sh
h['rso364'] = getSortino(h, 364)
h['rso100'] = getSortino(h, 100)
h['rso1000'] = getSortino(h, 1000)
h.plot(y=['rso100', 'rso364', 'rso1000','Close'], linewidth=0.5)
Gives me a graph like this, I don’t believe max values should be in the range of 4,000. Perhaps there is some missing data or something, but not sure what could cause this…
PS: I keep finding this package extremely useful.
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Sortino Ratio Calculator
The smart Sortino ratio calculator is an efficient tool that indicates the return of an investment considering its drawdown risk.
Read more >How to calculate Sortino Ratio - Angel One
The Sortino ratio is calculated by dividing the difference between the return and risk-free return rates by the standard deviation of the negative...
Read more >Sortino Ratio - DayTrading.com
The Sortino ratio is a means for traders and investors to gauge the risk-adjusted performance of their portfolios or strategies.
Read more >Investment Portfolio Analysis: Sortino Ratio - Blake Mullen
The Sortino ratio measures the risk-adjusted return of an asset, portfolio, or strategy. Essentially, the ratio penalizes only those returns ...
Read more >The Appraisal Ratio and Sortino Ratio - Bloomberg Prep
4000+ practice questions ... The Appraisal Ratio and Sortino Ratio ... The __Sortino ratio__ is once again return divided by risk, but both...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Oh just noticed the sign is not the issue as it’s preceded by:
downside = adjusted_benchmark_rate - returns
I’ll look into the definition that you implemented.
Looks like we should all invest immediately lol.
The short timeframe may indeed reflect periods of near zero negative volatility. I’ll have a look at which time frame sortino is typically calculated, I’m actually not certain. I’ll have a look at the data as well.