Data
Attached are two raw data files you will use. They are directly downloaded from third party, so please do not redistribute. These two files have exactly same format, except two different periods. You need to link them together and use an overlap period – the months that exists in both files.
Columns: Each column actually represent one security. I will refer to those securities as to “Sectors”. Let’s use the first bucket “Years to Maturity (15,15.25)” as example. It has two/three securities: coupon bond, principle bond, and other. The “total” columns are not useful in this exercise.
Tabs: Each tab is one characteristics of this security you will use. It represents: Weights in benchmark, Maturity, Duration, Yield and Return.
Using Raw Data 2 as example, 2/26/1999, there is one sector with weight 1.88390%, maturity of 15.21, duration of 14.77, yield at “5.986%”; and it is a “coupon bond”. It had a return from 2/26/19993/31/1999 equal to 0.09%. So if you collect each of these sector characteristics for the same month, you should be able to calculate benchmark return for March, benchmark duration, benchmark sector weights for total coupon bonds, total principle bonds, total weights in maturity 1520 year, etc.
Task 1: Benchmark return and risk
Assume RawData1 file contains data for benchmark 1; and RawData2 file contains data for benchmark 2. Compute the following and save in easytocompare CSV file. The CSV file will have three columns:
You have to compute the following metrics for each of benchmark:
Note 1: each item from above will go to the column one of the CSV file. For instance,
Metric name 
Benchmark 1 
Benchmark 2 
Annualized return 
0.037521 
0.011256 
Annualized volatility 
0.012345 
0.098765 
… 


Note 2: use an overlap period – the months that exists in both files – to compute these metrics.
Note 3: use all – coupon, principal, and other bonds.
Note 4: to compute one month return, you need to weight returns. In the example above with RawData2 file, the sector with weight=1.88390% and return=0.09% contributed to the monthly return as (1.88390)/100 * (0.09)/100. In other words, the formula for monthly return is
, where
Task 2: Time series analysis
Compute and plot for each benchmark:
Compute and show as a single number(s):
Task 3: Optimization
Roll down expected return of sector A = (Yield of sector A –Yield of sector B )/(Maturity of sector AMaturity of sector B)* Duration of sector A.
Sector B is the sector with shorter maturity. To find one you need to compare maturity of sector in the RawData1 file vs maturity of sector in the RawData2 file.
Compute separately for coupon, principal, and other bucket. Of course, the roll down expected return can be computed only if the data exist in both files. If not, ignore that sector / date combination.
Save the results in CSV file. Choose your own file structure.
The following is for extra credit:
The optimization objective: Ideally we can create an optimized portfolio which deliver better return than benchmark, the standard deviation of the return difference each month is less than 50bps.
assignment on finance
DescriptionIn this final assignment, the students will demonstrate their ability to apply two ma
Path finding involves finding a path from A to B. Typically we want the path to have certain properties,such as being the shortest or to avoid going t
Develop a program to emulate a purchase transaction at a retail store. Thisprogram will have two classes, a LineItem class and a Transaction class. Th
1 Project 1 Introduction  the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of
1 Project 2 Introduction  the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of