I just wanted to verify that my way is the industry standard way... Any clear detailed algorithm recipes? Thanks!
You could use the PerformanceAnalytics library in R. Source code is available: http://braverock.com/brian/R/PerformanceAnalytics/html/SortinoRatio.html http://cran.r-project.org/web/packa...erformanceAnalyticsPresentation-UseR-2007.pdf Note, IMHO it only matters going forward. If in backtesting a Sharpe ratio or Sortino ratio is high/low, that doesn't mean it will continue to be so. It's kindof nice to have some measure of risk, but risk is tricky to predict.
I believe the general formula is: (AROR-RFROR)/DR; where: AROR = Annualized Rate of Return RFROR = Risk Free Rate of Return DR = Downside Risk Downside risk is generally defined as the standard deviation of negative returns.
So you sift out all the negative returns and calculate the standard deviation of this subset of returns and you call that downside risk? Okay then it's a simple change from Sharpe ratio.
Thanks. So you are a R trader? I really like R however I really really hate R's debugging functionality. It's just not suitable for writing a little large program in bug-free manner. And also I like those fancy stats packages however their quality assurance is my concern...
- Am I an R trader? I use the R GUI for statistical analysis, not for actual trading, although there are packages to allow trading with R. - Debugging might be an issue. Quality should not be, because it's open source. With a closed-source system you really don't know if the implementation of the algorithm(s) is(are) correct or not. With open source, you can correct any errors you see. Either way, with closed source or not, you shouldn't automatically assume the quality is good or not. You also shouldn't automatically assume the quality of your own code is good. Test. Verify. Question your assumptions, your data, everything.