To do this without a drag on returns is a highly contested part of finance (ie it’s very hard).
to do this the dumb way will cause significant drag on your earnings. If you dont have any leverage these malfunctioning events won’t affect you. If you do, you should be watching your portfolio...