I have a problem with understanding this calculation. Why is the mean multiplied by sqrt of number of days? Shouldn't be std that is multiplied by that?
def calc_sharpe(df):
# Caluclate the day wise returns
day_wise_returns = df.groupby(df.day).pct
# Return the day wise Sharpe
return (np.sqrt(252)*day_wise_returns.mean()/day_wise_returns.std())