for each day before trading start I get an array (that appends to the previous day) of context.portfolio.returns
mean = np.mean(context.portfolio.returns)
std = np.std(context.portfolio.returns)
sharpe = mean/std * np.sqrt(252)
The value this gives is much larger than than the value on the backtest.
Also is my formula taking into account the risk free rate (SPY)?
Could someone please provide some advice.