MATH5360M01

This question paper

consists of 3 printed pages,

each of which is identified

by the Code Number MATH5360M01


UNIVERSITY OF LEEDS

Semester 1 2020/2021

Assessed Coursework 1 (15% of total module mark)

MATH5360M Optimisation Methods for Finance

Submission deadline: 2pm on Thursday 25th of March 2021


Question 1 (20% marks)

Consider the following optimisation problem:

(a) Use AMPL to solve this optimisation problem, providing the optimal solution and the optimal value of the objective function.

(b) Use AMPL to compute the reduced cost for any of the variables if they exist. Compute the optimal solution and the optimal value if the objective function is changed to



Comment on the results obtained, focussing your discussion on the reduced cost.

(c) Use AMPL to compute the shadow price, if it exists, for each of the inequality constraints. Explain why it does not exist for some constraints. Compute the optimal value if the right-hand side of the first inequality constraint is decreased from 160 to 145. Explain your result using your shadow price found.

Hint: Read Programming - Week 4.pdf for more information on reduced cost and shadow price.


Question 2 (80% marks)

When a firm is presented with a capital budgeting decision, the most important task is to determine whether a project will prove to be profitable. The net present value (NPV), internal rate of return (IRR) and the payback period (PP) methods are the most common approaches to project selection.

Your task is to write a C++ programme that computes NPV, IRR and PP for different projects and helps the firm manager to select the right project.

For simplicity, we assume that the cash flows of all projects happen at the beginning of every year from year zero. The cash flows for the projects and their net present values are discounted at a same annually compounded rate r > 0.

(a) Define NPV, IRR and PP carefully. Provide an algorithm (pseudocode) for each of the com-putations. Your algorithms for IRR and PP need to be able to handle the following issues:

• the precision of a unique IRR. Implement a numerical method to compute the IRR (with precision of 10−6 ) if it is unique.

• the possibility of no IRR or multiple IRRs. In both cases, you can skip the computation of IRR and output an error message e.g. “No IRR or multiple IRRs may exist, skipping IRR computation! ”. [Hint: a project can have more than one IRR if its cashflows exhibit more than one sign reversal, e.g. from year 0 to 4, the signs of cash flows are “− + −+”. If your programme detects these circumstances, an error message will be displayed.]

• the possibility that the PP may not be appropriate or a modified PP method is required. For example, this may happen when the initial cash flow is positive, or when the cash flows exhibit more than one sign reversal. If your programme detects the above situations, for simplicity, the computation of PP can be skipped and the error message, “PP is N/A”, should be output.

(b) Based on your algorithms, write a C++ programme that:

• allows the user to input the interest rate, r to be applied for discounting and the number of cash flows in the projects;

• allows the user to input the cash flows starting from year zero;

• computes NPV, IRR and PP for all projects

• for each computed measure, gives a suggestion to the user on which project should be selected.

(c) Run your programme for the following two projects with interest rate at 5% and report your answer.


Directions for submission

Electronic submission only: You are required to submit two files electronically to the Assessment Area within the module resource on Minerva no later than 2pm on the deadline date. Failure to meet the initial deadline stated will result in a reduction of marks. The electronic submission should include:

• The report should contain the answers to the questions and any explanation you deem necessary. All C++ and AMPL code should be included as appendices. State the compile you use to run your C++ code. Use the link “Coursework 1 Report” to upload the report.

• All C++ and AMPL code should also be submitted separately. Gather all your C++ files as they are stored by Visual C++ or other compilers (.cpp or .cc; NO pdf, doc, ps, etc.) and your AMPL code files (.dat, .mod or .run), and store them in a zip file or some other common archive format (like rar or tar). Use the link “ Coursework 1 Code” to upload the archive file.

Please ensure that you leave sufficient time to complete the online submission process, as upload time can vary. Accessing the submission link before the deadline does not constitute completion of submission. You must click the “confirm” button for both files before 2pm for your assignment to be classified as submitted on time, if not you will need to submit to the Late Area and your assignment will be marked as late. It is your responsibility to ensure you upload the correct file to the Minerva, and that it has uploaded successfully.

It is important that any file submitted follows the conventions stated below:

• File name - The name of the file that you upload must be your student ID only.

• Assignment title - During the submission process the system will ask you to enter the title of your submission. This should also be your student ID only.

• Front cover - The first page of your report should always be the Assessed Coursework Coversheet (individual), which is available to download from the following location: https: //students.business.leeds.ac.uk/forms-guidance-and-coversheets/

• Student name - You should not include your name anywhere on your assignment (not in the report and not in the code).

Marking: The following aspects of your code are important in the marking: correctness (it does what it is supposed to do), robustness (poor input data is handled gracefully), quality of code (the code is easy to read and understand) and efficiency (it is quick to run and has no unnecessary parts).


END