Rinse the salt cod, cover completely with cold water in a large bowl, and soak in the fridge for 24 to 48 hours, changing the water every 8 hours.
Drain and simmer the cod gently in fresh water for 5 to 10 minutes until it flakes; remove skin and bones and break into large flakes. Cook the potato chunks in salted water until just tender, then drain.
Warm the olive oil in a large deep skillet or pot; cook the onion until soft and translucent, about 5 minutes; add the garlic and cook 1 minute more; pour in the tomatoes and bay leaves and simmer 15 to 20 minutes until thick and deep red.
Fold in the flaked cod, potatoes, olives with brine, capers with brine, roasted peppers, chiles güeros and the optional raisins and almonds; fold gently, do not stir hard.
Simmer gently over low heat for 10 to 20 minutes so the flavours meld; taste a flake of cod before adding any salt; remove the bay leaves.
Spoon into warm bowls or onto plates with cod, potatoes, olives and plenty of sauce; serve at once with warm bolillos or corn tortillas.