Find annual | monthly cumulative (product) of returns

The problem Let's say that we have daily stock [...]