Trading Strategy

  • Drawdowns is a time series chart demonstrating drawdowns from peak equity attained through time, calculated from periodic returns.
  • The pain index is the mean value of the drawdowns over the entire analysis period.
  • The Sharpe Ratio is a risk-adjusted measure of return that uses standard deviation to represent risk. The Sharpe ratio is the average return earned in excess of the risk-free rate per unit of volatility or total risk.. The higher the Sharpe ratio, the better the combined performance of "risk" and return. In general, a ratio of 1 or better is considered good, 2 and better is very good, and 3 and better is considered excellent.
  • The Calmar Ratio uses maximum drawdown - investment average return (usually 3 years) dividedy by maximum drawdown in the same period .


Formulas

  • annualizedVolatility <- SD(Returns) * SQRT(252)
  • sharpeRatio <- annualizedReturn / annualizedVolatility
  • sharpeRatio <- (MEAN(ExpectedReturns) − RiskFreeRate) / SD (Returns)
  • sharpeRatio <- annualizedReturn / annualizedStdDev
  • profitFactor <- SUM(Returns[Returns > 0]) / ABS(SUM(Returns[Returns < 0]))
  • drawDowns <- PerformanceAnalytics:::Drawdowns(Returns/100)
  • Calmar <- Average Return / Maximum Drawdowns
  • curves <- cumsum (Drawdowns)
  • painIndex <- PerformanceAnalytics:::PainIndex(Returns)
  • hitRate <- length(which(Returns > 0))/length(Returns)
  • VaR <- chart.VaRSensitivity(Returns), methods = c("HistoricalVaR", "GaussianVaR"),

References

  • https://en.wikipedia.org/wiki/Sharpe_ratio
  • http://www.investopedia.com/terms/s/sharperatio.asp
  • https://www.r-bloggers.com/rolling-sharpe-ratios/

Author

  • The web application is built for BDAX by David Kim