Sharpe Ratio Formula Explained
Sharpe ratio is excess return divided by risk.
Excess return is the return on the investment (portfolio, fund, trading strategy) less risk-free return (treasury yield, money market rate).
Risk is represented by the standard deviation of returns on the investment.
Therefore, Sharpe ratio equals expected return on the investment less risk-free rate, divided by standard deviation of returns on the investment:

... where:
Rp = expected return of the portfolio or investment
Rf = risk-free interest rate
σp = standard deviation of portfolio returns