Esempio n. 1
0
        public void GenerateOutput()
        {
            Confidence confidence = new Confidence(carlo.trialsList);

            confident75          = confidence.FindInterval(75);
            confident90          = confidence.FindInterval(90);
            amountAtRetirement75 = confident75[confident75.Count - 1];
            amountAtRetirement90 = confident90[confident90.Count - 1];
            int    yearsOfPayments  = (person.deathDate - person.retirementDate);
            double currentAmmount75 = amountAtRetirement75;
            double currentAmmount90 = amountAtRetirement90;
            double totalAmount;

            if (yearsOfLife == null)
            {
                yearsOfLife = yearsOfPayments;
            }

            growth75 = ((amountAtRetirement75 / confident75[0]) - 1) / (person.retirementDate - DateTime.Now.Year);
            growth90 = ((amountAtRetirement90 / confident90[0]) - 1) / (person.retirementDate - DateTime.Now.Year);

            withdrawl75 = Math.Round(PaymentCalculator.GetPayments(amountAtRetirement75, growth75, yearsOfPayments + 1), 2);
            withdrawl90 = Math.Round(PaymentCalculator.GetPayments(amountAtRetirement90, growth90, yearsOfPayments + 1), 2);

            totalAmount    = withdrawl75 * yearsOfPayments;
            exclusionRatio = person.lumpSum / totalAmount;
        }