  Via duality of Hopf algebras, there is a direct association between peak quasisymmetric functions and enumeration of chains in Eulerian posets. We study this association explicitly, showing that the notion of $\cd$-index, long studied in the context of convex polytopes and Eulerian posets, arises as the dual basis to a natural basis of peak quasisymmetric functions introduced by Stembridge. Thus Eulerian posets having a nonnegative $\cd$-index (for example, face lattices of convex polytopes) correspond to peak quasisymmetric functions having a nonnegative representation in terms of this basis. We diagonalize the operator that associates the basis of descent sets for all quasisymmetric functions to that of peak sets for the algebra of peak functions, and study the $g$-polynomial for Eulerian posets as an algebra homomorphism. 
Peak Quasisymmetric Functions and Eulerian Enumeration