CPT206

CPT206 Computer Programming for Financial Mathematics

Coursework 3 Task Specification

Thomas Selig

Set: Saturday 30 April2022

Due date: Sunday, 22 May, 2022, 10pm

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

 

1 Program description(65 marks)

 

The aim of this coursework is to build a program to store,manipulate and retrieve information from the evolution of stock prices over time. 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.

 

11 PricePoint class(10 marks)

The basic building block of the program will be a simple PricePoint data class.A PricePoint object comprises of a pair(tp(t)),where t is a time coordinate, and p(t)the price at time t. PricePoint objects should be compared according to their time coordinate

 

1.2 PriceData class(25 marks)

A PriceData obiect stores a collection of PricePoint obiects. You should choose a suitable data structure in the Java collection framework for thisaccording to the following conditions.

.There should be no duplicate time coordinates among the PricePoint objects in the collection.

.The collection should be maintained in increasing order of time coordinates

Leave a comment in your code explaining your choice of data structure for this

In addition, your PriceData class should have the following functionalities.

1.It should be possible to create either an empty PriceData object(containing no PricePoint

objects),or a customised object according to a specified(Java)Collection of PricePoint objects.

 

2.There should be a method add(PricePoint newPp)to add a new PricePoint to a PriceData object.

3.We can view a PriceData object as a functionp:t→p(t),where we take the linear

interpolation between any consecutive time coordinates of PricePoints.Let ti and tfbe the first and last time coordinates in a givenPriceData object.In addition to being able to get the value p(t) of this linear interpolation for anytime coordinatetet;tfit should be possible to calculate the following statistics:

· the spread of the PriceData, given bytmax(p(t))-tmin(p(t);. the average of the PriceData, given by ff p(t)dt;

· the marimal diferential of the PriceData, given by ,eti-t2 p(ti)-p(t2)

关键词:paper代写  assignment代写

文章详情

其他资讯

创建时间:2022-05-02 09:50