The evolution of the electronic structure and optical and magnetic properties of ErNi_5 – _ x Co_ x compounds ( x = 0–4), occurring upon substitution of nickel by cobalt atoms, has been investigated. Spin-polarization calculations of the band spectrum of these intermetallic compounds have been performed within the local spin density approximation with a correction for strong electron correlations in the 4 f shell of a rare-earth ion (method LSDA+U). The values of magnetic moments for erbium, nickel, and cobalt ions (located at different crystallographic sites) are obtained. The exchange-interaction parameters for the 3 d sublattice of transition metals are determined. The spectral properties of the compounds have been investigated in the wavelength range of 0.22–15 μm by optical ellipsometry. The experimental frequency dependences of the optical conductivity in the interband absorption region are compared with the corresponding characteristics calculated based on the density of electronic states.