Algokid

Absolute Momentum Indicator

Covered intensevely by Gary Antonnacci in his paper " Absolute Momentum : A simple Rule Based Strategy and Universal Trend Following Overlay , Absolute momentum buys asset with excess return, which is calculated by taking the return of the asset for a giving period of time LESS the Treasury bill rate . The following indicator is based on the rules found in the paper. However you have the liberty to choose your time frame and symbol to calculate the excess return .

Read more about this indicator here

Cheers

开源脚本

本着真正的TradingView精神,该脚本的作者将其开源发布,以便交易者可以理解和验证它。为作者喝彩!您可以免费使用它,但在出版物中重复使用此代码受网站规则的约束。 您可以收藏它以在图表上使用。

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

想在图表上使用此脚本?
//@version=2
study("Absolute Momentum")

p = input(12,minval=1,title = "LookBack Period")
sym = input(title="Symbol", type=symbol, defval="SHY")
sm = input(1,minval=1,title = "Smooth Period")


rc = roc(close,p)

bil = security(sym,"M",close)
bilr = roc(bil,p)


rcdm = rc-bilr
srcdm = sma(rcdm,sm)

line = 0 

plot(rcdm,color= red,title= "Absolute Momentum" )
plot(srcdm,color = blue,title="Smooth Abs Momentum")
plot(line , color = gray,title="Zero Line")


barcolor(rcdm > 0 ? lime:red)