程序代写案例-AUTUMN 2021

欢迎使用51辅导,51作业君孵化低价透明的学长辅导平台,服务保持优质,平均费用压低50%以上! 51fudao.top
25579 – Applied Portfolio Management 1
25579 AUTUMN 2021
Assignment
February, 2021
Marco Navone, [email protected]
The “quality” factor has become one of the strongest and most scalable investment strategies in
equity markets. Your investment firm is thinking of launching a product based on this factor and as
junior member of the newly formed quant research team, you are tasked by your boss to produce a
comprehensive report on this investment strategy.
Deadline: 9.00am Monday 10 May 2021
Score: 40 marks
1. Introduction and background
Around 2013, Cliff Asness, the CEO of AQR published a working paper (later published as Asness
et al., 20191) where he, together with other co-authors, introduced an investment factor called
“Quality”, based on investing in firms with:
• High profitability
• Strong growth
• Low risk and leverage
Frazzini et al. (2018)2 show that this factor largely mimics the investment style of Warren
Buffet.
This investment factor has become very popular and is used by a variety of investment
companies, for example:
• iShares MSCI USA Quality Factor ETF
• Invesco S&P 500® Quality ETF
• AQR Large Cap Multi-Style Fund (where it seems to have replaced “profitability” from
2021).
A number of these products are also available in Australia, here is a comprehensive analysis.

1 Asness, C., Frazzini, A., & Pedersen, L. (2019). Quality minus junk. Review of Accounting Studies, 24(1),
34–112.
2 Frazzini, A., Kabiller, D., & Pedersen, L. (2018). Buffett’s Alpha. Financial Analysts Journal, 74(4), 35–55.
25579 – Applied Portfolio Management 2
Like for other more traditional factors, such as a value and momentum, academics and
practitioners do not have a definitive answer on “why it works”. Bouchaud et al. (2016)3 argue
that a risk-based explanation is unlikely and advance some behavioural explanations similar to
the ones we have analysed for the value and momentum factors.
The CIO (Chief Investment Officer) of your company is exploring the possibility to launch a
product in this space and asks the quant research team to prepare a short analysis of this
investment factor.
Your report will have the following components:
1. Presentation of the fundamental intuition behind this strategy.
2. Statistical analysis (both linear and non-linear) of the predictive power of the quality
factor and its three components (Profitability, Growth and Safety).
3. Detailed backtesting of a long-only strategy based on the quality factor.
4. Detailed backtesting of a long-short strategy based on the quality factor.
There is no formal length requirement for this assignment. My suggestion is to aim at
anywhere between 10-15 pages of “main text” including tables and pictures. You may also add
an appendix if you want to add more tables, etc. Please be sure that all the necessary
information is actually in the main body of the report.

2. Presentation of the Strategy
This should be a presentation of the economic intuition behind the quality factor. After
reading this part the reader should:
• What fundamental economic concepts underpin this strategy.
• Understand what types of companies are the target of this strategy.
• Why should this strategy work? Are quality stock riskier? Is this an “anomaly”?
This part will be mainly descriptive (although, if you want, you may add a table and/or a graph
if you need it to make a point). The intended audience is the Chief Investment Officer of your
firm, so you can assume a high level of sophistication and a good understanding of finance.
As a reference material for this part, you can refer to:
• Asness et al. (2019). Stick to the introduction only, the rest of the paper is interesting
but quite technical.

3 Bouchaud, J. P., Ciliberti, S., Landier, A., Simon, G., & Thesmar, D. (2016). The Excess Returns of Quality
Stocks: A Behavioral Anomaly. HEC Paris Research Paper No. FIN-2016-1134.
25579 – Applied Portfolio Management 3
• Bouchaud et al. (2016). Also here do not lose yourself in the details. You are mainly
interested in the economic intuition.
You may also find our sources of information, but please be careful because contrary to other
factors, quality is very loosely defined and different banks use different definitions. For the
sake of this assignment, we will stick with the AQR definition. So, if you look at other sources,
just make sure they are taking about the same thing.
The length of this part should be one page of text plus optional graphs and tables. For this
part only you can take graphs and tables from other sources (with proper citation). Please limit
the number of graphs and tables in this part. It should be mostly about providing the economic
intuition in your own words.

