We study a Ramsey planner who chooses a distorting tax on labor and manages a portfolio of bonds of different maturities in the representative agent economy with aggregate shocks. We show that covariances of holding period returns of these bonds with the primary deficit are the key statistics that determine the optimal composition of Ramsey portfolio. We document properties of these moments in the U.S. data and calibrate a version of a neoclassical model with Epstein-Zin preferences that matches these moments. The optimal portfolio does not short any bond, allocates approximately equal share of portfolio in bonds of different maturity with a slight tilt towards longer maturities when the outstanding debt is large, and requires little re-balancing in response to aggregate shocks. These prescriptions stand in marked contrast with the prescriptions of standard models used in the business cycle literature. We show that the difference in the results is driven by the counterfactual asset pricing implications of such models.