Since the battery is new and presumably good, either it's not getting charged or there is a severe current drain (like a light on all the time) when the car is off. You can check whether the battery is charging by measuring the voltage on the battery terminal under the hood when the car is running (it should be about 13.6 volts, or about a volt above the value when the car is not running). If not this high, the alternator is suspect, or at least the voltage regulator part of it.
Unless you see a light on, finding a current drain when the car ignition is off (and the key out) is harder, since you need to insert an current meter (~10 amp range) in the battery circuit and start removing fuses. Normally, the car-off current drain for the E34 M5 is substantially less than an amp and the car could sit a week or two without discharging the battery to the point the car wouldn't start. (A month is too long to sit.) You will need the radio code after disconnecting the battery to get the radio working again.