Soak the cod in cold water to cover for 12 hours, changing the water 2 or 3 times. Drain. Place in saucepan cover with water and bring just to a boil. Drain, remove the skin and bones, shred the flesh and set aside.
Remove the stem and seeds from the chile ancho and soak in hot water for 10 minutes. Drain then puree in blender with the tomatoes and strain.
Heat the oil in a large skillet, add the onion and garlic over low heat until transparent. Add the puree and cook over low heat until it thickens. Add the cod, bay leaf, cinnamon, pepper, red peppers, almonds, raisins, olives, capers and parsley. Stir, then cook over medium heat, covered, for 15 minutes. Add the potatoes, cover and cook over high heat for 10 more minutes to heat through. Add salt if required.