Can a Custom ROM affect the performance of my battery?
It's the custom ROM but it may not be the ROM itself. Most of the times it is the kernel that comes with the ROM that is most influential. But, it is possible that the ROM has a feature or two that is draining the battery.

Also, since it is an S4 I have to ask, is it a Samsung ROM or AOSP? Because AOSP is so much different that usually because it is not the most compatible with the hardware it will take a toll on the battery. Samsung knows how to customize it's software the best so generally Samsung ROMs (doesn't have to be stock) are better than AOSP ROMs on Samsung phones or any OEM phones for that matter.