An amended return to claim a refund generally can be filed up to three years from the due date of that return (or the actual filing date if after the due date).
Sales on which losses are disallowed because you recover your market position within a 61-day period.