(本源代码转载自迅动股票分析平台,了解更多请访问)基于Java语言开发的个性化股票分析技术:量能突破模型(Energe-Break)一个用量能指标作为判定依据的条件分析模型,根据最近5天内是否有量能平台的突破以及涨跌幅的大小给每只股票评分评价,给用户明确的建议。迅动股票分析平台在此基础上利用Java语言开发了量能突破模型(Energe-Break),源代码如下:XML描述:?xmlversion=1.0encoding=UTF-8?analysershortName=Energe-BreakfullName=量能突破模型class=u008660011.model.analyser.eb.EBAnalyser!--参数列表--paramListparamshortName=Nvalue=40fullName=天数/paramshortName=Cvalue=20fullName=加减分系数//paramList!--数据列表--dataListdatashortName=StkDailyK/datashortName=IdxDailyK/datashortName=BlkDailyK//dataListdescription一个用量能指标作为判定依据的条件分析模型,根据最近5天内是否有量能平台的突破以及涨跌幅的大小给每只股票评分评价,给用户明确的建议。/description/analyserJava代码:/**@(#)EBnalyser.java**Copyright@HangzhouShengrenSoftwareTech.Co.,Ltd.*/packageu008660011.model.analyser.eb;(本源代码转载自迅动股票分析平台,了解更多请访问)importjava.rmi.RemoteException;importjava.util.List;importorg.apache.commons.lang.math.NumberUtils;importcom.shengrensoft.stock.center.common.util.DateUtil;importcom.shengrensoft.stock.center.common.util.StkAnalysisUtil;importcom.shengrensoft.stock.center.data.Data;importcom.shengrensoft.stock.center.data.StkDailyK.StkDailyKData;importcom.shengrensoft.stock.center.data.IdxDailyK.IdxDailyKData;importcom.shengrensoft.stock.center.data.BlkDailyK.BlkDailyKData;importcom.shengrensoft.stock.center.model.ModelParam;importcom.shengrensoft.stock.center.model.analyser.AbstractAnalyser;importcom.shengrensoft.stock.center.model.analyser.AnalysisValue;/***codeEB/code量能突破分析模型的实现类。**@author迅动平台2012/09/20新建*/publicclassEBAnalyserextendsAbstractAnalyser{/**序列版本ID*/privatestaticfinallongserialVersionUID=-732447148977150017L;//参数名定义/**参数名:N天数*/privatestaticfinalStringPARAM_N=N;/**参数名:加减分系数*/privatestaticfinalStringPARAM_CONFICENT=C;/***构造方法。*/publicEBAnalyser()throwsRemoteException{}/***分析买入点的变化。**@paramstkCode证券代码*@paramtransDate交易日期*@paramparamsList模型参数列表(本源代码转载自迅动股票分析平台,了解更多请访问)**@return分析结果(含评分和评价)*/publicAnalysisValuedoAnalysis(StringstkCode,java.util.DatetransDate,ListModelParamparamsList)throwsRemoteException{AnalysisValueanalysisValue=null;//股票代码合法性检查if(stkCode==null){analysisValue=newAnalysisValue();analysisValue.setStkCode(stkCode);analysisValue.setResultScore(0);analysisValue.setResultDesc(股票代码不合法,分析失败。);returnanalysisValue;}//交易日期合法性检查if(transDate==null){analysisValue=newAnalysisValue();analysisValue.setStkCode(stkCode);analysisValue.setResultScore(0);analysisValue.setResultDesc(交易日期不合法,分析失败。);returnanalysisValue;}//参数列表合法性检查if(paramsList==null){analysisValue=newAnalysisValue();analysisValue.setStkCode(stkCode);analysisValue.setResultScore(0);analysisValue.setResultDesc(参数列表不合法,分析失败。);returnanalysisValue;}//取得分析所需的模型参数intparamN=0;intparamCONFICENT=0;for(ModelParamparam:paramsList){if(PARAM_N.equals(param.getShortName())){paramN=NumberUtils.toInt(param.getValue());}elseif(PARAM_CONFICENT.equals(param.getShortName())){(本源代码转载自迅动股票分析平台,了解更多请访问)paramCONFICENT=NumberUtils.toInt(param.getValue());}else{returnnull;//发现一个意外的模型参数}}//天数的合法性检查if(paramN1){analysisValue=newAnalysisValue();analysisValue.setStkCode(stkCode);analysisValue.setResultScore(0);analysisValue.setResultDesc(天数不合法,分析失败。);returnanalysisValue;}//(%)加减分系数if(paramCONFICENT1||paramCONFICENT99){analysisValue=newAnalysisValue();analysisValue.setStkCode(stkCode);analysisValue.setResultScore(0);analysisValue.setResultDesc(加减分系数,分析失败。);returnanalysisValue;}//判别证券代码类型(是否为股票代码,股指代码,板指代码),分别进行分析StkAnalysisUtilstkAnalysisUtil=super.getStkAnalysisUtil();if(stkAnalysisUtil.isStkCode(stkCode)){analysisValue=this.analyseStk(stkCode,transDate,paramN,paramCONFICENT);if(analysisValue==null){analysisValue=newAnalysisValue();analysisValue.setStkCode(stkCode);analysisValue.setResultScore(0);analysisValue.setResultDesc(公司新上市或该天缺少数据,分析失败!);}returnanalysisValue;}elseif(stkAnalysisUtil.isIdxCode(stkCode)){analysisValue=this.analyseIdx(stkCode,transDate,paramN,paramCONFICENT);if(analysisValue==null){analysisValue=newAnalysisValue();(本源代码转载自迅动股票分析平台,了解更多请访问)analysisValue.setStkCode(stkCode);analysisValue.setResultScore(0);analysisValue.setResultDesc(公司新上市或该天缺少数据,分析失败!);}returnanalysisValue;}elseif(stkAnalysisUtil.isBlkCode(super.getUserId(),stkCode)){analysisValue=this.analyseBlk(stkCode,transDate,paramN,paramCONFICENT);if(analysisValue==null){analysisValue=newAnalysisValue();analysisValue.setStkCode(stkCode);analysisValue.setResultScore(0);analysisValue.setResultDesc(公司新上市或该天缺少数据,分析失败!);}returnanalysisValue;}else{analysisValue=newAnalysisValue();analysisValue.setStkCode(stkCode);analysisValue.setResultScore(0);analysisValue.setResultDesc(证劵代码类型不符,分析失败!);returnanalysisValue;}}/***根据能量突破提示的不同,对股票进行分析、评分、评价。**@paramstkCode股票代码*@paramtransDate交易日期*@paramparamN天数*@paramparamCONFICENT(%)加减分系数**@return返回结果(含评分和评价)*/privateAnalysisValueanalyseStk(StringstkCode,java.util.DatetransDate,intparamN,intparamCONFICENT){(本源代码转载自迅动股票分析平台,了解更多请访问)AnalysisValueanalysisValue=null;//计算TTJ值IntegerTTJ=calcStkTTJ(stkCode,transDate,paramN);if(TTJ=