The law states that if an investor buys a security within 30 days before or after selling it, any losses made from that sale cannot be counted against reported income.