A system for extracting a cardiac signal from a spinal signal includes measuring a spinal signal at one or more electrodes that are connected to a neurostimulator and implanted within a patient's spinal canal and processing the spinal signal to extract the cardiac signal, which includes features that are representative of the patient's cardiac activity. Processing the spinal signal to extract the cardiac signal can include filtering the spinal signal using a first low-pass filter and a second moving average filter. Model reduction schemes such as independent component analysis can additionally or alternatively be employed to extract the cardiac signal. The extracted cardiac signal can include a number of features that correspond to an electrocardiogram and can be used to determine the patient's heart rate and/or to detect a cardiac anomaly. Cardiac features that are determined from the cardiac signal can additionally be used to adjust parameters of the stimulation that is provided by the neurostimulator.