Trailing Sharpe Ratio

The Sharpe ratio allows you to see whether or not an investment has historically provided a return appropriate to its risk level. A Sharpe ratio above one is acceptable, above 2 is good, and above 3 is excellent. A Sharpe ratio less than one would indicate that an investment has not returned a high enough return to justify the risk of holding it. Interesting in this example, SPY's one year avg Sharpe ratio is above 3. This would mean on average SPY returns 3x better returns than the risk associated with holding it, implying there is some sort of underlying value to the investment.

When the sharpe ratio is above its signal, this implies the investment is currently outperforming compared to its typical return, below the signal means the investment is currently under performing. A negative Shape would mean that the investment has not provided a positive return, and may be a possible short candidate.
从常用的脚本中删除 添加到常用的脚本
study("Trailing Sharpe Ratio")
src = ohlc4, len = input(252, title = "Time Frame (252 is one year)")
//mean = sma(src,len)
dividend_yield = input(0.0000, minval = 0.00001, title = "Dividend Yield? Enter as Decimal, USE 12 MONTH TTM!!!")
pc = ((src - src[len])/src) + (dividend_yield*(len/252))
std = stdev(src,len)
stdaspercent = std/src
riskfreerate = input(0.0004, minval = 0.0001, title = "risk free rate (3 month treasury yield), enter as decimal")
sharpe = (pc - riskfreerate)/stdaspercent
signal = sma(sharpe,len)
calc = sharpe - signal
plot(sharpe, style = line, color = calc < 0 ? red : green, linewidth = 2)
plot(signal, style = line, color = purple, linewidth = 2)
Good boy
首页 股票筛选器 外汇筛选器 加密货币筛选器 财经日历 剧集 如何运作 图表功能 价格 推荐朋友 网站规则 帮助中心 网站 & 经纪商解决方案 插件 图表解决方案 轻量图表库 博客 & 新闻 Twitter
概述 个人资料设置 账号和账单 推荐朋友 我的客服工单 帮助中心 已发表观点 粉丝 正在关注 私人消息 聊天 退出