<p>This is the replication data for "shrinking factor dimension: A reduced-rank approach", published in Management Science. </p>
<p><br></p>
<p>The "data" folder includes all data files.</p>
<p>The "codes" folder includes four folders with coding scripts: "Matlab for Main", "Python for Figures", "R", and "Matlab for LASSO Factors"</p>
<p><br></p>
<p><br></p>
<p>***** Data*****</p>
<p>Main data files:</p>
<p>Portfolio_returns.xlsx: data of riskfree rate, anomalies, FF48 portfolios, 202 characteristic managed portfolios</p>
<p>stock_ret.mat: common stock returns</p>
<p>stock_ret_nomicro: common stock returns (exclude micro caps)</p>
<p><br></p>
<p>intermediate data files:</p>
<p> S2_1.xlsx, S2_3.xlsx, S2_5.xlsx, S2_6.xlsx: new weighting matrix W2, used for generating alternative RRA factors in Table 4. Run "weighting matrix.R" in folder "codes\R" to create.</p>
<p> FGX_factors.mat: LASSO selected factors using Feng, Giglio, and Xiu (2020) method. Run "FGK_factors.m" in folder "codes\Matlab for LASSO Factors" to create.</p>
<p> SCS_IS.mat: LASSO selected factors using Kozak, Nagel, and Santosh (2020) method. Run "KNS_factors.m" in folder "codes\Matlab for LASSO Factors" to create.</p>
<p> figures.xlsx: </p>
<p> spreadsheet "factor weights 48": weights of PCA, PLS, and 1 to 5 RRA factors. Run "Fig_factors_weights.m" in folder "codes\Matlab for Main" to create.</p>
<p> spreadsheet "alphas 48" : absolute alphas of 48 industry portfolios. Run "Fig_alphas.m" in folder "codes\Matlab for Main" to create.</p>
<p><br></p>
<p>***** How to Replicate ******</p>
<p>Tables: all main codes are in folder "codes\Matlab for Main"</p>
<p>1. Run "Main_code_for_Table1" to create Table 1 (summary statistics of factor proxies).</p>
<p>2. Run "Main_code_for_Table2_Table3" to create Table 2 (performance of different factor models: in-sample) and Table 3 (PLS and RRA factors using alternative basis assets).</p>
<p> Estimated running time:27 mins</p>
<p> </p>
<p>3. Run "Main_code_for_Table4" to create Table 4 (an alternative estimation of RRA factors), besides main data files, also needs S2_1.xlsx, S2_3.xlsx, S2_5.xlsx, S2_6.xlsx.</p>
<p> Estimated running time:4 mins</p>
<p><br></p>
<p>4. Run "Main_code_for_Table5" to create Table 5 (performance of different factor models: out-of-sample).</p>
<p> Estimated running time:3 mins 29 secs</p>
<p><br></p>
<p>5. Run "Main_code_for_Table6" to create Table 6 (performance of RRA factors estimated with a pricing error restriction).</p>
<p> Estimated running time:17 mins 30 secs</p>
<p><br></p>
<p>6. Run "Main_code_for_Table7" to create Table 7 (performance of different factor models with pre-specified FF five factors).</p>
<p> Estimated running time:13 mins</p>
<p><br></p>
<p>7. Run "Main_code_for_Table8" to create Table 8 (performance of alternative PCA factors).</p>
<p> Estimated running time:13 mins</p>
<p><br></p>
<p>8. Run "Main_code_for_Table9" to create Table 9 (performance of LASSO selected factors), besides main data files, also needs FGX_factors.mat and SCS_IS.mat.</p>
<p> Estimated running time:9 mins</p>
<p><br></p>
<p><br></p>
<p><br></p>
<p>Figures: run "Fig1_3.py" in folder "Python for Figures" to create figure 1, 2, and 3. Needs figures.xlsx. Please install openpyxl before running. </p>
<p><br></p>
<p><br></p>
<p><br></p>