3. Statistical Analysis
In the second part of your assignment, you should present a detailed statistical analysis of the
predictive power of the Quality factor and of its three sub-components (Profitability,
Growth and Safety). The analysis should contain:
• Linear analysis (Regression).
• Non-linear analysis (Information Coefficient and Quantile Analysis).
In doing this analysis you should use all the available data (1980-2020) and you should show
how the predictive power changes in time. After reading this part the reader should
understand:
• How strong is the predictive power of quality, and of its components, over the entire
sample.
• How this predictive power has changed in time over our sample.

3.1 Predictive power and the economic environment
We know that factors tend to react differently to the economic environment. At page 6 of this
document MSCI analyses the performance of the quality factor in four different economic
environments based on the Composite Leading Indicator.
Using the data provided replicate this analysis showing how the predictive power of the
Quality factor, and of its three components, varies across these economic regimes. You should
do this only for one measure of predictive power (Regression coefficient, Information
Coefficient or Return of Top quantile minus return of the Bottom quantile).
25579 – Applied Portfolio Management 4
Do not worry if your result for the profitability factor is different from the MSCI one. Their
definition of quality is different and they use a different time horizon.
ATTENTION
From the graph at the top of page 6 you will notice that the way MSCI defines the 4 economic
regimes is not based on the value of the leading indicator but based on the change of the
indicator over the previous 3 months. So from the data provided (the value of the leading
indicator for the US economy) you need first to calculate the difference with respect to three
months before (the .shift() method may come useful here) and then you divide these
differences in 4 groups based on the value of the change. Do not worry if your groups are not
exactly the same as MSCI.
For the length of the statistical analysis, you should aim at around 3 pages maximum. If you
feel the need to add many more tables and graphs, consider the possibility to relegate some of
them to the appendix, leaving only your “main narrative” in the body of the report.

4. Backtesting of a long-only strategy
The third part of your report will be a detailed report of the performance of a long-only
strategy that invest in stocks that rank well according to the Quality factor (you should NOT
repeat the analysis for the three sub-components). Your strategy should:
• Invest in the top x% of stocks according to your factor (quantile strategy).
• Be market weighted (and not equally weighted).
• Rebalance monthly.
• Assume 0.1% roundtrip transaction costs.
• Be tested over the entire period at our disposal.
You should optimize your strategy in terms of the key parameter (the x% above) by trying few
different values (from 3 to 5). At the end of this section the reader should:
• Know how the strategy performs over the entire period and if the performance has
changed over time (for example showing the yearly performance or the performance
over periods of 3-5 years…).
• Know how sensible the performance is to the parametrization of the strategy (how the
choice of the parameter affects the overall performance).
• Know how the optimal parameter changes in time over our sample.
In terms of length, for this part you should aim at 2-4 pages based on the number of graphs and
tables that you want to include in the main body of the report.

25579 – Applied Portfolio Management 5
ATTENTION
To optimize your strategy, you have two option:
Option 1 – Sub-period analysis
1. You backtest your strategy over the entire period using each of your parameter values and
find out which is the optimal parameter.
2. You repeat the backtesting over non-overlapping subperiods of 5 years and find which
would be the optimal parameter over each sub-period.
Option 2 – Walk-forward
You build a walk-forward mechanism where you use 5 years of historical data to find the
optimal parameter and then use that parameter to invest in the following month. Then you
advance your data by one month and repeat the analysis. At the end you will have both the time
series of the (optimized) strategy performance and the time series of the optimal parameter.

