1,377. Fasting on a Yahrtzeit

220:10 Even though yom tov cancels shiva, nevertheless the custom of lighting a candle in the deceased's place to honor his soul should also be observed on the holiday. In any event, it is preferable to light this candle at shul.

221:1 There is a mitzvah to fast each year on the anniversary of the day on which one's parent died (i.e., their yahrtzeit). This is done to stir him into repentance and self-examination; through this, one may elevate his parent's soul. At mincha, he recites Aneinu, as one does on any personal fast. If he fasted once, we assume that his intention is always to fast on this day. Therefore, this is like a vow, which is a Torah obligation, so he must always fast on that day. If he is sick or needs to eat for some other reason, he must annul the vow. If he stated explicitly that he isn't accepting the fast upon himself as a vow, then he doesn't need to annul it. The practice is to light a yahrtzeit candle.