This paper presents analytical formulas for pricing generalized swaps, including the moment swap, gamma swap, entropy swap and self-quantoed variance swap. The formulas are based on closed-form formulas for the conditional expectations of the product of the price and its logarithm and the product of the price and the convenience yield obtained by solving a partial differential equation corresponding to the infinitesimal generator for the two-dimensional diffusion process. In this respect, the formulas obtained are combinatorial in nature and are solved via an affine transformation involving the complete Bell polynomials. The formulas are quite suitable for practical usage with symmetric and skew-symmetric properties, i.e., they are simpler and more compact compared with those existing in the literature. Moreover, for moments swaps, we show in general that the strike price does not depend on the initial spot price but depends only on the initial convenience yield, which highlights the resulting versatility in this respect.