Investors & landlords

No.  If you had a capital gain from the stocks you sold, it's taxable regardless of what you did with the money.

**Answers are correct to the best of my ability but do not constitute tax or legal advice.