Rinse the cod with cold water. Soak in cold water for at least 2 days draining and covering with fresh water 2 to 3 times. Drain and pull the fish from the skin and bones.
Put potatoes in a medium pot and cover with cold water. Bring to a boil and cook until just tender but not falling apart. Drain and set aside.
Add tomatoes to a pot of boiling water and when skins start to peel off, take them out of the water, peel them completely and put into a blender or food processor.
Add onion and garlic and blend until smooth.
Heat 1/2 cup of olive oil in a medium pot. Add fish and tomato sauce and cook over medium heat for about 10 minutes.
Add capers, olives, chiles and potatoes and continue to cook for about 30 minutes more to allow flavors to blend together, adding remaining 1/2 cup olive oil as needed and stirring regularly.