// Numbas version: finer_feedback_settings {"name": "MATH1510 Financial Mathematics 1 Practical 2A", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {"balances": {"definition": "var cells = [[0,0,0,0,value]];\nvar repayment = (value)/((p)*(an));\n\nfor (i=0; i < n; i++) {\n var tobank;\n if (i <= n) {tobank = repayment;}\n else {tobank = 0;}\n var interest = intdec*cells[i][4];\n var payment = repayment - interest;\n var obalance = cells[i][4] - payment;\n \n cells.push([i+1,tobank,interest,payment,obalance]);\n}\n\nreturn cells;", "type": "list", "parameters": [["an", "number"], ["intdec", "number"], ["n", "number"], ["p", "number"], ["value", "number"]], "language": "javascript"}}, "ungrouped_variables": ["value", "p", "n", "interest", "intdec", "v", "an", "repayment", "balance", "sheet"], "name": "MATH1510 Financial Mathematics 1 Practical 2A", "tags": [], "advice": "
A loan scehdule can be used to determine the outstanding balance of a loan. A loan schedule consists of two components:
\nThe total number of payments is the number of payments in one year multiplied by the number of years.
\ntotal number of payments= $np$
\nwhere:
\nIn the above question, substituting in $n$={n} and $p$={p} will give the total number of payments.
\nAs we know the value of the loan and that the repayment each period is like an annuity, we know that the present value of the annuity multipled by the number of periods in a year will give the value of the loan (see Numbas- Annuities PV).
\n$px{a}_{n|}^{p}=loan$
\nwhere:
\nRe-arranging the above:
\n$x={loan \\over p{a}_{n|}^{p}}$
\nIn the above question, working out ${a}_{n|}^{p}$ with an effective interest rate of {interest}% and substituting in loan=£{value} and $p$={p} will give the value of each payment.
\n$i$*OB of previous year
\nAnnual payment - interest component
\nOB of previous year - repayment component of current year
", "rulesets": {}, "parts": [{"precisionType": "dp", "prompt": "What is the value (to two decimal places) of each payment?
", "precisionMessage": "You have not given your answer to the correct precision.", "allowFractions": false, "variableReplacements": [], "precision": "2", "maxValue": "{repayment}", "minValue": "{repayment}", "variableReplacementStrategy": "originalfirst", "strictPrecision": true, "correctAnswerFraction": false, "showCorrectAnswer": true, "precisionPartialCredit": "50", "scripts": {}, "marks": "5", "type": "numberentry", "showPrecisionHint": false}, {"scripts": {}, "precisionType": "dp", "numColumns": "5", "prompt": "Create a table in Excel presenting a loan schedule showing the interest and repayment component of every payment and the outstanding balance. Each entry should be to two decimal places.
\n(Let the first column be the year, second column annual payment, third column interest component, fourth column repayment component and the fifth column outstanding balance.
\nAlter the number of rows by changing the number next to rows and begin the first row with year 1)
\nClick on the button below for hints on Excel functions.
You have not given your answer to two decimal places.
", "allowFractions": false, "variableReplacements": [], "precision": "2", "markPerCell": true, "numRows": "1", "strictPrecision": false, "tolerance": 0, "showCorrectAnswer": true, "correctAnswer": "sheet", "precisionPartialCredit": "50", "correctAnswerFractions": false, "marks": "20", "allowResize": true}], "statement": "A {n} year loan of £{value} is to be repaid by equal annual installments at the end of each year. Assume an annual effective interest rate of {interest}% p.a.
", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "preamble": {"css": "", "js": ""}, "variables": {"balance": {"definition": "balances(an,intdec,n,p,value)", "templateType": "anything", "group": "Ungrouped variables", "name": "balance", "description": ""}, "sheet": {"definition": "matrix(balance[1..n+1])", "templateType": "anything", "group": "Ungrouped variables", "name": "sheet", "description": ""}, "repayment": {"definition": "{value}/({p}*{an})", "templateType": "anything", "group": "Ungrouped variables", "name": "repayment", "description": ""}, "value": {"definition": "random(1000..5000#500)", "templateType": "randrange", "group": "Ungrouped variables", "name": "value", "description": ""}, "n": {"definition": "random(4..6#1)", "templateType": "randrange", "group": "Ungrouped variables", "name": "n", "description": ""}, "p": {"definition": "1", "templateType": "number", "group": "Ungrouped variables", "name": "p", "description": ""}, "interest": {"definition": "5", "templateType": "number", "group": "Ungrouped variables", "name": "interest", "description": ""}, "v": {"definition": "1/(1+{intdec})", "templateType": "anything", "group": "Ungrouped variables", "name": "v", "description": ""}, "an": {"definition": "(1-({v}^{n}))/{intdec}", "templateType": "anything", "group": "Ungrouped variables", "name": "an", "description": ""}, "intdec": {"definition": "{interest}/100", "templateType": "anything", "group": "Ungrouped variables", "name": "intdec", "description": ""}}, "metadata": {"notes": "", "description": "", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "contributors": [{"name": "James Fung", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/699/"}]}]}], "contributors": [{"name": "James Fung", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/699/"}]}