We calculate the energy spectra of cosmic rays (CR) and their secondaries produced in a supernova remnant (SNR), taking into account the time-dependence of the SNR shock. We model the trajectories of charged particles as a random walk with a prescribed diffusion coefficient, accelerating the particles at each shock crossing. Secondary production by CRs colliding with gas is included as a Monte Carlo process. We find that SNRs produce less antimatter than suggested previously: The positron/electron ratio and the antiproton/proton ratio are a few percent and few $times 10^{-5}$, respectively. Moreover, the obtained positron/electron ratio decreases with energy, while the antiproton/proton ratio rises at most by a factor of two above 10 GeV.