OPEN-SOURCE SCRIPT

Leonid's Bitcoin Sharpe Ratio

Updated
The Sharpe ratio is an old formula used to value the risk-adjusted return of an asset. It was developed by Nobel Laureate William F. Sharpe. In this case, I have applied it to Bitcoin with an adjustable look-back date.

The Sharpe Ratio shows you the average return earned after subtracting out the risk-free rate per unit of volatility (I've defaulted this to 0.02 [2%]).

Volatility is a measure of the price fluctuations of an asset or portfolio. Subtracting the risk-free rate from the mean return allows you to understand what the extra returns are for taking the risk.

If the indicator is flashing red, Bitcoin is temporarily overbought (expensive).
If the indicator is flashing green, Bitcoin is temporarily oversold (cheap).

The goal of this indicator is to signal out local tops & bottoms. It can be adjusted as far as the lookback time but I have found 25-26 days to be ideal.
Release Notes
Renamed and added comments.
Bitcoin (Cryptocurrency)bitcoinpredictionBTCBTCUSDCyclesoverboughtoversoldPortfolio managementsharpesharperatioValue

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 publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?


Also on:

Disclaimer