These ones, called credit default swaps, appear to have had the characteristic of potentially yielding a profit for JP Morgan if the debt of highly rated companies performed significantly better than that of lowly rated companies.
BBC: Does JP Morgan loss show regulators' great failure?