MATH5360M01


MATH5360M Optimisation Methods for Finance


Question 1 (30% marks)

Consider a T year European call option with a strike price K and the current stock price S0. Let r be the continuously compounded risk-free interest rate. Assume that the stock price only changes at times , where  and n is the number of periods between 0 and T. Assume that in each period, the stock price goes either up by a factor of u or down by a factor of d where u > d.

The payoff for a European call option VT at maturity is:

where ST is the stock price at time T years.

(a) Write a C++ program that computes the price of a European call option. Consider carefully if your model is arbitrage-free.

Include the output of a binomial tree of stock prices and another binomial tree of values of the option for  with and .

(b) Amend your C++ program in part (a) to allow a user to choose between European call option and European put option. Include the output of your program for a European put option with the same input as above.


Question 2 (70% marks)

The simplex method is a common approach for solving linear programming problems.

Consider the following optimisation problem:

Your task is to write a C++ programme that solves the above linear programming problem using the simplex method.

(a) Describe how you would implement the simplex method to solve linear programming problems.

• In your report, you should describe the implementation, explain which choices you made and how to use your programme.

• You are required to store the simplex tableau in a .txt file. Describe how you would represent the tableau in the text file. The file format should reflect the shape of a simplex tableau.

Hint: After introducing the slack variables and writing it in standard form, the initial tableau is:

(b) Write a C++ programme that implements the algorithm above. Your programme should read the simplex tableau from an input .txt file you created and should output the final result into another .txt file.

(c) Solve the above optimisation problem using your C++ programme.

(d) Solve the same optimisation problem using AMPL.


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 2 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 2 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. Please be reminded that you are only allowed to submit your report and code once on Minerva.

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).