I want to calculate the rolling_std for daily returns, using all records previous to the current row. How do i set the window to use the rolling count of the rows? For example: on 04-04
. I want to use all rows to calculate, on 04-01
I want to use all rows with date less than 04-01
.
Date Daily Std
4/4/2016 -0.003087335 ?
4/1/2016 0.006480923 ?
3/31/2016 -0.001553158 ?
3/30/2016 0.004351748 ?
3/29/2016 0.009234222 ?
expanding()
rather thanrolling()
and also need to sort to get things in ascending date order