AMENDMENT NO. 4 TO MASTER REPURCHASE AND SECURITIES CONTRACT