I'm trying to calculate (1) the standard deviation of SPY prices over the past 5 days,;and (2) a 5-day moving average for the standard deviation of prices. I've created a very simple example, but when I plot the std and sma, I only get zero values. Where I'm going wrong in the attached backtest? Thanks in advance for help with this.

Author