You can sell for a loss up to and including the the 31st. It's the trade date, not the settlement date, that determines when it was sold.