Text this: Optimal Foreign Borrowing