Introduction-SmartQuant-面向机构的顶尖量化交易解决方…_第1页
Introduction-SmartQuant-面向机构的顶尖量化交易解决方…_第2页
Introduction-SmartQuant-面向机构的顶尖量化交易解决方…_第3页
Introduction-SmartQuant-面向机构的顶尖量化交易解决方…_第4页
Introduction-SmartQuant-面向机构的顶尖量化交易解决方…_第5页
已阅读5页,还剩195页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

翻译:刘华、伍侃、张毅wheresciencemeetsfinance1 1 1 22GeneralTradingSystemDesignIssues通用交易系统设计问题 32.1YouandYourTradingSystem交易员和交易系统 32.1.1CompatibilitywithYourTradingBeliefs与你的交易理念匹配 42.1.2UseTechnicalMethodsthatYouBelieveIn使用你深信的技术方法 42.1.3TestingGivesYouEmotionalStrengthfortheHardTimes测试给予你在困难时期的信念支持 52.2MajorTypesofTradingSystems主要的交易系统类型 62.2.1SystemsBetWithorAgainstaSituation条件对赌系统 62.2.2SystemsareLong,Short,orOut系统是看多,看空或者看平 72.2.3BreakoutSystems突破系统 82.2.4TrendSystems趋势系统 82.2.5Anti-TrendSystems反趋势系统 92.2.6GapClosingSystems跳空回补系统 2.2.7SpreadTradingSystems价差交易系统 2.2.9PatternMatchingSystems模式匹配系统 2.2.10OtherTypesofSystems其他类型系统 2.3MoneyandExposureManagement资金与头寸管理 2.3.2RiskandMoneyManagement风险与资金管理 2.3.2ExposureManagement头寸管理 2.3.3Diversification多样化 2.3.4StopLossOrders止损订单 2.3.5GeneralStrategyPitfalls常见的策略陷阱 2.4SomeCautionsonAssumptions关于假设的注意事项 3.2UsingDailyBarsforWritingConvenience为了便利使用日线 23.3ACompleteCodeExample完整的代码示例 3.4DefiningVariables,Properties,andParameters定义变量、属性、参数 3.5Initialization初始化 3.5.1DefiningVariablesandParameters定义变量和参数 3.5.2GroupingParametersintoPropertyPaneGroups对参数分组 3.5.3OptimizingParameters参数 3.6CommonStrategyEvents常用的策略事件 3.7.1OnBarOpen 3.7.5OnPositionChang 3.8HowtoPlaceOrders如何下单 4.1SummaryofStrategyTechniquesbyStrategy策略技术总结 4.1.15%PanicRecovery下跌5%后恐慌恢复 4.1.2FourDaysDownandLong连续4天下跌并做多 4.1.3FourDaysUpandShortfor1%Profit连续4天上涨并为1%利润做空 4.1.4Breakoutwith4%EntryLimit突破4%后限价交易 4.1.5BreakoutwithMultipleExits多出场条件的突破 4.1.7BollingerBandswithProfitTarget带盈利目标的布林线 4.1.8SimpleMovingAverageCrossover简单平均移动交叉 4.1.9SlowTurtleTrendFollowing慢速海龟交易法则 4.1.10Chande's65sma_3ccCr 4.1.11Stock2%Gap股票2%的跳空 4.1.12StockDown,Stock2%Gap股票下跌,股票2%跳空 4.1.13QQQQGapDown0.5%,StockDown,StockGap5%纳斯达克指数下跌0.5%,股票5%跳空低开 4030.5%,股票5%跳空低开,持仓过夜 4.1.15QQQCrash,QQQQTrade纳斯达克100指数暴跌,交易纳斯达克 4.1.16QQQCrash,StockTrade纳斯达克100指数暴跌,交易股票 4.2PatternMatchingStrategies模式匹配策略 4.2.15%Down-In-One-DayPanicRecovery一天暴跌5%后恐慌恢复 4.2.2FourDownDaysandLong连续4天下跌并做多 连续4天上涨并为1%利润做空 464.3BreakoutStrategies突破策略 4.3.1Breakoutwith4%EntryLimit突破4%后限价交易 4.3.2BreakoutwithMultipleExits多出场条件的突破 4.3.3ConfirmationMethods确认方法 4.4RangeTradingStrategies区间交易策略 4.4.1BollingerBands布林线 4.4.2BollingerBandswithProfitTarget带盈利目标的布林线 4.5TrendFollowingStrategies趋势跟随策略 4.5.1SimpleMovingAverageCrossover简单移动平均线交叉 4.5.2“SlowTurtle”Trend-Following慢速海龟交易法则 4.6GapClosingStrategies跳空回补策略 4.6.1Stock2%gap股票2%的跳空 4.6.2Stockdown,stock2%gap股票下跌,股票2%跳空 4.7SpreadandVolatilityTradingStrategies价差交易和波动率交易策略 4.7.1QQQCrash,QQQQTrade纳斯达克100指数暴跌,股票交易 4.7.2BollingerBandswith5-MinuteBars5分钟bar的布林线 1OpenQuantisamodernIDEdevelopmentsystemfordesigningandexecutingcomputerizedquantitativetradingstrategies,basedonthemorepowerfulSmartQuantcoreframework.OpenQuant是一个用于设计和执行计算机量化交易策略的集成开发系统,它基于SmartQuant这个更为强大的核心框架开发的。HereisalistofotherOpenQuantdocuments.Ifyou'reanewOpenQuantuser,youmightconsiderreadingthedocumentationinthefollowingordertomaximizeyourlearningspeed.这里有一些OpenQuant其他文档的列表。如果你是OpenQuant的新用户,你可以考虑以下面的顺序阅读这些文档以便于加快学习速度。1.OpenQuantGettingStartedManual.ThismanualshowsyouhowtousetheIDEtoconfigureandexecuteasimplestrategy.Youcanchooseafinancialinstrument,runastrategy,andinspectthesimulationresults.OpenQuant入门手册。该手册描述了如何使用该框架配置、执行一个简单的策略。你可以选择一个金融产品,运行一个策略并且查看模拟结果。2.OpenQuantStrategyDevelopmentManual.Thismanualshowsyouhowtodesignandcodestrategiesonuser-specifiedfinancialinstruments.Themanualbeginswithanoverviewoftradingsystemdesign,thenmovesontoOpenQuantsystemconcepts,andfinallydiscussestheOpenQuantcodeforseveralstrategiesindepth.OpenQuant策略开发手册。该手册描述了如何基于用户自定义金融产品去设计编写策略。该手册以交易系统设计综述开始,然后描述了OpenQuant系统概念,最后深入讨论了OpenQuant中几个交易策略的代码。ThisdocumentisabouthowtowritecodefortheOpenQuantsystem.Ittalksaboutthemacrocodestructureofstrategyframeworks.Ittalksaboutthemicrocodeimplementationsofseveralexamplestrategies,andtalksaboutcodeeventsthatyoucanusetoimplementtheirstrategies.本文档是用于指导用户如何为OpenQuant编写代码的。既讨论了策略框架的代码结构,也讨论了几个示例策略的代码实现,同时也谈到了用于实现策略的事件。Afterreadingthisdocument,youshouldhaveabasicunderstandingoftradingsystemdesign,includingsomecriticalthingsthatyouneedtogetrightandsomepitfallsthatyouneedtoavoid.Youshouldalsohaveafeelforthegeneraltheoriesbehindpopulartypesofstrategies,andhowtoimplementsimplestrategies—incode—withintheOpenQuantsystem.Onceyoufinishreadingthisdocument,itshouldbeeasyforyoutowriteandbacktestyourfirstfewtradingstrategies.阅读完本文档,你应该对交易系统设计有个基本的认识,包括一些需要优先考虑的关键步骤和需要避免的错误。同时你也应该通过一些热门策略背后的理论对通用策略有个认识,也知道如何通过OpenQuant编写代码实现简单的策略。一旦你读完本文档,对于你来说去编写、回测自己第一个新策略也是很容易的。2Inparticular,thisdocumentdiscussesthefollowingsubjectareas:特别地,本文档讨论了如下一些主题:1.GeneralTradingSystemDesignIssues.Compatibilitybetweenyouandyourtradingsystem;majortypesoftradingsystems;moneyandexposuremanagement;diversification;generaltradingsystempitfallssuchasoverfittingandbrittlesystems.通用交易系统设计议题。交易者和交易系统的兼容配合;交易系统的主要类型;资金和风险管理;多样化;通用交易系统设计误区比如过度优化及脆弱的系统。contentofC#codefiles;declarations;initializationmethod;systemevents(OnBarOpen,OnPositionOpened,OnBar,etc);codeforplacingtradingorders;codefordrawingaseriesonapricechart;初始化方法;系统事件(OnBarOpen,OnPositionOpened,OnBar等);下单代码;价格时序图绘制代码。3.OpenQuantExampleStrategies.CodeforBreakoutstrategies;confirmationmethods(e.g.3consecutiveclosesaboveabreakoutpoint);oscillatorstrategies;movingaveragestrategies;Gapclosingstrategies;AltucherstrategiesfromTradeLikeaHedgeFundbook;ChandestrategyfromtheBeyondTechnicalAnalysisbook.OpenQuant示例策略。突破策略代码;确认方法(例如,突破点位之上的三个连续Closes);震荡策略;移动平均策略;缺口关闭策略;来自书《TradeLikeaHedgeFund》的Altucher策略;来自书《BeyondTechnicalAnalysis》的Chande策略。4.Terminology.Definitionsoftermsusedinthisdocument;referencestobooksontradingsystemsandstrategydevelopment.术语。本文档用到的术语定义;交易系统和策略开发的参考文献ThisdocumentisanintroductorydocumentabouthowtowritecodefortheOpenQuantsystem,soitonlycoversbasicautomatedtradingsystemconceptsandsometypicalstrategyscenarios.Itdoesnotcovercodingtechniquesforadvancedstrategydevelopmentissuesordatamanagement.本文档是关于如何用OpenQuant编写代码的介绍性文档。因此它仅包含了基本的自动交易系统概念和典型的交易策略场景。它并不讨论高级策略开发的代码技巧或数据管理。3用交易系统设计问题Thegoalofthissectionistoprovideaperspectiveonthe"bigpicture"ofstrategydevelopment,beforediggingintothedetailsofhowtocodestrategieswiththeOpenQuantsystem.Thebigpicturediscussiontalksabouttwoimportantthings:本节的目的是在深入讨论如何用OpenQuant系统编写策略代码前提供一个策略开发全景的观点。全景讨论主要包含两方面:1.Whyitisimportantthatyouandyourstrategyarecompatible,andwhatyoucandoaboutincreasingthematchbetweenyouandyourtradingsystem;交易员和策略为什么必须要协调一致,通过做什么能增加匹配适应。2.Alistofsomepopularkindsoftradingsystems,sothatyoucanpickatradingsystemthatiscompatiblewithyourtradingbeliefs.主流交易系统类型列表,目的是你可以挑选与你交易理念相匹配的交易系统。2.1YouandYourTradingSystem交易员和交易系统Successfultradingisnotjustaboutthetradingsystemitself—instead,it'saboutthecombinationofyouandyourtradingsystem.成功的交易不仅仅是交易系统本身,换句话说,成功的交易是交易员和交易系统的组合。Manysystemscanprovidegoodresultsaccordingtotheirdesign.Butthatdoesn'tmeanthatyoucanmakemoneywiththem.Maybeyoucan'tstandthetediumofmakingtoofewortoomanytrades.Maybeyoucan'tstandthehugedrawdownsduringhardtimes.Maybeyoucan'tletthetradesrunwhenthey'reshowinghugeprofits.Allsortsofreasonsandpressurescanconvinceyoutoabandonaworkingtradingsystem,andmaybetomakeitunprofitableforyou.许多系统根据设计能提供很好的结果。但是这并不表示你能用这些设计去赚钱。或许你不能容忍交易次数过多或过少。或许你也不能容忍在下跌时的巨大损失。或许你也不能在大幅盈利时继续执行交易。所有类型的压力和理由都能使你有充足理由去放弃一个交易中的交易系统,可能会使你无利可图。Soit'snotjustaboutthetradingsystem—it'saboutyourabilitytotradeittoo.因此,这并不单单是交易系统的问题,也是你去使用它的能力问题。4易理念匹配Themaincompatibilityproblemisthatintheheatoftrading,youmightwanttodosomethingdifferentthanthetradingsystemwantstodo.Whogivestheorders?主要的匹配问题在于交易本身,你或许想去做一些不同于交易系统想去做的事情。谁在下单?Forexample,ifyou'reinadeepdrawdownwithfully50percent—half!—ofyourequitygoneintolosingtrades,whatdoyoudowhenthetradingsystemistellingyoutokeeponridingtheexisting(andfuture)tradesthatthesystemisthinkingup?Yourriskcontrolalarmsarescreamingtoclosethepositions,becausethe“portfolioheat”istoomuchforyou.Whatdoyouendupdoing?Howcanyoumitigateoravoidthisproblem?比如,如果你处于损失50%的情况下,交易系统告诉你继续持仓,你会怎么做?你的风险控制信号警示需要关闭目前的交易头寸,因为投资组合过大。你能做什么?怎样才能避免这种情况呢?Themainsolutiontothecompatibilityproblemistotradeasystemthatyoubelievein,sothatyoucanstickwithitduringhardtimes.Youcan'tdoanythingaboutthemarket,butyoucandosomethingaboutyourselfandyourtradingsystem.Pickanapproachthatyoubelievein,andthentestitextensivelytodeepenyourunderstandingandbeliefinit.Runitwithreasonablemoneymanagement(tradesizing)andexposure(portfoliorisk)constraints.Onlythenwillyouhaveachanceofstickingwiththesystemwhenyouremotionsrunhighandyourequityrunslow.匹配问题的解决方案在于用你信任的交易系统做交易,只有这样才能在困难的时候坚持它。你不能预测市场,但是你可以做一些关于你自己和交易系统的事情。选择一个你深信的方法并且深入的测试它去加深你的理解。只有这样才能在困难时候坚持系统继续执行。2.1.2UseTechnicalMethodsthatYouBelieveIn使用你深信的技术方法Toincreaseyourchancesoftradingsuccess,pickatradingapproachthatyoubelievein.Therearemanytypesofprofitablesystemstochoosefrom—hereisalistofsomeofthem:为了增加交易成功机会,选择你深信的交易方法。有许多种类的交易系统供选择,下面是一个列●BreakoutSystems突破系统●TrendFollowingSystems趋势跟随系统●Trend/AntiTrend(Reversal)Systems趋势/反趋势(反转)系统●RangeTradingSystems区间交易系统●GapClosingSystems跳空回补系统5●VolatilitySystems波动系统●IntermarketCorelationSystems相关市场系统●ArbitrageSystems套利系统Moreinformationonthesetradingsystemsisprovidedinthesectionsbelow.Readthegeneraldescriptionofeachsystem,andseewhichonesintuitivelyappealtoyouthemost.Perhapsthosesystemsmightbegoodstartingpointsforyournextstrategydevelopmentproject.我们将在后续小节中提供更多的关于交易系统的信息。阅读每一个系统的概述,然后看看哪个是最吸引你的。或许这些系统是你下一个策略开发项目的开始。Youmightalsoconsiderthelistofbookreferencesnearthebeginningofthisdocumentformoreideasanddeeperinformationontradingsystemsofvariouskinds.Manyofthebooksinthelistareexcellentsourcesofusefultradinginformation.你或许认为在本文档开始时提供的参考文献为各种类型的交易系统提供了更深入丰富的信息。这些书籍的确是优秀交易系统的参考资料。Times测试给予你在困难时期的信念支持Onceyou'velearnedenoughabouttradingsystemstopickonethatyoulike,themostimportantthingyoucandotodeepenyourbeliefinthesystemistobacktestitagainstvarioussetsofhistoricaldataforvariousmarkets.一旦你学到足够的关于交易系统的知识,并且选择了一个你喜欢的,你能做的最重要的事情就是在系统中加深你的信念并且根据多个市场的历史数据去回测该系统。Ifyoudoagoodjoboftesting,sothatyouknowthatyoursystemisrobustenoughtosurvive(andbeprofitable)inawidevarietyofpastmarketsituations,thenyouwillhavemorebeliefinit'sbehaviorandabilitiesinfuturemarkets,duringhorrendousdrawdowns.如果你测试做的足够好,你会知道你的系统足够强壮能在过去很宽泛的市场条件下盈利,那么你应该确信在未来的市场中它同样具有很好的盈利能力,包括在行情不好的时候。Inparticular,onceyouaresatisfiedwithyourbacktestingresultsonhistoricaldata,thenextstepforwardisto“papertrade”yourstrategyagainstrealtimedata(butwithfakemoney).Thisisanimportantsteptotakebecauseitexposesyourstrategy(andyou)totheupsanddownsoftherealmarket,inrealtime.Onceyouaresatisfiedwithyourpapertradingresultsforafewdaysorweeksormonths(theintervalmustfityouremotionalneeds),thenyoucanstartlivetradingyourstrategyandfeelconfidentaboutyourexpectedresults.尤其是,一旦你对用历史数据做的回测结果满意,下一步就是用实时数据进行仿真交易,这是一个重要的步骤,因为测试系统完全暴露在市场的涨跌之中。一旦你在几天或几周或几个月的仿真交易中获取好的交易结果,那么你可以开始实盘交易了并且也应该对未来的结果充满信心。62.2MajorTypesofTradingSystems主要的交易系统类型Thissectionsummarizessomepopularkindsoftradingsystems—whatconceptsthey'rebasedon;whatthey'regoodat;andwhatthey'renotgoodat.Thesesummariesarenotcomprehensive.Theyareonlyintendedtodrawa"bigpicture"landscapeofpossibletradingsystemtypes,fromwhichyoucanchooseparticularstrategiesthatinterestyou.Allofthesestrategiesareexplainedinthebookreferencelistnearthebeginningofthisdocument.本节将总结一些热门的交易系统类型的理念、特长、缺陷。这些总结也不一定很全面。他们仅仅用于描述可能的交易类型的全景,从这些类型中选择你感兴趣的。所有这些策略在参考文献中均系统Tohelpnovicescharacterizetradingsystems,itisworthmentioningthattherearetwogeneralclassesoftradingsystems—thosethatexpectasituationtocontinue(totrendforward),andthosethatexpect(ortrytoforcebytrading)asituationtochange.为了帮助新手对交易系统有所认识,非常有必要做个提示,该类型的系统有两大类,一个类型是希望目前的趋势继续,另外一类是希望当前的趋势改变。Systemsthatbetwithasituationarealltrendfollowingsystemsofonekindoranother.Theyusedifferenttechnicalmechanismstoenterandfollowandexitatrade,buttheyallgowiththeinitialchange,andhopeitbecomesatrendthattheycanfollowforprofit.TwoexamplesofthesesystemsincludetheBreakoutandTrendfollowingsystemsdescribedbelow.第一类系统包括各种类型的趋势跟随系统。他们可能用不同技术机制入场、跟随、出场,但是所有的系统都跟随初始的变化,并且希望它成为趋势来获利。这些系统包括下面将要描述的突破系统和趋势跟随系统。Incontrast,systemsthatbetagainstasituationincludemanysystemsthatarequalitativelydifferentfromeachother.Somesystemsbetagainstsimplepricedirection(Anti-trendsystems).Somebetagainstopengaps(GapClosingsystems).Somebetagainstdifferencesinpricesforthesamethingindifferentmarkets(Arbitragesystems).Andsomebetagainsttheaveragevalueofsomething(MeanReversionsystems),wheretheaveragevaluecanbeanythingfromthedirectionordistancebetweentwopriceseriestothevolatilityofasinglepriceseriesorofthedistancebetweentwoseries.与第一种类型不同,趋势改变类型系统特征并不相同。一些系统依据简单的价格方向(反趋势系统),一些是依据跳空(跳空回补系统),一些是依据多市场价差的套利系统(套利系统),一些是依据某些指标的平均值(均值回归系统),而平均值既可以是单一价格时间序列的均值也可以是两个时间序列差的均值。Furthermore,systemsthatbetwithasituation(suchastrendfollowingsystems)usuallywantthesituationtocontinueforalongandprofitabletime,whereassystemsthatbetagainstasituationwantthesituationtochangeassoonaspossible(soastocaptureaprofitfromthechangeasquicklyas7possible).Soifthemarketspermitit,andifthestrategyentrycriteriapermitit,"betwith"systemswillmakefewerandlongertradestoearntheirprofit,while"betagainst"systemswillusuallytrytomakemoretradesandshortertradestoearntheirprofit.(Thetradeentrycriteriaareimportant—forexample,yourgap-closingstrategycouldwaitformonthsbeforeitseesa5%gapdowntobetagainst).另外,趋势跟随系统通过希望这种趋势能够持续较长时间,相反趋势改变系统希望条件尽快改变(通过条件改变能够获利)。因此如果市场允许,交易策略入场条件成立,趋势跟随系统将通过次数更少、时间更长的交易去获利。(交易入场条件是很关键的,比如,你的跳空回补系统可能会数月才能找到5%的缺口)。2.2.2SystemsareLong,Short,orOut系统是看多,看空或者看平Systemscanalsobeclassifiedbytheirpossibletradingstates—inoroutofthemarket(state),and(direction)longorshortthemarket.系统也可以根据他们可能的交易状态来进行分类——入市或出市(状态),看多或者看空(方向)。Singlestatesystemsarealwaysinthemarket.Singlestatesystemsarenotselectiveaboutmarketconditions.Theycanonlydecidetobelongorshort,evenifmarketconditionsdonotfavoranytradesatall(suchasaveryflatmarket).单一状态系统是一直处于入市当中的。单一状态系统并不挑选市场条件。他们仅仅能决定看多还是看空,即使市场条件根本不适用我的交易(比如非常扁平的市场)。Two-statesystemscanbeinoroutofthemarket.Thesesystemscanbepatientandselectiveaboutwhichtradestheywanttoenter.Theyhavetheoptionofsittingoutunfavorablemarketconditions,sotheyaremoreflexiblethansinglestate(alwaysinthemarket)systems.双状态系统即可入市也可出市。这些系统是有耐心的并且会对试图进行的交易条件进行选择。他们可以根据市场条件选择出市,因此比单一状态系统(一直入市)更灵活。Aunidirectionalsystemcangolong,orshort,butisrestrictedsothatitcannotswitchbetweenlongorshort.Forexample,aconservativesystemmightonlyallowlongtrades.Incontrast,abidirectionalsystemcangolongorshortasitpleases.单向系统即可做多也可做空,但在多空之间转换是受限制的。比如,一个保守的系统也许仅仅是允许做多。相反,一个双向系统即可以做多也可以根据条件进行做空。Notethatsinglestateunidirectionalsystemsmakenosenseatall—theywouldhavetobepermanentlyinthemarketlongorshortforever.Soforpracticalpurposes,allsinglestatesystemsmustbebidirectional(likeatrend-reversalortrend-flippingsystem)需要注意的是单状态单边系统根本没有意义——他们将不得不在入市状态一直做多或做空。因此从实际出发,所有的单状态系统必须是双边的(比如趋势反转系统)。8Theconceptofabreakoutsystemisthatwhensomethingsignificanthappenstoaninstrument,thepricewillbreakout(eitherupordown)ofitsprevioustradingrange.Breakoutsystemsmonitortheusualwidthofthepricechannel(therange),andopennewpositionswhenthepricebreaksoutofthechannel.突破系统的概念是当某些合约有特殊原因时其价格将突破(上升或下降)上一个交易区间的价格。突破系统监控价格通道的通常宽度,当价格突破该通道时会建立新头寸。Oneoftheoldestfuturestradingsystemswasbasedonthisidea.Thetypicaltradingrulesweresomethinglike:Buywhenthepricebreaksabovethehighesthighofthepastfourweeks,orbelowthelowestlowofthepastfourweeks.Sellwhenyoureachaprofittarget,orwhenatrailingstoplosswas古老的期货交易系统之一就是基于该理念的。典型的交易规则如下:当价格突破过去四周的高点或者低于过去四周的最低点时就买入。当盈利或者止损达到设定值时就卖出。Breakoutsystemsaregoodforcapturingmovesthatbreakoutandtakeoffsomedistancefromthechannel,andtheysaveyoufromtryingtotradesmallmovesaspriceswhipsawbackandforthwithinthepricechannel.Buttheycanwhipsawyoutoo,byprovidingfalsebreakoutsthatsuddenlyreturnbackintothechannelafteryou'veopenapositioninthebreakoutdirection.突破系统善于捕捉突破系统一定距离的信号,这样可以避免企图交易那些在通道内来回波动导致的价格突破信号。即便如此突破系统也会由于提供了错误的突破对交易产生误导,这些突破在突破防线开仓后迅速回撤到通道内。Somebreakoutsystemsuseextracriteriato“confirm”thatthebreakoutisvalid.Forexample,youmightrequirethatone,two,orthreebarscloseoutsidethechannelbeforeopeningaposition.Further,youmightrequirethatallthreebarsclosefartherawayfromthechanneleachday.有些突破系统使用额外的标准去验证突破是否有效。比如我们在可以开仓前需要在通道外有一个,两个或者三个Bars关闭。另外,我们也可以要求所有的三个Bars都在远离通道有一定的距Inallstrategies,addingmoreselectiveconfirmationcriteriawillusuallydecreasethenumberoftradesmadebecausemoretrades(bothwinningandlosing)areexcluded.Butifthecriteriaideasworkwell,boththeaccuracy(%winningtrades)andprofitabilityofthesystemwillincrease.在所有的策略中,通过增加一定的验证标准会使交易数量减少。但是,如果的验证标准是有效的,系统的准确度和盈利将会增加。Theconceptofatrendfollowingsystemistoopenapositioninthedirectionofthecurrenttrend,andthenkeepthepositionopenuntilthetrendreverses.Usuallytrendsystemsareconstructedfromapairofmovingaveragesthatproducetradingsignalswhentheycrossovereachother.Onemovingaverageisfaster(fewerdaysinthelengthoftheaverage)thantheother,soithugsthepricemovementmore9closely.Theotheraverageisslower(moredays,morelength),andsotakesadifferent"path"throughthepricechartthanthefastaveragedoes.趋势系统的概念是在当前的趋势方向上开仓并且保持仓位直到趋势反转。通常趋势交易系统根据一对移动平均线在交叉时候产生的信号进行交易的。一条移动平均线比另外一条的快(天数少,时间短),因此它捕捉的价格更接近。另外一条移动的慢(天数多,时间长),因此在价格曲线图上它的路径与快速的不同。Atypicalsetoftradingrulesislikethis:Buywhenthefastaveragecrossesabovetheslowaverage,andsellwhenthefastaveragecrossesbelowtheslowaverage.(Ifyouweretradingbothlongandshortsideswiththesystem,youwouldopenashortpositionheretoo,andreverseitbacktolongatthenextcrossoverpoint.)趋势系统典型的交易规则如下:当快移动平均线上穿慢移动平均线,当快移动平均线下穿慢移动平均线时卖出。(如果做的是双边交易,也可以在卖出点开空头寸并且在下一个交叉点反手做多。)Trendfollowingsystemscangeneratehugeprofitsonlongtrendsthatrunformonthsoryears,ifthesystemdoesn'texitprematurelyonpricepullbacksthatforcethemovingaveragestocrossandexitthetrade.Thereissomewhatofanarttochoosingthebesttypesofaveragesforaparticularmarket—simple,exponential,orweighted—andlengthsofaverages,toallowenoughpullbackroomsoyourpositionisnottakenoutonsmallpricemovesinalongertrend.趋势持续几个月或者几年时,如果在价格回撤之时并没有移动平均线交叉从而导致交易过早结束,这样趋势交易系统会产生巨大的盈利。为不同的市场选择不同的移动平均线比如简单的、指数的、加权等及移动平均线的长度是一门艺术,在一个较长的趋势中开仓后留有足够的回撤空间能避免价格回撤导致过早平仓。Thebiggestproblemswithtrendsystemsisthattheyalsogiveupasignificantamountofmoneyattopsandbottomswhilewaitingfortheaveragestocrossover,andtheycanwhipsawyouintoheavylossesinaflat,range-tradingchannelkindofmarketastheyforceyouintounprofitabletradeswhenthereisnotenoughpricemovementbetweencrossoverpoints.趋势系统最大的问题是在等待移动平均线交叉时,这个系统在顶部和底部也会放弃大量的金钱,并且在市场波动区间平坦时会令你受到双重损失,因为在交叉点间没有足够的价格波动,会把你拖入没有收益的交易之中。Theconceptofananti-trendsystemistoopenapositionagainstthedirectionofthetrend,intheexpectationthatthetrendwillreverseenoughtomakethepositionprofitable.Akeypointofthisconceptisthatonlyshorttermtrendsareconsidered,becauseshorttermtrendsoftendoreverse,andshorttermanti-trendtradesoftendoearnaprofit.Ofcourse,ifthetrenddoesn'treversesoonenough,orifitcontinuestoofarintheoriginaltrenddirection,thepositionisclosedataloss.反趋势系统的概念是在趋势的反方向进行开仓,并且期待趋势有足够的反转从而赚取盈利。这个概念的关键在于仅考虑短期趋势,因为短期趋势经常发生反转容易产生盈利。当然,如果趋势并不是短期内就反转或者在原始趋势上持续太久就应该止损平仓。Manydifferenttechnicalmechanismscanbeusedtoconstructanti-trendsystems.Butgenerallyspeaking,amovingaverageofsomekindisusedtorepresentthecenterofthetradingchannel.Thismightbean18or30daymovingaverage,forexample.Inadboundariesareusedtorepresenttheouterrangeoftheaveragetradingchannel.Whenpricesmovefarenoughawayfromtheaveragetowardoneoftheouterchannelboundaries,atradesignali许多不同的技术指标可以用于构建反趋势系统。但通常来讲,某些类型的移动平均线用于代表交易通道的中间线,比如18天或30天移动平均线。其他两条线代表交易通道的边界线。当价格移动距离平均线足够远时,交易信号就会触发。Atypicalsetoftradingrulesmightbe:Buywhenpricestrenddownbelowthemovingaveragebymorethan1standarddeviationofthenormaltradingrange.Sellwhenpricesreturntothemovingaverage,orwhenaprofittargetisreached.Alsosellifthetrendcontinuesontoofarintheoriginal典型的交易规则如下:当价格低于移动平均线下正常交易区间一个标准差时买入,当价格回到移动平均线或者盈利达到预期时卖出。如果趋势在原有方向上持续的更远或者交易依然有1或者2个Bars产生就卖出。Anti-trendsystemsaregoodforflat"sideanti-trendtradesworthwhile.Butbeaware,anti-trendsystemsaresusceptibletorealtrendsthatkeepongoing,forcingyoutoclosepositi反趋势系统适用于扁平市场,因为在扁平市场中经常会有反转发生。但显而易见的是,反趋势系统容易在交易趋势一直趋势时逼迫交易平仓止损。Theconceptofagapclosingsystemisthalater.Byopeningapositionagainstthemovementthatcausedthegap,youcanmakeaprofitwhenpricesreturntofillthegap.Botho跳空回补系统的概念是缺口价格迟早要关闭的。在引起跳空的反向开仓,当价格回归回补跳空时产生盈利。隔夜和日内跳空都是可交易的。Atypicalsetoftradingrulesmightbe:Buywhenpricesgapdownmorethan2%belowthepreviousbarclose.Sellwhenpricesrisetothepreviousclose,orsellattheendofthetradingday.Additionalconfirmationconditionsmightbetorequ典型的交易规则如下:当跳空在前一个价格2%以下时买入。当价格回归到上一价格或者收市时卖出。附加的确认条件也许需要前一交易是收跌日,或者说是指数或股票在前一交易日收跌。Gapclosingsystemsareverypopularwithmanykindsoftraders.That'sbecausetraderscanmakeprofitsongapsthatarecausedbynewseventsorstrong(butshortterm)pricepressures.However,gapscanlosetradersmoneytoo,ifgapsarecausedbylegitimatepricepressuresthatforcepricestocontinueonintheoriginaltrend.Worseyet,becausegappressuresarestrong,pricescanmovefastagainstyouandgeneratelossesforyouquitequicklyifyou'renot跳空回补系统受到很多交易者的欢迎。这是因为跳空回补系统能够在由新闻事件或者明显(但需要是短期)的价格压力下产生的跳空而产生盈利。但是,同样的,如果缺口是由于正常的价格压力迫使价格在一个方向上变动时,跳空回补系统也能给交易者带来损失。更糟糕的是,由于缺口压力很大,价格会快速向预期的反方向移动,如果不是特别小心的话会迅速产生损失。Theconceptofaspreadtradingsystemistotradethespreadbetwetraveltogether.Whenthetwothingsgettoofarawayfromtheirnormalrelationship,youopenpositionthatanticipatestheirreturntonormalconditions.Spreadtradingsystemsusuallyhaveastructurethatincludesaspreadbetweentwoinstrume价差交易系统的概念是根据并行的两个合约间的价差进行交易。当两个合约脱离正常关系时进行开仓,并且期待价差回到正常水平。价差交易系统通常要求两个合约或者价格序列之间包含一个Forexample,youmightmakeatradethatsadirectionwiththeS&P500index,orthattwocurrenciesfromIfthetwogettoofarapart,youwouldbuyoneandselltheother,anticipatingareturntonormal比如,我们可以用道琼斯指数与S&P500指数,或者相邻国家的货币做交易。如果两个合约的价差扩大时,就选择买入一个卖出另外一个,希望在价差回归时有盈利。Atypicalsetoftradingrulesmightbe:BuytheNasdaq10movingaveragevalueoftheratio,andiftheQQQQhashadabig-2%downdaythedaybefore.Closethepositionwhentheratiomovesbacktothe10价差交易的典型规则如下:当QQQQ和SPY之间的比率低于10日移动平均线1.5个标准差并且QQQQ比前一交易有2%的下跌时买入QQQQ卖出SPY500。当价差回到10日移动平均线时平Tobeclear,1.5standarddeviationsequatesto90%ofaNormalDistribution,soamothan1.5standarddeviationsfromthemeanis(intheory)supposedtobegreaterthan90%ofallthemovesthattheratiohasevermade.Sothatkindofamovedoesn'thappenveryoften.显而易见,1.5个标准差相当于标准正态分布的90%,因此超过1.5个标准差的移动是大于90%的移动的,这种类型的移动并不常见。Spreadtradingsystemsarepopular.Youcacorrelatedcloselyenoughtotraveltogetheralargepercentageofthetime.Forexample,twocloselycompetitivestocks,twocloselyrelatedcurrencies,ortwocloselyrelatedindexescanbeusedtotradethiskindofstrategy.价差交易系统很流行。可以在两个大部分时间内相关度很高的合约上做交易。比如,两只相近的股票,两种相近的货币或者两个相近的指数,都可以进行这种交易。Noticethattoneutrallytradeaspreadbetweentwothings,youmustbuysimultaneously.That'stheonlywaytoisolatethespreadbetweentwomovingpricestreams.Thenifyouenterthetradebecausethespreadistoowide,youdon'tcareifbothpricesriseorfallwhi

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论