When determining what year you sold your stock, the trade date is what matters. This is the day the transaction took place on the stock exchange. If you contact your broker on the last trading day of the year, you can complete a sale in the current year if your broker executes the trade that day. On major exchanges, the last trading day is December 31 unless that day falls on a weekend. It doesn’t matter if your transactions settles in the following year.