If you have a lot of for loops in data computations, the first thing you should try is to vectorize your code using libraries like Pandas (or NumPy, which can be faster). You can also parallelize your code using Python libraries, such as threading and multiprocessing (and there are many high level wrappers that simplify this process, such as concurrent.futures). Threading is ideal for more I/O bound operations such as reading from disk or downloading data. Multiprocessing, meanwhile, is more suited to computationally heavy tasks, such as risk calculations.