1. Homepage
  2. Programming
  3. CPT206 Computer Programming for Financial Mathematics - Coursework2 Brennan-Schwartz model

CPT206 Computer Programming for Financial Mathematics - Coursework2 Brennan-Schwartz model

Engage in a Conversation
XJTLUCPT206Computer Programming for Financial Mathematics Java

CPT206 Computer Programming for Financial Mathematics: CourseNana.COM

Coursework 2 Task Specification CourseNana.COM

Thomas Selig CourseNana.COM

Due date: Sunday, 24 April, 2022, 10pm CourseNana.COM

  CourseNana.COM

This is the specification task sheet for the Coursework 2 assessment component of your CPT206 module. This is worth 15% of your final grade for this module. The submission deadline for this assignment is Sunday, 24 April, 2022, at 10pm. Detailed submission instructions are provided in Section 5. CourseNana.COM

  CourseNana.COM

The aim of this coursework is to implement the Brennan-Schwartz model, a two factors model that simulates the dynamics of short and long term interest rates. The model was first introduced by Michael Brennan and Eduardo Schwarz in 1982, and has been widely used as a financial model of interest rates since then. It has also been used to model apparently unrelated phenomena, such as population growth rates. As part of this task, you will also produce a report documenting your design choices, detailed in Section 4. CourseNana.COM

  CourseNana.COM

1 Model dynamics CourseNana.COM

The model is a two factors model of both short-term and long-term interest rates over a given time period. We write r(t) for the short-term rate, also called the spot rate, and `(t) for the long-term rate, also called the consol rate. The dynamics of the model are given by the following equations: CourseNana.COM

  CourseNana.COM

See https://quant.stackexchange.com/questions/24472/two-correlated-brownian-motions for an indication on how to simulate the two random variables dW1(t) and dW2(t). For simplicity, we will choose the values supplied by Brennan and Schwartz in their original paper for the constants of the model, given in the table below. CourseNana.COM

  CourseNana.COM

2 Task description (60 marks) CourseNana.COM

You will write a Java program that simulates the Brennan-Schwarz model over a given time period. Your Java program should be written in a single Main class called BrennanSchwarz. As well as the constants above, your program should take the following input paramters: CourseNana.COM

• initial rates r0, `0 > 0; CourseNana.COM

• a time period T > 0 and a positive integer n indicating the number of increment intervals. CourseNana.COM

  CourseNana.COM

The idea is to break down the time period [0, T] into n increment intervals of length dt = Tn , and apply the Euler method to Equations (1) and (2) to simulate the model over that time period. In other words, we should have: r(t = 0) = r0 and `(t = 0) = `0, and for any given time t = kTn for some k 2 {0, . . . , n − 1}, r(t + dt) = r(t) + dr(t) and `(t + dt) = `(t) + d`(t), where the increments dr(t) and d`(t) are is given by Equations (1) and (2). CourseNana.COM

  CourseNana.COM

On executing, your program should calculate and display the following information: CourseNana.COM

1. the values of the rate functions r(t) and `(t) over the chosen time period (i.e. should show the values of r(t) and `(t) for all t of the form t = kTn as above); CourseNana.COM

2. the minimum and maximum values of the rate functions, and the time(s) at which these are achieved; CourseNana.COM

3. the maximum displacements  r and  ` of the rate functions over all intervals of length dt1, and the time period(s) in which these are achieved; CourseNana.COM

4. the average values of the rate functions. CourseNana.COM

  CourseNana.COM

The display should be readable, and informative. Values should be rounded to a sensible length (e.g. five digits after the decimal point). CourseNana.COM

  CourseNana.COM

3 Code quality (20 marks) CourseNana.COM

The remaining marks (20) for the coding part will be awarded for general code quality as seen in the course materials to date. Here is some guidance. CourseNana.COM

  CourseNana.COM

• Keep your code neat and tidy; make sure it is properly indented throughout. CourseNana.COM

• Choose suitable names for variables and methods. CourseNana.COM

• Comment your code as needed. CourseNana.COM

• Split your code into separate methods as appropriate; code in the main method should be CourseNana.COM

  CourseNana.COM

kept to a minimum; methods overall should not be too long. CourseNana.COM

  CourseNana.COM

4 Report (20 marks) CourseNana.COM

  CourseNana.COM

You will write a short report (no more than three pages in length) providing some details on how you designed and implemented your program, as described in Section 2. You should explain the design choices you made for your Java program. You should consider the following questions. CourseNana.COM

• What are the different members (class variables or methods) of your Java class? What is their purpose? CourseNana.COM

• How did you proceed in implementing the model’s dynamics as described by Equations (1) and (2)? How did you calculate the various statistics associated with the rate functions? CourseNana.COM

Get in Touch with Our Experts

WeChat WeChat
Whatsapp WhatsApp
XJTLU代写,CPT206代写,Computer Programming for Financial Mathematics 代写,Java代写,XJTLU代编,CPT206代编,Computer Programming for Financial Mathematics 代编,Java代编,XJTLU代考,CPT206代考,Computer Programming for Financial Mathematics 代考,Java代考,XJTLUhelp,CPT206help,Computer Programming for Financial Mathematics help,Javahelp,XJTLU作业代写,CPT206作业代写,Computer Programming for Financial Mathematics 作业代写,Java作业代写,XJTLU编程代写,CPT206编程代写,Computer Programming for Financial Mathematics 编程代写,Java编程代写,XJTLUprogramming help,CPT206programming help,Computer Programming for Financial Mathematics programming help,Javaprogramming help,XJTLUassignment help,CPT206assignment help,Computer Programming for Financial Mathematics assignment help,Javaassignment help,XJTLUsolution,CPT206solution,Computer Programming for Financial Mathematics solution,Javasolution,