Lenke til json data
Login til RPM eksempeldata(åpne i ny fane)
Regelsett:
//Income regularSalaries = FETYPE.INCOME.SALARY miscellaneousSalaries = FETYPE.INCOME.OTHER totalIncomes = FETYPE.INCOME //Expenses householdExpenses = FETYPE.EXPENSES.HOUSEHOLD carExpenses = FETYPE.OTHERASSETS.VEHICLE.prop.sumExpensesFields housingExpenses = FETYPE.OTHERASSETS.OWNEDHOUSING.prop.sumExpensesFields installmentLoanMonthlyExpenses = function(FETYPE.LOAN.INSTALLMENT.prop.value, FETYPE.LOAN.INSTALLMENT.prop.durationMonths, FETYPE.LOAN.INSTALLMENT.prop.nominalInterestRate, FETYPE.LOAN.INSTALLMENT.prop.instalmentFee) { var amountThreshold = 100; var iterationLimit = 100; if(!instalmentFee){ instalmentFee = 0; } var calculate = function(value, duration, amount, nominalInterestRate, instalmentFee){ var monthlyInterestRate = nominalInterestRate / 1200; var month = 1; var finished = function(value){ return (value < 0 && Math.abs(value) < amountThreshold) || (value > 0 && value < amountThreshold); }; var interest; var principal; while (month <= duration) { interest = value * monthlyInterestRate; principal = amount - interest - instalmentFee; value -= principal; if (finished(value)) { return amount; } if(value < 0){ return -1; } month++; } return 0; }; var interpolation = function(value, duration, nominalInterestRate, instalmentFee){ var amount = 0; var lowest = value / duration; var highest = value * 0.5 *(duration/12); var iteration = 0; var pivotAmount; var result; while(amount === 0 && iteration < iterationLimit){ pivotAmount = (highest + lowest) / 2; result = calculate(value, duration, pivotAmount, nominalInterestRate, instalmentFee); if(result === 0){ lowest = pivotAmount; } else if (result === -1){ highest = pivotAmount; } else { return result; } iteration++; } }; return interpolation(value, durationMonths, nominalInterestRate, instalmentFee);}; yearlyCreditExpenses = installmentLoanMonthlyExpenses * 12 + creditLoanExpenses miscellaneousExpenses = FETYPE.EXPENSES savings = FETYPE.EXPENSES.FUND.SAVINGSAGREEMENT fixedExpenses = miscellaneousExpenses - householdExpenses + housingExpenses + yearlyCreditExpenses + carExpenses - savings //Assets assets = FETYPE.OTHERASSETS debt = FETYPE.LOAN networth = assets - debt //Taxes debtInterestDeductionRatePercentage = 25 nationalInsuranceContributionsRatePercentage = 7.8 grossIncome = regularSalaries + miscellaneousSalaries personalAllowance = 81000 basicAllowance = 47150 yearlyLoanInterest = function(FETYPE.LOAN.INSTALLMENT.prop.value, FETYPE.LOAN.INSTALLMENT.prop.amount, FETYPE.LOAN.INSTALLMENT.prop.durationMonths, FETYPE.LOAN.INSTALLMENT.prop.nominalInterestRate, FETYPE.LOAN.INSTALLMENT.prop.instalmentFee){ var monthlyInterestRate = nominalInterestRate / 1200; var month = 1; sum = 0; while (month <= durationMonths && month <= 12) { interest = value * monthlyInterestRate; sum += interest; principal = amount - interest - instalmentFee; value -= principal; month++; } return sum;}; debtInterestDeduction = (debtInterestDeductionRatePercentage / 100) * (creditLoanExpenses + yearlyLoanInterest) generalIncome = grossIncome - personalAllowance - debtInterestDeduction - basicAllowance nationalInsuranceContribution = generalIncome * (nationalInsuranceContributionsRatePercentage / 100) wealthTaxRatePercentage = 0.7 wealthTax = function(networth, wealthTaxRatePercentage) { if(networth>= 1480000) { return networth * (wealthTaxRatePercentage/100); } else { return 0; } }' municipalCountyStateTaxRatePercentage = 28 municipalCountyStateTax = generalIncome * (municipalCountyStateTaxRatePercentage / 100) sumTax = municipalCountyStateTax + wealthTax + nationalInsuranceContribution incomeAfterTax = totalIncomes - sumTax //Interest risk sumCredits = FETYPE.LOAN.CREDIT sumLoans = FETYPE.LOAN.INSTALLMENT sumDebt = totalCredits + totalLoans interestRateRiskPercentage = 5 interestRiskBeforeTax = sumDebt * (interestRateRiskPercentage / 100) interestRateRiskAfterTax = interestRiskBeforeTax * (1 - debtInterestDeductionRatePercentage) //Solvency solvencyAfterFixedExpensesAndInterestRisk = incomeAfterTax - fixedExpenses - renterisiko solvencyAfterLivingExpenses = solvencyAfterFixedExpensesAndInterestRisk - householdExpenses solvencyAfterSavings = solvencyAfterLivingExpenses - savings expectedPropertyValueIncreasePercentage = 5 ownedProperties = FETYPE.OTHERASSETS.OWNEDHOUSING cooperativeProperties = FETYPE.OTHERASSETS.SHAREDHOUSING.NO currentValueProperties = ownedProperties + cooperativeProperties propertiesValueIncrease = currentValueProperties * expectedPropertyValueIncreasePercentage expectedDecreaseCarValuePercentage = 20 expectedDecreaseCarValue = function(FETYPE.OTHERASSETS.VEHICLE.prop.yearFirstRegistered, FETYPE.OTHERASSETS.VEHICLE.prop.value) { var expectedDecreaseCarValuePercentage = 20; var currentYear = new Date().getFullYear(); var age = currentYear - yearFirstRegistered; var factor = 1-(expectedDecreaseCarValuePercentage / 100); var lastYearValue = Math.pow(factor, age) * value; var impairmentThisYear = lastYearValue - (lastYearValue * factor); return impairmentThisYear;} addedToNetWorth = solvencyAfterLivingExpenses + savings + propertiesValueIncrease - expectedDecreaseCarValue
Valg av kunde:
Data og kunder hentes fra dd-dev. Det vil kun være tilgjengelig fra Delfi Data sitt nettverk. Ellers brukes statisk testdata fil(for veiledere).
Customerid:
Output: