最优投资组合选择

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

实验案例:——《投资学》期末小组作业展示最优投资组合选择PART01实验目的PART02实验软件PART03实验方案设计PART04实验过程目录/CONTENTSPART01实验目的目的:绘制风险资产集的最小方差边界、有效边界及最优资本配置线,寻找有效边界上的最优风险资产组合实验软件PART02Wind,ExcelPART03实验方案设计选择5只股票和1个无风险资产,绘制风险资产集的最小方差边界、有效边界及最优资本配置线,寻找最优风险资产组合。从上证50中选择5只股票,计算每只股票2016.11.30-2019.11.29每天的收益率,无风险资产收益率设定为3.5%。计算每只股票期间3年的日平均收益率。根据每只股票的收益率序列计算风险资产的样本方差和协方差矩阵。对这5只股票赋以初始权重,计算出风险资产组合的期望收益率Mean、标准差SD,以及与无风险资产相连的资本配置线的斜率(SharpRatio)。运用Excel的规划求解工具,求得有效边界的起点(全局最小方差组合)。通过规划求解工具,在一组变动的期望收益率序列下,求得对应的方差最小化的风险资产组合序列,以绘制最小方差边界。运用规划求解工具,求得最优风险资产组合,即使得资本配置线的斜率(SharpRatio)最大化的风险资产组合。无风险资产点与最优风险资产组合点的连线为最优资本配置线,并绘制最优资本配置线。PART04实验过程(实验步骤、记录、数据、分析)选择了上证50成分股中的5只股票,分别是:浦发银行、三一重工、恒瑞医药、伊利股份、海螺水泥。选择Wind数据库“股票”选项,从“行情序列”中选择这5只股票并导出2016.11.30-2019.11.29的日收盘价格数据(后复权)(如右图):采集选择股票的价格数据'600000.SH''600031.SH''600276.SH''600887.SH''600585.SH'浦发银行三一重工恒瑞医药伊利股份海螺水泥2016/11/30159.029295.4011102.9141346.34675.158562016/12/1158.9363293.58311103.1491359.27977.76882016/12/2158.473290.85641107.151308.22977.188752016/12/5160.3265283.13051108.3271227.2375.862912016/12/6159.5851284.49391126.451232.67675.199992016/12/7158.1949291.76531125.5091261.26375.407152016/12/8158.8437302.67241112.5641245.60876.194372016/12/9160.6971300.85461104.0911245.60875.572882016/12/12162.0873289.94741114.4471230.63475.614312016/12/13159.1217292.67421101.5021224.50876.732992016/12/14159.2144294.03761100.0891204.76975.282852016/12/15154.766294.94651093.971192.51771.38822016/12/16154.3953289.94741096.5591196.60172.299712016/12/19153.0979283.13051100.561199.32370.766712016/12/20150.8737282.6761079.8481191.15570.766712016/12/21151.2444286.31171084.7911196.60171.346772016/12/22150.0396284.03941066.9031202.04671.802522016/12/23150.0396278.13141066.9031188.43370.973872016/12/26150.5957282.22161076.5531185.0371.056742016/12/27149.5762280.85821080.5541182.98870.97387PART04实验过程(实验步骤、记录、数据、分析)按照公式𝑟𝑡=ln(𝑝𝑡+1/𝑝𝑡)计算日收益率,其中pt+1、pt是日收盘价格。结果如左图):计算每只股票每天的收益率'600000.SH''600031.SH''600276.SH''600887.SH''600585.SH'浦发银行三一重工恒瑞医药伊利股份海螺水泥2016/11/302016/12/1-0.06%-0.62%0.02%0.96%3.41%2016/12/2-0.29%-0.93%0.36%-3.83%-0.75%2016/12/51.16%-2.69%0.11%-6.39%-1.73%2016/12/6-0.46%0.48%1.62%0.44%-0.88%2016/12/7-0.87%2.52%-0.08%2.29%0.28%2016/12/80.41%3.67%-1.16%-1.25%1.04%2016/12/91.16%-0.60%-0.76%0.00%-0.82%2016/12/120.86%-3.69%0.93%-1.21%0.05%2016/12/13-1.85%0.94%-1.17%-0.50%1.47%2016/12/140.06%0.46%-0.13%-1.63%-1.91%2016/12/15-2.83%0.31%-0.56%-1.02%-5.31%2016/12/16-0.24%-1.71%0.24%0.34%1.27%2016/12/19-0.84%-2.38%0.36%0.23%-2.14%2016/12/20-1.46%-0.16%-1.90%-0.68%0.00%2016/12/210.25%1.28%0.46%0.46%0.82%2016/12/22-0.80%-0.80%-1.66%0.45%0.64%2016/12/230.00%-2.10%0.00%-1.14%-1.16%2016/12/260.37%1.46%0.90%-0.29%0.12%2016/12/27-0.68%-0.48%0.37%-0.17%-0.12%PART04实验过程(实验步骤、记录、数据、分析)使用Excel的Average函数公式,计算每只股票期间3年的日平均收益率(如左图最后一行):日平均收益率'600000.SH''600031.SH''600276.SH''600887.SH''600585.SH'浦发银行三一重工恒瑞医药伊利股份海螺水泥2019/11/11-2.25%-1.36%-2.69%-1.61%-2.01%2019/11/12-0.41%0.22%0.88%0.65%0.30%2019/11/13-0.08%0.22%1.90%0.03%-0.49%2019/11/14-0.74%0.78%3.17%-0.34%0.75%2019/11/150.08%-1.29%-1.74%-0.52%-0.93%2019/11/180.74%2.14%0.22%0.17%2.29%2019/11/19-0.08%3.19%2.90%2.75%2.73%2019/11/20-1.57%-0.48%-0.66%-1.35%-0.56%2019/11/21-0.67%0.14%-2.56%-0.89%0.92%2019/11/220.25%-0.89%-3.99%-0.48%2.24%2019/11/250.67%3.00%-0.97%0.45%3.90%2019/11/26-0.08%0.20%0.88%0.72%-2.03%2019/11/27-0.58%-0.34%0.84%0.44%-0.47%2019/11/28-0.25%-0.34%0.03%-0.27%0.66%2019/11/29-0.42%-2.46%-4.31%-1.06%-2.57%日平均收益率-0.01%0.12%0.17%0.06%0.14%PART04实验过程(实验步骤、记录、数据、分析)根据10只股票的日收益率序列计算收益率的方差-协方差矩阵。首先应用Excel的“数据分析-协方差”工具,计算出方差和协方差。但这是按照总体的计算方法算出的,对有限样本来说是有偏的,应对其进行自由度调整(当大样本时,可不进行调整)。调整方式为:无偏估计=有偏估计∗观测值观测值−1。由于样本除涵盖了三年的数据,样本量较大,因此本处没有进行调整。调整之后方差和协方差矩阵的结果如右图。计算收益率的方差-协方差矩阵协方差浦发银行三一重工恒瑞医药伊利股份海螺水泥浦发银行0.0001580.0000860.0000510.0000700.000092三一重工0.0000860.0004040.0001190.0001210.000210恒瑞医药0.0000510.0001190.0004660.0002080.000123伊利股份0.0000700.0001210.0002080.0004240.000134海螺水泥0.0000920.0002100.0001230.0001340.000421PART04实验过程(实验步骤、记录、数据、分析)求解有效边界的初始设置条件无风险利率(R007)3.50%wiw1w2w3w4w5日无风险利率0.014%0.650.090.130.090.05wj协方差浦发银行三一重工恒瑞医药伊利股份海螺水泥日平均收益率w10.65浦发银行0.0001581788.60952E-055.06E-057.05E-059.2032E-05-0.01%w20.09三一重工8.60952E-050.000404410.0001190.0001210.000210240.12%w30.13恒瑞医药5.05728E-050.0001192270.0004660.0002080.000123030.17%w40.09伊利股份7.04829E-050.0001206010.0002080.0004240.0001338020.06%w50.05海螺水泥9.2032E-050.000210240.0001230.0001340.0004214420.14%sum1.08.20874E-051.08485E-051.61E-051.13E-056.66767E-060.040%MEAN0.0112725SD0.0231472SlopePART04实验过程(实验步骤、记录、数据、分析)求解风险资产有效边界的起点(全局最小方差组合)最小方差组合的权重与收益率特征不允许卖空允许卖空组合期望收益率0.04%0.04%组合标准差0.0112724990.011272499个股权重浦发银行0.64600.6460三一重工0.08540.0854恒瑞医药0.12700.1270伊利股份0.08910.0891海螺水泥0.05250.0525应用Excel规划求解工具,设置的约束条件是:∑每只股票权重=1;每只股票的权重≥0(在允许卖空的情况下不需要这一项),分别求出不允许卖空和允许卖空时最小方差组合各个股票的权重,并计算出组合的期望收益率和标准差。PART04实验过程(实验步骤、记录、数据、分析)求出风险资产最小方差边界及最优风险资产组合求出风险资产最小方差边界:通过Excel的规划求解工具,在给定一组变动的组合目标期望收益率条件下,最小化风险资产组合的方差,由此可绘制出最小方差边界。约束条件是:∑每只股票权重=1,组合期望收益率Mean=目标期望收益率,每只股票的权重≥0(允许卖空时不需要这一项)。求解最优风险资产组合:运用Excel规划求解工具,求得最优风险资产组合,即SharpRatio最大的组合。设置的约束条件是:∑每只股票权重=1,每

1 / 12
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功