The written document that describes the functioning of a margin account and permits a customer's broker to pledge securities in the account as collateral for loans. A customer must sign a margin agreement before undertaking trades on credit in an account. Compare customer's loan agreement.