Algorithm to calculate Stock Valuation Allowance according to Metro Group Policy