IEOR4630-无代写
时间:2023-04-07
Simulation Study
IEOR4630 Asset Allocation
Due: April 9, 2023
1 Description of the Simulation Study
In this project, we will generate synthetic datasets to empirically test the performance of mul-
tiple asset allocation strategies in terms of common metrics. In particular, we conduct simulation
of those allocation strategies and explore the better ones in different situations under different
experiment settings. Eventually, conclusions should be drawn based on what we observe in our
simulation, for example, how the performance of one method varies with respect to the conditions
and why.
1.1 Procedure
At the beginning, random seed must be set up and fixed at the beginning of the
project. Let the seed be the numeric part in your UID. Say my id is “yj2650”, then I set
the seed to be 2650.
We first simulate the data with length T periods. In the market, there is one risk-free asset with
risk-free rate r and d risky assets. Throughout the project, we fix the net risk-free rate r “ 0.002,
T “ 12000, and one period is analogous to one month (so T “ 12000 means 1000 years, it is already
unrealistically long). The purpose to have such a long horizon is to guarantee the stability of the
simulation results.
In particular, we adopt the 1-factor model. That is, there is one risky asset that plays the role
as a factor (think about S&P 500 index), whose net return at time t is denoted by Rfactor,t P R,
and the net return of the rest d´ 1 risky assets is denoted by Rt which satisfies:
Rt ´ r “ α`BpRfactor,t ´ rq ` ϵt, (1)
1
where we denote α P Rd´1 as the mispricing vector, B P Rpd´1qˆ1 as the factor loading coefficient,
and ϵt P Rd´1 as the idiosyncratic noise at time t. The data generating process will be detailed in
Section 1.2.
Now suppose you have already generated data, it gives you a matrix consisting of returns of in
total d risky assets for T periods. Then we test using the rolling window: Suppose the window
length is M , then at each time step t, we use the data of all d risky assets in steps t´M , t´M `1,
..., t ´ 1 to calculate the optimal allocation and then form a portfolio correspondingly. Whenever
we finished the estimation and solved the optimal allocation for time step t, we move one step
forward to t ` 1 and do the same thing, until the final time step T . That is, we always use the
most recent M observations to compute for the next allocation, apply it for one period, and then
we update our training set.
Finally we can collect the returns of the portfolio constructed by various methods and evaluate
their performance. For the required methods, see Section 1.3. For metrics, see Section 1.4.
1.2 Data Generating Process and Experiment Configuration
You are supposed to conduct the simulation study under the following six different configura-
tions:
Table 1: A summary of experiment configurations
Experiment d M Normal i.i.d. Alpha Effect
1 10 120 yes yes 0 baseline
2 50 120 yes yes 0 number of assets
3 10 120 yes yes Uniform mispricing alpha
4 10 120 yes AR(1) 0 intertemporal correlation
• For experiment 1, 2:
1. Construct the loading vector B for all d ´ 1 risky assets. For each i, simulate Bi „
Ur0.50,1.50s, uniform distribution on r0.5, 1.5s interval.
2. Construct the noise covariance matrix Σϵ for all d ´ 1 risky assets. For each i, first
simulate σi „ Ur 0.10?
12
, 0.30?
12
s, and then define Σϵ “ diagtσ21, ¨ ¨ ¨ , σ2d´1u, a diagonal matrix.
3. Fix α “ 0.
4. For t “ 1 to T :
Simulate Rfactor,t „ N p0.009, 0.002q, a uni-variate normal distribution with mean 0.009
2
and variance 0.002 (not standard deviation, be careful in your program), and simulate
ϵˆt „ N p0,Σϵq. Then calculate Rt “ r `α`BpRfactor,t ´ rq ` ϵˆt.
• For experiment 3:
1. Construct the loading vector B for all d ´ 1 risky assets. For each i, simulate Bi „
Ur0.50,1.50s, uniform distribution on r0.5, 1.5s interval.
2. Construct the noise covariance matrix Σϵ for all d ´ 1 risky assets. For each i, first
simulate σi „ Ur 0.10?
12
, 0.30?
12
s, and then define Σϵ “ diagtσ21, ¨ ¨ ¨ , σ2d´1u, a diagonal matrix.
3. Construct alpha for all d´ 1 risk assets. For each i, simulate αi „ Ur´0.05,0.05s.
4. For t “ 1 to T :
Simulate Rfactor,t „ N p0.009, 0.002q, a uni-variate normal distribution with mean 0.009
and variance 0.002, and simulate ϵˆt „ N p0,Σϵq. Then calculate Rt “ r ` α `
BpRfactor,t ´ rq ` ϵˆt.
• For experiment 4:
1. Construct the loading vector B for all d ´ 1 risky assets. For each i, simulate Bi „
Ur0.50,1.50s, uniform distribution on r0.5, 1.5s interval.
2. Construct the noise covariance matrix Σϵ for all d ´ 1 risky assets. For each i, first
simulate σi „ Ur 0.10?
12
, 0.30?
12
s, and then define Σϵ “ diagtσ21, ¨ ¨ ¨ , σ2d´1u, a diagonal matrix.
3. Fix α “ 0.
4. For t “ 1 to T :
Simulate Rfactor,t “ 0.01´0.112ˆRfactor,t´1`ηt, where ηt „ N p0, 0.002q with Rfactor,0 „
N p0.009, 0.002q, and simulate ϵˆt „ N p0,Σϵq. Then calculate Rt “ r`α`BpRfactor,t´
rq ` ϵˆt.
1.3 Methods Implemented
In this project, we will implement and compare the following asset allocation methods:
Theoretical
0. Once you generate α,B,Σϵ, you may calculate the theoretically mean-variance efficient
allocation (theory)
3
Benchmark (computation-free)
1. “1/N” with rebalancing (ew)
2. Market Portfolio/Factor Portfolio (mkt)
Classical Statistical Approach [Programming Homework 3]
3. Sample-based mean-variance (mv)
4. 1-Factor-model (use the factor model to estimate the covariance matrix) (1f)
5. Bayes-Stein (shrink to minimum variance portfolio, as in Jorion, 1986, see Lecture 4)
(bs)
6. Ledoit-Wolf (linear shrinkage of covariance matrix to an identical matrix, see Lecture 4)
(lw)
Moment restrictions
7. Minimum-variance with sample based mean-variance (we also have the analytical solu-
tion, so no need to call optimization package) (min)
Portfolio constraints [You have to use optimization package to solve these constrained mean-
variance optimization problems]
8. Sample-based mean-variance with no-shortsale constraints (mv-c)
9. Bayes-Stein with no-shortsale constraints (bs-c)
10. Ledoit-Wolf with no-shortsale constraints (lw-c)
11. Minimum-variance with sample based mean-variance and no-shortsale constraints (min-
c)
1.4 Performance Metrics
We are interested in two metrics:
• Out-of-sample average return (ORtn): µˆOOS .
• Out-of-sample Sharpe ratio (OSR): µˆOOS´rσˆOOS .
4
Here, the out-of-sample means: from t “ M ` 1 to T , we use data from t ´M, ¨ ¨ ¨ , t ´ 1 to
estimate and construct a portfolio, whose allocation proportion is denoted by aptq P Rd. Recall
that we have in total d risky assets (d´ 1 individual assets and one factor asset) and one risk-free
asset. We hold this portfolio for one period, whose return at time t is
Xt “
ÿ
asset i in all risky assets
a
ptq
asset iˆreturn of asset i at time t`
¨˝

