Portfolio: alpha, beta, stdev, variance, mean, max drawdown...

Portfolio Metrics **New**

'log returns'
'geometric returns'

portfolio alpha
portfolio beta
portfolio,market correlation
portfolio standard deviation
portfolio variance
mean portfolio returns
maximum drawdown
maximum gain

Release Notes: Removed log and geometric returns. Will release adjusted returns script.
Release Notes: //corrected errors
Release Notes: //no update - adjusted chart and indicator
Release Notes: adjusted hexidecimal colors for better UX.
default is set to logarithmic returns with lookahead off
Release Notes: hexidecimal color switch
Release Notes: //
Release Notes: Fixed Risk-Free Rate Bug
Added Display Options:
Group-Coefficents (Alpha, Beta)
Group-Proft.Loss (Max Drawdown, Max Gain)
Group-Stats (Standard Deviation, Variance, Correlation, R-Squared)
Release Notes: //
Release Notes: //
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Want to use this script on a chart?


500 coins
This publication is now featured in our Editors' Picks. In the name of all TradingView traders, thank you for your valuable contribution to the TradingView community, and congrats!
+4 Reply
Good job
+2 Reply
important note: these scripts will not be accurate for the recent stock splits of TSLA and AAPL. Will release an adjusted returns script.
+2 Reply
Thanks for sharing
+1 Reply
Nice work
+1 Reply
Nice job
+1 Reply
keep posting
+1 Reply