您好,欢迎访问三七文档
医药板块股票投资策略一、引言本策略投资分析对象为医药板块,共计196家公司。投资分析策略是使用财务指标进行股票筛选,然后在目标股票中,使用MACD及双均线交叉策略进行交易,对比交易结果的优劣。二、数据准备本策略选择了涉及医药行业的196只股票,作为待分析的股票池。主要方法是:1、从Wind金融终端,导出医药板块的目录,共计196只股票的名称与代码,保存在文件wind_medical.txt中,具体如下表:000004.SZ国农科技000150.SZ宜华健康000153.SZ丰原药业000403.SZST生化000423.SZ东阿阿胶000504.SZ南华生物000513.SZ丽珠集团000516.SZ国际医学000518.SZ四环生物000538.SZ云南白药000566.SZ海南海药002382.SZ蓝帆医疗002390.SZ信邦制药002393.SZ000590.SZ*ST古汉000597.SZ东北制药000606.SZ青海明胶000623.SZ吉林敖东000650.SZ仁和药业000661.SZ长春高新000739.SZ普洛药业000756.SZ新华制药000766.SZ通化金马000788.SZ北大医药000908.SZ景峰医药000915.SZ山大华特000919.SZ金陵药业000952.SZ广济药业002693.SZ双成药业002728.SZ台城制药002737.SZ葵花药业002750.SZ龙津药业002773.SZ康弘药业300003.SZ乐普医疗300006.SZ莱美药业300009.SZ安科生物300015.SZ爱尔眼科300016.SZ北陆药业300026.SZ红日药业300030.SZ阳普医疗300039.SZ上海凯宝300049.SZ福瑞股份002432.SZ九安医疗002433.SZ太安堂002437.SZ誉衡药业002550.SZ千红制药002566.SZ益盛药业002603.SZ以岭药业002614.SZ蒙发利002626.SZ金达威002644.SZ佛慈制药002653.SZ海思科002675.SZ东诚药业002688.SZ金河生物300158.SZ振东制药300181.SZ佐力药业300396.SZ迪瑞医疗300401.SZ花园生物300404.SZ博济医药300406.SZ九强生物300436.SZ广生堂300439.SZ美康生物300452.SZ山河药辅300453.SZ三鑫医疗300463.SZ迈克生物300482.SZ万孚生物300485.SZ赛升药业600055.SH华润万东600062.SH华润双鹤600079.SH人福医药603108.SH润达医疗603168.SH莎普爱思603222.SH济民制药603309.SH维力医疗603456.SH九洲药业603566.SH普莱柯603567.SH珍宝岛603669.SH灵康药业603718.SH海利生物603998.SH方盛制药900904.SH神奇B股900907.SH鼎立B股900917.SH海欣B股600664.SH哈药股份力生制药002399.SZ海普瑞002411.SZ九九久002412.SZ汉森制药002422.SZ科伦药业002424.SZ贵州百灵300255.SZ常山药业300267.SZ尔康制药300273.SZ和佳股份300289.SZ利德曼300294.SZ博雅生物300298.SZ三诺生物300313.SZ天山生物300314.SZ戴维医疗300326.SZ凯利泰300347.SZ泰格医药300357.SZ我武生物300363.SZ博腾股份002349.SZ精华制药000989.SZ九芝堂000999.SZ华润三九002001.SZ新和成002007.SZ华兰生物002019.SZ亿帆鑫富002020.SZ京新药业002022.SZ科华生物002030.SZ达安基因002038.SZ双鹭药业002044.SZ江苏三友002099.SZ海翔药业002107.SZ沃华医药002118.SZ紫鑫药业002166.SZ莱茵生物002198.SZ嘉应制药002219.SZ恒康医疗002223.SZ鱼跃医疗002252.SZ上海莱士002365.SZ永安药300061.SZ康耐特300086.SZ康芝药业300110.SZ华仁药业300119.SZ瑞普生物300122.SZ智飞生物300142.SZ沃森生物300147.SZ香雪制药600351.SH亚宝药业600380.SH健康元600420.SH现代制药600422.SH昆药集团600436.SH片仔癀600479.SH千金药业600488.SH天药股份600513.SH联环药业600518.SH康美药业600521.SH华海药业600530.SH交大昂立300194.SZ福安药业300199.SZ翰宇药业300204.SZ舒泰神300206.SZ理邦仪器300233.SZ金城医药300238.SZ冠昊生物300239.SZ东宝生物300244.SZ迪安诊断300246.SZ宝莱特300254.SZ仟源医药600535.SH天士力600557.SH康缘药业600566.SH济川药业600572.SH康恩贝600587.SH新华医疗600594.SH益佰制药600613.SH神奇制药600614.SH鼎立股份600624.SH复旦复华600080.SH金花股份600085.SH同仁堂600129.SH太极集团600161.SH天坛生物600195.SH中牧股份600196.SH复星医药600201.SH金宇集团600216.SH浙江医药600222.SH太龙药业600240.SH华业资本600252.SH中恒集团600267.SH海正药业600276.SH恒瑞医药600285.SH羚锐制药600299.SH蓝星新材600329.SH中新药业600332.SH白云山600645.SH中源协和600671.SH天目药业600750.SH江中药业600763.SH通策医疗600767.SH运盛医疗600771.SH广誉远600781.SH辅仁药业600789.SH鲁抗医药600812.SH华北制药600851.SH海欣股份600867.SH通化东宝600976.SH健民集团600993.SH马应龙002262.SZ恩华药业002275.SZ桂林三金002287.SZ奇正藏药002294.SZ信立泰002317.SZ众生药业002332.SZ仙琚制药002370.SZ亚太药业2、使用quantmod包,在R语言包从yahoo下载股票历史交易数据。数据包成功下载了195个股票数据集,其中Yahoo中没有300318.SZ博晖创新交易数据,从数据集中剔除了这部分数据。每只股票的交易数据以文件形式,保存,这样做的好处是加快了程序计算的速度。主要代码如下:##############defineGlobeConstraint##################work.path-C:/Study/Invest/WorkSpace/stock.data.path-C:/Study/Invest/WorkSpace/stock_data/##############GetfinanceStockCode##################fin-read.csv(paste(work.path,WIND_Medical.txt,sep=),sep=,header=FALSE)fin-fin[,c(1,4)]names(fin)-c(stkcd,stkname)fin.rows=nrow(fin)targe.list-c(1:fin.rows)for(iin1:fin.rows){stkcd-fin[i,1]targe.list[i]-gsub('SH','SS',stkcd)}##############GetfinanceStockdata##################for(stk.iintarge.list){setSymbolLookup(STK.DATA=list(name=stk.i,src='yahoo'))getSymbols(STK.DATA)STK.DATA-as.data.frame(STK.DATA)STK.DATA-cbind(STK.DATA,0)names(STK.DATA)-c('open','high','low','close','volume','adjusted','ret')##############ComputeStockret####################Previous-STK.DATA[1,4]STK.DATA.Rows-nrow(STK.DATA)for(jin1:STK.DATA.Rows){STK.DATA[j,7]-STK.DATA[j,4]-PreviousPrevious-STK.DATA[j,4]}##############savedata####################write.csv(STK.DATA,paste(stock.data.path,stk.i,sep=),row.names=TRUE)}2、股票财务数据:通过网络检索,在中找到2013~21014年度沪深股市的财务指标数据。但是报告中财务指标共计200多个,但是根据需要选择了主要的7个财务数据:负债及所有者权益、营业总收入、营业总成本、营业利润、净利润、每股利润、经营净现金流。数据报告是每个季度一期数据。其中财务指标完整的共计174只股票,具体如下:[1]000004.SZ000150.SZ000153.SZ000403.SZ000423.SZ000504.SZ000513.SZ[8]000516.SZ000518.SZ000538.SZ000566.SZ000590.SZ000597.SZ000606.SZ[15]000623.SZ000650.SZ000661.SZ000739.SZ000756.SZ000766.SZ000788.SZ[22]000908.SZ000915.SZ000919.SZ000952.SZ000989.SZ000999.SZ002001.SZ[29]002007.SZ002019.SZ002020.SZ002022.SZ002030.SZ002038.SZ002044.SZ[36]002099.SZ002107.SZ002118.SZ002166.SZ002198.SZ002219.SZ002223.SZ[43]002252.SZ002262.SZ002275.SZ002287.SZ002294.SZ002317.SZ002332.SZ[50]002349.SZ002365.SZ002370.SZ002382.SZ002390.SZ002393.SZ002399.SZ[57]002411.SZ002412.SZ002422.SZ002424.SZ002432.SZ002433.SZ002437.SZ[64]002550.SZ002566.SZ002603.SZ002614.SZ002626.SZ002644.SZ002653.SZ[71]002675.SZ002688.SZ002693.SZ002728.SZ300003.SZ300006.SZ300009.SZ[78]300015.SZ300016.SZ300026.SZ300030.SZ300039.SZ300049.SZ300061.SZ[85]300086.SZ300110.SZ300119.SZ300122.SZ300142.SZ300147.SZ300158.SZ[92]300181.SZ300194.SZ300199.SZ300204.SZ300206.SZ300233.SZ300238.SZ[99]300239.SZ300244.SZ3002
本文标题:量化投资结业作业
链接地址:https://www.777doc.com/doc-7311106 .html