In this paper we construct indefinite theta series for lattices of arbitrary signature
as ‘incomplete’ theta integrals, that is, by integrating the theta forms constructed by the second author with J. Millson over certain singular
-chains in the associated symmetric space
. These chains typically do not descend to homology classes in arithmetic quotients of
, and consequently the theta integrals do not give rise to holomorphic modular forms, but rather to the non-holomorphic completions of certain mock modular forms. In this way we provide a general geometric framework for the indefinite theta series constructed by Zwegers and more recently by Alexandrov, Banerjee, Manschot, and Pioline, Nazaroglu, and Raum. In particular, the coefficients of the mock modular forms are identified with intersection numbers.