MIE 1621 -jupyternotebook代写
时间:2023-04-12
MIE 1621 Computational Project Fall 2017
Instructions: You can use MATLAB or Python to do the following assign-
ment. Hand in your report (hardcopy) to Hassan at BA 8145 and send code
(soft copy) to Hassan by Dec.7th, 5 PM.
Consider the following …nancial optimization model:
minimize
nX
i=1
ixi 2
nX
i=1
nX
i=1
ijxixj
subject to
nX
i=1
xi = 1
We assume there are n …nancial assets (e.g. stocks) such that future prices
(returns) of each asset is random and so each asset i has associated with it an
expected return i and a variance of returns
2
i . Also, asset returns are pairwise
correlated as embodied in the covariance quantities ij for i 6= j.This model
seeks to determine a portfolio of asset weights xi (where xi is the proportion of
investment in asset i ) such that the portfolio maximizes risk-adjusted expected
return (the second term is a measure of risk of a portfolio x). The quantity > 0
is a parameter that controls risk aversion (degree of risk that is tolerable for an
investor). The larger is the more risk averse an investor is. The constraint of
the model ensures that the xi variables are proportions.
(1) Formulate the model above as an unconstrained problem.
(2) Apply Newton’s method, the steepest decent method, and the BFGS
quasi-newton method using a step length of one at each iteration for all three
methods to solve the unconstrained problem in (1) using the data below. Report
on how smoothly the methods ran e.g. how many iterations and how long? was
convergence even observed or did the methods just stop. Note that you will have
freedom as to how you will design your stopping conditions as well as deciding
how to perform the computations required in each iteration. You may want to
put a maximum iterations limit on your methods.
(3) Repeat (2) but use backtracking (see class lecture notes) to get an ap-
proximate step length at each iteration for each of the three methods. Report
on your computational experiments as in part (2).
Data for the Model
Asset 1 2 3
Expected return 1 = 10:73% 2 = 7:37% 3 = 6:27%
ij 1 2 3
1 0.02778 0.00387 0.00021
2 0.00387 0.01112 -0.00020
3 0.00021 -0.00020 0.00115
1
Choose to be between 3.5 and 4.5.
(4) Scaling up: Collect data for n > 3 stocks e.g. Google, Apple, etc...
(see Yahoo or Google …nance) and get the daily adjusted closing prices and
estimate the required parameters (expected returns, standard deviations, and
covariances) for the model above using your n assets and run your methods
to solve this new model. You choose n: If you can get your methods to work
properly for larger the n the better. It is up to you to determine what period
of historial data to use to estimate the parameters but the period should be at
least 6 months.
Be sure to specify the time period you used and the technique of estimation of
the parameters (you do not have to show the computations for these estimations
but describe clearly how you estimated them).
Deliverable: You must write up a brief report which details the methods
that you developed as well as providing the computational results and analysis
of the methods. You must provide the actual code in an appendix of the report.
The code you provide in the appendix must be commented and easy to follow.
You must also print out in the appendix the actual reported computational
results from running your code for the various methods. Finally, the code and
data must be submitted to the TA Hassan. You MUST make sure that your
code is easy to execute so that results can be validated. If it is not easy to get
your code running than marks will be lost! Make sure that your report is well
written, concise and to the point. We do not want too many pages in a report
including the appendix. For example, it su¢ ces to just give the parameter
estimations needed for part (4) and do NOT include in the report the historical
prices of the n assets you chose.
2

学霸联盟
essay、essay代写