Added complete functionality for Risk Calculation