Short-selling occurs when a trader borrows shares in a stock from a broker to sell .