If you also have an investment on which you have an accumulated loss, it may be advantageous to sell it prior to year-end. Capital losses are deductible up to the amount of your capital gains plus $3,000. If you are planning on selling an investment on which you have an accumulated gain, it may be best to wait until after the end of the year to defer payment of the taxes for another year (subject to estimated tax requirements).