Here in school we learn that the chance to get actually caught is the primary deterrent and second the weight of the sentence in either monetary terms or time served.
Because people are bad at estimating low probability and high outcome expected values. If you are old you might even not deterred at all by a very long sentence if there is only a small chance that you actually both get caught and have to serve the time.
I think as a general rule, probability is more important to dissuade things like speeding or murder. I think advanced financial crimes and especially fraud have such an inherently low risk of getting caught quickly enough (after all, by definition they weren't caught by the sophisticated investors who have the most to lose) that we will have far more success by having heavy punishments.
Because people are bad at estimating low probability and high outcome expected values. If you are old you might even not deterred at all by a very long sentence if there is only a small chance that you actually both get caught and have to serve the time.