5. Backtesting of a long-short strategy
The last part of your report will be a detailed report of the performance of a long-short
strategy that overweights stocks that rank well according to the Quality factor and
underweights stocks that rank poorly. Your strategy should:
• be built with a 1XX/XX approach where you overinvest (underinvest) in the top
(bottom) x% of stocks.
• Use an active weight of ±30% (it should be a 130/30 strategy).
• Rebalance monthly.
• Assume 0.1% roundtrip transaction costs.
• Be tested over the entire period at our disposal.
You should optimize your strategy in terms of the key parameter (the x% above) using the
same approach described in the previous section. At the end of this section the reader should:
• Know how the strategy performs over the entire period and if the performance has
changed over time (for example showing the yearly performance or the performance
over periods of 3-5 years…). In presenting the results special relevance should be given
to the tracking error and its time dynamic.
• Know how sensible the performance is to the parametrization of the strategy (how the
choice of the parameter affects the overall performance).
• Know how the optimal parameter changes in time over our sample.
In terms of length, for this part you should aim at 2-4 pages based on the number of graphs and
tables that you want to include in the main body of the report.
25579 – Applied Portfolio Management 6
6. Data
Together with the assignment you will find the following data files:
• QUALITY.zip contains the monthly data of the quality factor for a sample of US stocks.
• PROFIT.zip, GROWTH.zip and SAFETY.zip contain monthly data of the three sub-
components of quality factor (Profitability, Growth and Safety) for a sample of US stocks.
All the factor are already normalized and winsorized.
• LEAD.zip contains monthly data on the leading economic indicator for the US Economy.
• Returns.zip contains the monthly (log-)returns for the US stocks.
• Market_cap.zip contains the monthly market capitalization for the US stocks.
• Names.zip contains the names and industry-affiliation of the US stocks
7. Timeline
The content of the assignment is covered in different weeks of the subject. Here is a rough
estimation of when we the material (and code) necessary for each session is covered:
Assignment Part Week Notebooks / Concepts
1. Presentation of the
Strategy
3 and 4
None. Concept of Investment Factor,
Risk Premium and Market Anomaly
2. Statistical Analysis 3 and 4
07 - Linear Regression
08 - Information Coefficient
09 - Quantile Analysis
3. Long-Only Strategy 5, 6
11 – Backtesting
13 – Walk-Forward Model (optional)
4. Long-Short Strategy 7
14 – 130/30 Portfolios
13 – Walk-Forward Model (optional)

8. Submission
You will submit:
1. A pdf file with your report (APM_XXXXX.pdf)
2. A Jupyter Notebook with all your code (APM_XXXXX.ipynb).
Where XXXXX is your UTS student ID number. Files with wrong names or wrong extension will
attract 1-point penalty.
25579 – Applied Portfolio Management 7
Your pdf report should contain a professionally-looking cover page (no specific format
required) with your name and Student ID.
Tables in the report should be edited and not simply cut and paste images from the Notebook.
The graphs coming from the notebooks should be exported as image files and then inserted in
the report and not “screenshotted and pasted”.
The files will be submitted electronically using the electronic drobox in Canvas.
8.1 Structure of the Jupyter Notebook
1. You can use the empty skeleton file (APM_XXXXX.ipynb) provided adding all the cells that
you need while respecting the general structure.
2. Your python notebook should contain your name and student ID at the top.
3. The first code cell should contain all the import statements.
4. The second code cell should contain all the user-generated functions.
5. The notebook can import any of the libraries used in the subject including the
apmodule_vx libraries. If you want to import a library that we have not used in class, please
check with me beforehand.
6. The file can only load and use the datafiles provided with the assignment or other
datafiles used in the subject. No external data can be used.
7. Your code should be well commented using either markdown cells or # comments in the
code cells.
8. You should use markdown cells to help the reader navigate the file, basically explaining
what you are doing in any code cell (or at least the most relevant ones).
9. You should choose which results to present in the notebook in order to help the reader
without overwhelming. For example, if you simply modify a column in a DataFrame it may
not be necessary to show the result on screen.
10. I need to be able to run your notebook in one go from top to bottom, so before submitting
make sure that all your code runs properly. Do not worry about the running time of your
notebook. You do not need to optimize for speed.
11. You can copy portions of the notebooks created in class, but please do not follow their
structure. The notebooks used in class were designed for teaching purposes and do not
reflect the sequence of objectives of your notebook. Not everything we have done in class
fits with this research project…
You should consider the notebook as the natural complement to the pdf report. imagine that
your reader will go through the report and then, from time to time have a look at the
corresponding section of the Notebook to understand some technical aspect of your model.
25579 – Applied Portfolio Management 8
9. Marking Guide

