// Numbas version: finer_feedback_settings {"name": "Valuing multiple cash flows (1 past, 2 future)", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Valuing multiple cash flows (1 past, 2 future)", "tags": [], "metadata": {"description": "Financial maths. Find the value of 3 payments, where one has occurred and two haven't. Uses present and future value using compound interest.", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "
If you are unsure of how to do a question, click on Reveal answers to see the full working. Then, once you understand how to do the question, click on Try another question like this one to start again. Do each question repeatedly to ensure you have mastered it.
", "advice": "You are asked to determine the value of three cash flows on {date[4]}. At this point in time, one cash flow would have occured but two would not have. This means we need to accumulate the first cash flow and discount the other two. To do this we need to use the future value compound interest formula on the first cash flow and the present value compound interest formula on the last two.
\n\nNotice that from the evaluation date, {date[4]}:
\nRecall that for compound interest the future value formula is $S=P(1+r)^n$ and the present value formula is $\\displaystyle P=\\frac{S}{(1+r)^n}$.
\n\nIn our situation we have,
\n$\\displaystyle V=\\var{c1}\\left(1+\\var{ipadec}\\right)^\\var{-gaps[0]}+\\frac{\\var{c2}}{\\left(1+\\var{ipadec}\\right)^\\var{gaps[1]}}+\\frac{\\var{c3}}{\\left(1+\\var{ipadec}\\right)^\\var{gaps[2]}}$
\n\nWhich upon calculation gives
\n$\\begin{align*}V&\\approx\\var{V}\\\\&=\\$\\var{V_display} \\quad\\text{(to the nearest cent)}\\end{align*}$
\n\n", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"evalmonthnumber": {"name": "evalmonthnumber", "group": "Ungrouped variables", "definition": "random(1..12)", "description": "", "templateType": "anything", "can_override": false}, "evalyear": {"name": "evalyear", "group": "Ungrouped variables", "definition": "random(2025..2030)", "description": "", "templateType": "anything", "can_override": false}, "startmonth": {"name": "startmonth", "group": "Ungrouped variables", "definition": "random(months)", "description": "", "templateType": "anything", "can_override": false}, "date": {"name": "date", "group": "Ungrouped variables", "definition": "[\n startday+' '+startmonth+' '+startyear,\nD+' '+months[M[0]-1]+' '+Y[0],\n D+' '+months[M[1]-1]+' '+Y[1],\n D+' '+months[M[2]-1]+' '+Y[2],\n D+' '+months[evalmonthnumber-1]+' '+evalyear\n ]", "description": "", "templateType": "anything", "can_override": false}, "ipa": {"name": "ipa", "group": "Ungrouped variables", "definition": "random(2..9#0.1)", "description": "", "templateType": "anything", "can_override": false}, "gaps": {"name": "gaps", "group": "Ungrouped variables", "definition": "sort([random(-5..-1#0.5)]+random(2..10)+random(2.5..10.5))", "description": "", "templateType": "anything", "can_override": false}, "Vrounded": {"name": "Vrounded", "group": "Ungrouped variables", "definition": "precround(V,2)", "description": "", "templateType": "anything", "can_override": false}, "Y": {"name": "Y", "group": "Ungrouped variables", "definition": "if(evalmonthnumber<=6,\n[\nfloor(evalyear+(gaps[0])),floor(evalyear+(gaps[1])),floor(evalyear+(gaps[2]))\n],\n[\nceil(evalyear+(gaps[0])),ceil(evalyear+(gaps[1])),ceil(evalyear+(gaps[2]))\n])", "description": "", "templateType": "anything", "can_override": false}, "D": {"name": "D", "group": "Ungrouped variables", "definition": "random(1..25)", "description": "", "templateType": "anything", "can_override": false}, "c2": {"name": "c2", "group": "Ungrouped variables", "definition": "random(1000..10000#250)", "description": "", "templateType": "anything", "can_override": false}, "months": {"name": "months", "group": "Ungrouped variables", "definition": "['January','February', 'March', 'April', 'May', 'June', 'July', 'August', 'September','October','November','December']", "description": "", "templateType": "anything", "can_override": false}, "V": {"name": "V", "group": "Ungrouped variables", "definition": "c1*(1+ipadec)^-gaps[0]+c2*(1+ipadec)^-gaps[1]+c3*(1+ipadec)^-gaps[2]", "description": "", "templateType": "anything", "can_override": false}, "startday": {"name": "startday", "group": "Ungrouped variables", "definition": "random(1..25)", "description": "", "templateType": "anything", "can_override": false}, "M": {"name": "M", "group": "Ungrouped variables", "definition": "[mod(evalmonthnumber-1+12*gaps[0],12)+1,\n mod(evalmonthnumber-1+12*gaps[1],12)+1,\n mod(evalmonthnumber-1+12*gaps[2],12)+1]", "description": "", "templateType": "anything", "can_override": false}, "c1": {"name": "c1", "group": "Ungrouped variables", "definition": "random(1000..10000#250)", "description": "", "templateType": "anything", "can_override": false}, "c3": {"name": "c3", "group": "Ungrouped variables", "definition": "random(1000..10000#250)", "description": "", "templateType": "anything", "can_override": false}, "ipadec": {"name": "ipadec", "group": "Ungrouped variables", "definition": "ipa/100", "description": "", "templateType": "anything", "can_override": false}, "startyear": {"name": "startyear", "group": "Ungrouped variables", "definition": "random(2005..2019)", "description": "", "templateType": "anything", "can_override": false}, "V_display": {"name": "V_display", "group": "Ungrouped variables", "definition": "latex(join(split(dpformat(V,2,'si-en'),\" \"),\"\\\\ \"))", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["months", "gaps", "startmonth", "startyear", "startday", "D", "evalyear", "evalmonthnumber", "Y", "M", "date", "c1", "c2", "c3", "ipa", "ipadec", "V", "Vrounded", "V_display"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Suppose on {date[0]} you signed a contract which entitled you to the following future cash flows:
\nDetermine the value of these cash flows on {date[4]} assuming that the relevant effective interest rate is $\\var{ipa}\\%$ per annum.
\n\n$\\$$ [[0]] (to the nearest cent)
", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "V", "maxValue": "V", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "precisionType": "dp", "precision": "2", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the nearest cent.", "strictPrecision": false, "showPrecisionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question", "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}]}]}], "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}]}