AMENDMENT NUMBER 4 TO MASTER REPURCHASE AGREEMENT AND SECURITIES CONTRACT