Component Value
Below Expectations
<50% (Fail)
Meets Expectations
50% - 74% (Pass-Credit)
Exceeds Expectations
≥ 75% (Distinction-HD)
Presentation
of the Strategy
10%
• The presentation of the quality factor betrays
lack of understanding of its economic
fundamentals.
• The analysis of the determinants of the factor ins
confused or insufficient.
• The presentation of the factor is complete and
based on coherent financial and economic
reasoning.
• The presentation is rich and engaging.
• The language is professional and proficient.
• The presentation conveys a deep understanding
of the quality factor and its determinants.
Statistical
Analysis
20%
• There are serious methodological errors in the
analysis.
• The analysis is incomplete.
• The results are not well commented.
• There are no serious methodological errors, and
the analysis is complete.
• The presentation of the results is sufficient.
• The results are presented in a professional
manner providing enough information without
overwhelming the reader.
Macro
Analysis
5%
• The analysis is missing or insufficient.
• There are methodological errors in the analysis.
• The analysis provides some economic intuition.
• The analysis is technically correct.
• The results of the analysis are very well explained
and presented.
Log-Only
Strategy
22.5%
• There are errors in the backtesting process.
• The backtesting process is incomplete.
• The optimization process is incomplete.
• The process is not explained clearly enough.
• The presentation of the results is missing or
insufficient and does not convey sufficient
information.
• There are no errors in the backtesting /
optimization process.
• The process is complete.
• The explanation is sufficiently clear.
• The presentation of the results is sufficient.
• The description of the process is clear, complete
and of professional quality.
• The results are presented in a professional
manner providing enough information without
overwhelming the reader.


[Continues in the next page]

25579 – Applied Portfolio Management 9

Component Value
Below Expectations
<50% (Fail)
Meets Expectations
50% - 74% (Pass-Credit)
Exceeds Expectations
≥ 75% (Distinction-HD)
Long-Short
Strategy
22.5%
• There are errors in the backtesting process.
• The backtesting process is incomplete.
• The optimization process is incomplete.
• The process is not explained clearly enough.
• The presentation of the results is missing or
insufficient and does not convey sufficient
information.
• There are no errors in the backtesting /
optimization process.
• The process is complete.
• The explanation is sufficiently clear.
• The presentation of the results is sufficient.
• The description of the process is clear, complete
and of professional quality.
• The results are presented in a professional
manner providing enough information without
overwhelming the reader.
Quality of the
Presentation
10%
• There are frequent spelling and punctuation
errors.
• The language is often non correct and does not
convey financial concepts in an effective way.
• There is not a common graphic style and colour
palette.
• Graphs and tables are badly formatted.
• There are only minor spelling and punctuation
errors.
• The language is correct, and the financial
terminology properly used.
• There is evidence of editing to make the feel
professional.
• The document has a truly professional tone and
feel.
• The narrative structure s easy to follow.
• The language is very effective, and the key ideas
presented in a succinct but clear way.
• Tables and graphs are effective in
communicating the key results.
Quality of the
Notebook
10%
• The notebook does not run properly.
• The notebook is not commented, or the
comments are insufficient and/or unclear.
• The notebook runs properly
• The comments are sufficiently to allow the
reader to properly follow the process.
• The code is well written and formatted. It makes
good use of functions and packages.
• The variables are properly named and easy to
follow.
• The choice of which intermediate results to
present is effective to help the reader.
• The comments are rich and well-made, allowing
the reader to follow both the financial logic and
the code structure.
• The comments make an effective use of
markdown.


欢迎咨询51作业君
51作业君

Email:51zuoyejun

@gmail.com

添加客服微信: abby12468