We study the two-terminal transport properties of a metallic single-walled carbon nanotube with good contacts to electrodes, which have recently been shown [W. Liang et al., Nature (London) 441, 665 (2001)] to conduct ballistically with weak backscattering occurring mainly at the two contacts. The measured conductance, as a function of bias and gate voltages, shows an oscillating pattern of quantum interference. We show how such patterns can be understood and calculated, taking into account Luttinger liquid effects resulting from strong Coulomb interactions in the nanotube. We treat backscattering in the contacts perturbatively and use the Keldysh formalism to treat nonequilibrium effects due to the nonzero bias voltage. Going beyond current experiments, we include the effects of possible ferromagnetic polarization of the leads to describe spin transport in carbon nanotubes. We thereby describe both incoherent spin injection and coherent resonant spin transport between the two leads. Spin currents can be produced in both ways, but only the latter allow this spin current to be controlled using an external gate. In all cases, the spin currents, charge currents, and magnetization of the nanotube exhibit components varying quasiperiodically with bias voltage, approximately as a superposition of periodic interference oscillations of spin- and charge-carrying ``quasiparticles'' in the nanotube, each with its own period. The amplitude of the higher-period signal is largest in single-mode quantum wires, and is somewhat suppressed in metallic nanotubes due to their subband degeneracy.