Mathematical Foundations of Risk Management