MATLAB: Daily Returns to Biweekly Returns

returns

Hi,
I have a big data set with daily return data. I would like to make them to biweekly returns. So my idea was to create a for loop which aggregates 10 daily returns to 1 biweekly return.
I think it's pretty easy but I can't figure out how to do it.
Thanks for help

Best Answer

If you're storing your data in a timetable array, use the retime function.