Markets extended gains for the third successive week and made a new record high as well.