1. Homepage
  2. Programming
  3. [2022] CPT206 Computer Programming for Financial Mathematics: Coursework Resit Task - Stock portfolio management system

[2022] CPT206 Computer Programming for Financial Mathematics: Coursework Resit Task - Stock portfolio management system

Contact Us On WeChat
CPT206Computer Programming for Financial MathematicsXJTLUJavastock portfolio management system

CPT206 Computer Programming for Financial Mathematics: Coursework Resit Task Specification CourseNana.COM

Thomas Selig CourseNana.COM

Due date: Sunday, 31 July, 2022, 10pm CourseNana.COM

This is the specification task sheet for the Coursework resit assessment of your CPT206 module. The task covers all Learning Outcomes, and has a weighting of 100% towards the final grade for this module. This assignment has two parts: a coding part described in Section 1, and a report described in Section 2. The submission deadline for this assignment is Sunday, 31 July, 2022, at 10pm. Detailed submission instructions are provided in Section 3. CourseNana.COM

1 Program description (65 marks) CourseNana.COM

The aim of this coursework is to build a stock portfolio management system. All the work should be coded into a single Java NetBeans project, with the class structure and different functionalities of the program described as follows. All classes should be properly encapsulated, as seen in the Lectures and Labs throughout the semester. Your project should also contain a Controller class for testing. CourseNana.COM

1.1 StockOption class (10 marks) CourseNana.COM

The basic building block of the program will be a StockOption class. A StockOption object comprises of a “ticker” (e.g. "BABA") that identifies the option, the current price of the option, and its volatility coefficient (which should be a number between 0 and 1). CourseNana.COM

Stock option prices should update randomly, via an update() method, according to the following formula: CourseNana.COM

Pnew =Pold(1+vr), CourseNana.COM

Pnew is the new current price of the option (after update); • Pold is its old current price (before update);
v is its volatility coefficient;
r is a uniform random variable on [1, 1]. CourseNana.COM

For security purposes, StockOption objects should be immutable, so the update() method should return a new StockOption object with the updated price. CourseNana.COM

1.2 TradingBusiness class (25 marks)
A trading business is an organisation that trades (buys and sells) stock options. A TradingBusiness CourseNana.COM

object should have a name, and a stock portfolio, describing which stock options, and how many 1 CourseNana.COM

shares in these options, the business currently holds. The portfolio should also store the business’s net spend on each stock option that it currently holds. The net spend on a given stock option o is calculated as follows. CourseNana.COM

·       If the business holds no shares in the option o, the net spend is 0. CourseNana.COM

·       If the business buys k shares in the option o, with a current price of p, increase the net spend CourseNana.COM

by k × p. CourseNana.COM

·       If the business sells k shares in the option o, with a current price of p, decrease the net spend CourseNana.COM

by k × p.
You should choose a suitable data structure in the Java collection framework for this, keeping in

mind that the business can hold a particular stock option at most once, but can hold any (positive) number of shares in such a stock option. Leave a comment in your code explaining your choice of data structure for this. CourseNana.COM

A trading business’s main responsibility is to buy and sell stock shares. CourseNana.COM

·       When buying shares, the business should specify which stock option they wish to invest in, and how many shares they wish to buy. If the business already holds some shares in that CourseNana.COM

particular stock option, this should modify the net spend, as outlined above. CourseNana.COM

·       When selling shares, the business should have the option of either selling a given number of shares in a particular stock option, or selling all shares of that stock option. In the first case (selling a given number of shares), this should modify the net spend on that option, as outlined above. In the second case (selling all shares), this should remove that particular stock option from the business’s portfolio. CourseNana.COM

·       A trading business should also be able to find out how much profit they would make if they sold all shares currently held in a given stock option at the current price. The profit is given by the amount of money that would be made by selling all the shares in that option, minus the current net spend on the option. CourseNana.COM

·       There should also be an updateAll() method that updates the prices of all stock options held by the business, according to the price update formula in Section 1.1. CourseNana.COM

·       Finally, a trading business should be able to obtain its current valuation, defined as the total money the business would make from selling all shares held in their stock option portfolio. CourseNana.COM

1.3 TradingCompany class (15 marks) CourseNana.COM

