  We conjecture that the relative Gromov-Witten potentials of elliptic
fibrations are (cycle-valued) lattice quasi-Jacobi forms and satisfy a
holomorphic anomaly equation. We prove the conjecture for the rational elliptic
surface in all genera and curve classes numerically. The generating series are
quasi-Jacobi forms for the lattice $E_8$. We also show the compatibility of the
conjecture with the degeneration formula. As Corollary we deduce that the
Gromov-Witten potentials of the Schoen Calabi-Yau threefold (relative to
$\mathbb{P}^1$) are $E_8 \times E_8$ quasi-bi-Jacobi forms and satisfy a
holomorphic anomaly equation. This yields a partial verification of the BCOV
holomorphic anomaly equation for Calabi-Yau threefolds. For abelian surfaces
the holomorphic anomaly equation is proven numerically in primitive classes.
The theory of lattice quasi-Jacobi forms is reviewed.
  In the Appendix the conjectural holomorphic anomaly equation is expressed as
a matrix action on the space of (generalized) cohomological field theories. The
compatibility of the matrix action with the Jacobi Lie algebra is proven.
Holomorphic anomaly equations for K3 fibrations are discussed in an example.
