Starting from:
$35

$29

Portfolio Optimization Software in C++ under Parallel Shifts in Term Structure Solution

Instructions

    1. If you worked with someone on a speci c problem, make sure you tell me about it. If you do not do this and I notice a verbatim reproduction of material, I consider it as plagiarism. There can be serious consequences to this.

        (a) I will randomly pick 6 students in the class, who will be asked to explain all aspects of their submitted code to me. Do not be disturbed if your name appears in this list { I just need to go through it to ensure the grading is fair.

    2. If you picked-up the solution from some source, make sure you mention it. If you do not do this and I notice a verbatim repro-duction of material, I consider it as plagiarism. There can be serious consequences to this.


    3. Each submitted document should be personalized. I expect to see


        (a) C++ code and header les (if any), the comments in the code should pretty much tell me what you are trying to do

        (b) A PDF version of sample-runs that accompanies each sub-mission, have to be uploaded on Compass by the due date.

    4. The written In-Class Exam will be held during class hours on 17 October 2018.
















1





I want you to write a comprehensive, readable (i.e. put a lot of comments; have meaningful variable names; etc. etc.) Portfolio Optimization Software Package in C++ assuming you have parallel shifts in the term structure.

Input Speci cation: The input le to your software will have the following format:

1st-line:

2nd-line:

3rd-line:

4th-line:

kth-line:

(k + 1)th-line:


#CFs














CF-1’s PV
Maturity
cf
1
cf
1
cf
1
cf1

cf1






1

2

3
4
2
n


2

CF-2’s PV
Maturity
cf
2
cf
2
cf
2
cf2








2

2

2



1
cf2




1

2

3
4



n


CF-3’s PV
Maturity
cf1
cf2
cf3

cfn3







k
k
k




k
CF-k’s PV
Maturity
cf1
cf2
cf3




cfnk
FV of user’s
due













debt obligation
date














(i.e. k-many Bonds; the 1st number in each row is the PV of the bond, followed by the bond’s cash- ows; not all of them have the same maturity; followed by the FV of user’s debt obligation and the time when its is due).

Output Speci cation 1: We do not assume a at term structure, but we assume the term structure changes are parallel (i.e. the yield changes by the same %-age amount for all maturities).

    1. Compute the YTM for each cash  ow.

    2. Compute the duration for each cash  ow.

    3. Compute the convexity for each cash  ow.

Output Speci cation 2 Assuming no changes in term structure, compute the %-age of the face value of each cash ow you would have to purchase to meet the future debt obligation.

Output Speci cation 3: Pick the bond-portfolio that will meet this obli-gation when it is due, and has the largest convexity among all possible portfolio choices. You should pose this as a Linear Programming Problem and use lp solve to nd the optimal answer. Your nal answer will say that we need to buy 1% of rst cash ow, 2% of second cash ow, 3% of third cash ow, etc. No short-selling is permitted (i.e. all your ’s have to be non-negative).


    1. In your write-up, present an explanation of the strategy/method that you used in picking the best portfolio.

    2. Make sure your program will handle the case when there is no portfo-lio that will meet the debt obligation if we are worried about (parallel) movements in the term structure (cf. gure 2).

I also want to see a couple of sample runs (cook-up your own data; or use lesson 4 of my notes).

Partial Credit Information: This should help you decide how your e orts should be spent in the next two weeks.


2





    1. (20 points) Making sure you catch every possible error/infeasibility that might occur in the general setting.

    2. (20 points) Soundness of your theoretical arguments for the design-methodology that you adopt for the portfolio design.

    3. (60 points) The correct functioning of your code.

A sample screen shot is shown in    gure 1.















































3





























































Figure 1: A sample screen shot.
4






















































Figure 2: A sample screen shot of an infeasible set of cash ows.






5
























































Figure 3: A sample screen shot for the example that is done in lesson 4. You can compare these results with those in the Brute-Force Excel Spreadsheets provided on Compass with Lesson 4.


6

More products