Can someone please explain to me how buying a CDX and then taking a short CDS position generates alpha? I am so confused.
One can argue that the theoretical fair value (intrinsic value) of a credit index is just the sum of values of its component CDSs on the same names and with the same terms and conditions (maturity, running spread, etc) as the index. Sometimes the index is being quoted in the market far enough from the fair value (this difference is called the "skew") that one can arbitrage, e.g. buy CDS protection in the form of the index and at the same time sell the same CDS protection in the form of many single-name CDSs on small notionals, referencing index components, make some PL at inception (despite bid-offer spread and other transaction costs), and then can be considered risk-free (all the cash flows offset each other) until all the trades mature.
This is similar to how some arbitrage desks look for opportunities to trade simultaneously an equity index, and a replictating portfoloio of its component equities.
Many practical obstacles make a credit trade more difficult. For example, CDS on many components can be extremely illiquid with a very wide bid-offer spread. Also you're not completely risk-free - if you have dozens of OTC swaps with different counterparties, then someone needs to think about your CVA.