A trading company is a trading business with an added attribute measuring the company’s liquidity: the amount of money (in liquid, rather than stock option, form) currently held by the company. When a trading company is launched, it has an empty stock portfolio to begin with. CourseNana.COM

The TradingCompany class should have the same functionalities as the TradingBusiness class, with the following modifications. CourseNana.COM

·       When selling shares, the money raised from that sale is added to the company’s liquidity. CourseNana.COM

·       When buying shares, the money spent on that acquisition is removed from the company’s liquidity, and this operation can only be processed if there is sufficient remaining liquidity. CourseNana.COM

·       The valuation of a trading company is the total money they would make from selling all their shares, plus their current liquidity. CourseNana.COM

The company can also liquidate (sell) all of its current stock option portfolio at any given time. 2 CourseNana.COM

1.4 Code quality (15 marks) CourseNana.COM

The remaining marks (15) will be awarded for the quality of your code, as covered throughout the semester in the Lectures and Labs. CourseNana.COM

• Keep your code neat and tidy; make sure it is properly indented throughout.
• Choosesuitablenamesforvariablesandmethods,respectingstandardJavanamingconventions. • Comment your code as needed.
• Split your code into separate methods as appropriate; methods should not be too long.

2 Report (35 marks) CourseNana.COM

For this part of the assignment, you will write a report detailing how you designed, implemented, and tested the program described in Section 1. The report should be typed into e.g. a Word document, and submitted as a PDF (see Section 3 for more details). CourseNana.COM

2.1 System design and implementation (20 marks) CourseNana.COM

You should explain the design and implementation of your system in terms of its class structure, and how you incorporated some of the OOP concepts covered in the course materials. This part should be no more than 3 pages in length. You should consider the following questions. CourseNana.COM

2.2 CourseNana.COM

How did you go about implementing some of the main functionalities of the program from Section 1? Here you should pay particular attention to explaining some of the more complicated features in your system (i.e. no need to detail a getter method).
Which OOP concepts are incorporated into your system design? where? (see original task sheet for more details)

Testing description (15 marks) CourseNana.COM

As covered throughout the Lectures and Labs in this module, testing is an essential part of writing computer programs. In your report, you will include a description of how you tested the various parts of the program described in Section 1. You will state clearly what functionalities you tested, and describe how you tested them, thinking carefully about possible corner cases. You may include some sample code if you wish. This section should be one-and-a-half to two pages in length (screenshots excluded). CourseNana.COM

3 Submission instructions CourseNana.COM

In the dedicated “Resit submission” Assignment activity on the Learning Mall Online, you will need to submit the following two (2) documents. CourseNana.COM

·       A single ZIP archive of your entire NetBeans project. Include all the resources your project needs to run. This file will be named “CPT206 Resit Project studentId.zip”. CourseNana.COM

·       Your report from Section 2, typed into e.g. a Word document, and converted into a PDF file. This file will be named “CPT206 Resit Report studentId.pdf”. CourseNana.COM

The submission deadline is: Sunday, 31 July, 2022, at 10pm. 3 CourseNana.COM


Get Expert Help On This Assignment

Scan above qrcode with Wechat

CPT206代写,Computer Programming for Financial Mathematics代写,XJTLU代写,Java代写,stock portfolio management system代写,CPT206代编,Computer Programming for Financial Mathematics代编,XJTLU代编,Java代编,stock portfolio management system代编,CPT206代考,Computer Programming for Financial Mathematics代考,XJTLU代考,Java代考,stock portfolio management system代考,CPT206help,Computer Programming for Financial Mathematicshelp,XJTLUhelp,Javahelp,stock portfolio management systemhelp,CPT206作业代写,Computer Programming for Financial Mathematics作业代写,XJTLU作业代写,Java作业代写,stock portfolio management system作业代写,CPT206编程代写,Computer Programming for Financial Mathematics编程代写,XJTLU编程代写,Java编程代写,stock portfolio management system编程代写,CPT206programming help,Computer Programming for Financial Mathematicsprogramming help,XJTLUprogramming help,Javaprogramming help,stock portfolio management systemprogramming help,CPT206assignment help,Computer Programming for Financial Mathematicsassignment help,XJTLUassignment help,Javaassignment help,stock portfolio management systemassignment help,CPT206solution,Computer Programming for Financial Mathematicssolution,XJTLUsolution,Javasolution,stock portfolio management systemsolution,