// Numbas version: exam_results_page_options {"name": "Valuing multiple cash flows (1 past, 1 current, 1 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, 1 current, 1 future)", "tags": [], "metadata": {"description": "Financial maths. Find the value of 3 payments, where one has occurred in the past, one current and one hasn't yet. 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 occurred in the past, one occurred on that day, and one would not have occurred yet. This means we need to accumulate the first cash flow, add the value of the second and discount the last. 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 one.

\n

\n

Notice that from the evaluation date, {date[4]}:

\n\n

\n

Recall 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

\n

In our situation we have,

\n

$\\displaystyle V=\\var{c1}\\left(1+\\var{ipadec}\\right)^\\var{-gaps[0]}+\\var{c2}+\\frac{\\var{c3}}{\\left(1+\\var{ipadec}\\right)^\\var{gaps[2]}}$

\n

\n

Which 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": {"ipa": {"name": "ipa", "group": "Ungrouped variables", "definition": "random(2..9#0.1)", "description": "", "templateType": "anything", "can_override": false}, "evalyear": {"name": "evalyear", "group": "Ungrouped variables", "definition": "random(2025..2030)", "description": "", "templateType": "anything", "can_override": false}, "evalmonthnumber": {"name": "evalmonthnumber", "group": "Ungrouped variables", "definition": "random(1..12)", "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}, "c2": {"name": "c2", "group": "Ungrouped variables", "definition": "random(1000..10000#250)", "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}, "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+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}, "startyear": {"name": "startyear", "group": "Ungrouped variables", "definition": "random(2005..2019)", "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}, "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}, "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:

\n\n

Determine 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", "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/"}]}