ÿ
asset i in all risky assets
a
ptq
asset i
‚˛ˆ r.
µˆOOS “ 1T´M
řT
t“M`1Xt is the sample mean, and σˆOOS is the standard deviation ofXM`1, ¨ ¨ ¨ , XT .
1.5 User-defined Inputs
There are user-defined inputs that will be used in the implementation of various methods.
Besides tuning parameters that will be used in any optimization solvers/packages (e.g., algorithms,
error tolerance, maximum iterations, etc.), we still need to specify the following to implement
mean-variance-based methods. In principle, they are up to user’s choice, but we may suggest some
typical values. You may or may not follow them.
• κ: the target expected net return in the constrained formulation. Typically κ P p0.1512 , 0.312 q.
(meaning that the annualized net return is about 15% to 30%, and we divide by 12 to convert
to monthly return)
• γ: the risk-averse coefficient in the penalty formulation. Typically γ P p1, 5q.
2 Questions to Address
By observing the results, you are supposed to write a report to address the following questions:
• Under each configuration, how does each mean-variance-based method perform compared to
its theoretical counterpart (method 0) and compared to each other? What are the possible
explanations for your findings?
• For each mean-variance-based method, how does its performance vary under different con-
figurations? What are the possible explanations for your findings? Why do some methods
perform better or worse when the configuration changes from one to the another?
5
• Which methods (including two benchmarks methods 1 and 2) may perform well in the real
market?
3 Deliverables
You are supposed to submit your code together with your report.
• The report should be a PDF file containing only texts, formulas, tables and figures. It should
contain the following content: an introduction of the main findings, a brief summary of the
formulas you used to implement each method, organized and clear presentation of numerical
results in suitable ways under various settings, e.g., tables or figures, and thorough discussion
of the results you get (also clearly indicate the user-defined inputs), the comparisons you
make, and the final conclusion you draw. Do not include code in the main text of the report.
• The code can be written in any programming language and you can use any existing packages
for optimization. It should contain one main function that has the following form:
a “ functionpd,M,R,method, paraq,
where the inputs d stands for the number of assets, M stands for the number of observation
used for training, R P RdˆM is a matrix that stands for training data of the return of each
asset at each time, method is a string that specifies the methods to use, para is a list of
variables that contain additional parameters required to implement each method, and the
output a stands for the allocation weight computed by the specified method.
4 Rubrics
The simulation study counts for 30% of final grade. 15% will be evaluated based on the cor-
rectness of your results via weekly/biweekly programming homework. The rest 15% is based on
the quality of your report and code. No restrictions on the format (page limit, line spacing, etc.).
• Basic rules: since you are supposed to fix the random seed, the results you report should be
reproduced by running your code. Unless you have the same UID, the results will not be
identical. If you cheat and fabricate numerical results, you get 0 for this project and may be
subject to disciplinary actions.
6
• The report will mainly be judged by the completeness (whether you implement all methods
and test under all settings as required), the cleanness of presentation (whether it is easy to
read and follow), the correctness of the numerical results (even though they may be different
slightly due to different random seeds, they will not violate the commonly agreed conclusions
too much), the thoroughness of your conclusions and discussions.
• The code will mainly be judged by its cleanness (meaning that whether it is easy to read) and
correctness (meaning that no bugs in the code so that the program can be executed without
error). The correctness of implementation will be reflected through the weekly/biweekly
programming homework.
essay、essay代写