Unfortunately not, except for certain reinvestments in qualified small business stock or empowerment zone business stock (see the Schedule D instructions for these special rollover rules). Apart from these exceptions, all of the gain on the sale of one stock must be reported even if other stock is purchased. The like-kind exchange rules do not apply to securities (stocks, bonds, notes, etc.).
Debt on which a person is not personally liable. In case of nonpayment, the creditor must foreclose on property securing the debt. At-risk rules generally bar losses where there is nonrecourse financing, but an exception applies to certain nonrecourse financing for real estate.