Daily return computation and Moving Average inspired by quantstart