  We describe a density-functional method which aims at computing the ground
state electron density and the spectral function at the same time. One basic
ingredient of our method is the construction of the spectral function from the
first four spectral moment matrices. The second basic ingredient is the
construction of the spectral moment matrices from density functionals. We call
our method moment-functional based spectral density-functional theory
(MFbSDFT), because it is based on density-functionals for the spectral moments
and because it allows us to compute the spectral function. If it is implemented
in second variation our method consumes only a fraction more computer time than
a standard DFT calculation with the PBE functional. We show that MFbSDFT
captures correlation effects such as the valence-band satellite in Ni and the
formation of lower and upper Hubbard bands in SrVO$_3$. For the purpose of
constructing the spectral function from the first four $N\times N$ spectral
moment matrices we describe an efficient algorithm based on the diagonalization
of one hermitean $2N\times 2N$ matrix.
