版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)
文檔簡介
翻譯:劉華、伍侃、張毅wheresciencemeetsfinance1 1 1 22GeneralTradingSystemDesignIssues通用交易系統(tǒng)設(shè)計問題 32.1YouandYourTradingSystem交易員和交易系統(tǒng) 32.1.1CompatibilitywithYourTradingBeliefs與你的交易理念匹配 42.1.2UseTechnicalMethodsthatYouBelieveIn使用你深信的技術(shù)方法 42.1.3TestingGivesYouEmotionalStrengthfortheHardTimes測試給予你在困難時期的信念支持 52.2MajorTypesofTradingSystems主要的交易系統(tǒng)類型 62.2.1SystemsBetWithorAgainstaSituation條件對賭系統(tǒng) 62.2.2SystemsareLong,Short,orOut系統(tǒng)是看多,看空或者看平 72.2.3BreakoutSystems突破系統(tǒng) 82.2.4TrendSystems趨勢系統(tǒng) 82.2.5Anti-TrendSystems反趨勢系統(tǒng) 92.2.6GapClosingSystems跳空回補系統(tǒng) 2.2.7SpreadTradingSystems價差交易系統(tǒng) 2.2.9PatternMatchingSystems模式匹配系統(tǒng) 2.2.10OtherTypesofSystems其他類型系統(tǒng) 2.3MoneyandExposureManagement資金與頭寸管理 2.3.2RiskandMoneyManagement風(fēng)險與資金管理 2.3.2ExposureManagement頭寸管理 2.3.3Diversification多樣化 2.3.4StopLossOrders止損訂單 2.3.5GeneralStrategyPitfalls常見的策略陷阱 2.4SomeCautionsonAssumptions關(guān)于假設(shè)的注意事項 3.2UsingDailyBarsforWritingConvenience為了便利使用日線 23.3ACompleteCodeExample完整的代碼示例 3.4DefiningVariables,Properties,andParameters定義變量、屬性、參數(shù) 3.5Initialization初始化 3.5.1DefiningVariablesandParameters定義變量和參數(shù) 3.5.2GroupingParametersintoPropertyPaneGroups對參數(shù)分組 3.5.3OptimizingParameters參數(shù) 3.6CommonStrategyEvents常用的策略事件 3.7.1OnBarOpen 3.7.5OnPositionChang 3.8HowtoPlaceOrders如何下單 4.1SummaryofStrategyTechniquesbyStrategy策略技術(shù)總結(jié) 4.1.15%PanicRecovery下跌5%后恐慌恢復(fù) 4.1.2FourDaysDownandLong連續(xù)4天下跌并做多 4.1.3FourDaysUpandShortfor1%Profit連續(xù)4天上漲并為1%利潤做空 4.1.4Breakoutwith4%EntryLimit突破4%后限價交易 4.1.5BreakoutwithMultipleExits多出場條件的突破 4.1.7BollingerBandswithProfitTarget帶盈利目標(biāo)的布林線 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%納斯達(dá)克指數(shù)下跌0.5%,股票5%跳空低開 4030.5%,股票5%跳空低開,持倉過夜 4.1.15QQQCrash,QQQQTrade納斯達(dá)克100指數(shù)暴跌,交易納斯達(dá)克 4.1.16QQQCrash,StockTrade納斯達(dá)克100指數(shù)暴跌,交易股票 4.2PatternMatchingStrategies模式匹配策略 4.2.15%Down-In-One-DayPanicRecovery一天暴跌5%后恐慌恢復(fù) 4.2.2FourDownDaysandLong連續(xù)4天下跌并做多 連續(xù)4天上漲并為1%利潤做空 464.3BreakoutStrategies突破策略 4.3.1Breakoutwith4%EntryLimit突破4%后限價交易 4.3.2BreakoutwithMultipleExits多出場條件的突破 4.3.3ConfirmationMethods確認(rèn)方法 4.4RangeTradingStrategies區(qū)間交易策略 4.4.1BollingerBands布林線 4.4.2BollingerBandswithProfitTarget帶盈利目標(biāo)的布林線 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納斯達(dá)克100指數(shù)暴跌,股票交易 4.7.2BollingerBandswith5-MinuteBars5分鐘bar的布林線 1OpenQuantisamodernIDEdevelopmentsystemfordesigningandexecutingcomputerizedquantitativetradingstrategies,basedonthemorepowerfulSmartQuantcoreframework.OpenQuant是一個用于設(shè)計和執(zhí)行計算機(jī)量化交易策略的集成開發(fā)系統(tǒng),它基于SmartQuant這個更為強大的核心框架開發(fā)的。HereisalistofotherOpenQuantdocuments.Ifyou'reanewOpenQuantuser,youmightconsiderreadingthedocumentationinthefollowingordertomaximizeyourlearningspeed.這里有一些OpenQuant其他文檔的列表。如果你是OpenQuant的新用戶,你可以考慮以下面的順序閱讀這些文檔以便于加快學(xué)習(xí)速度。1.OpenQuantGettingStartedManual.ThismanualshowsyouhowtousetheIDEtoconfigureandexecuteasimplestrategy.Youcanchooseafinancialinstrument,runastrategy,andinspectthesimulationresults.OpenQuant入門手冊。該手冊描述了如何使用該框架配置、執(zhí)行一個簡單的策略。你可以選擇一個金融產(chǎn)品,運行一個策略并且查看模擬結(jié)果。2.OpenQuantStrategyDevelopmentManual.Thismanualshowsyouhowtodesignandcodestrategiesonuser-specifiedfinancialinstruments.Themanualbeginswithanoverviewoftradingsystemdesign,thenmovesontoOpenQuantsystemconcepts,andfinallydiscussestheOpenQuantcodeforseveralstrategiesindepth.OpenQuant策略開發(fā)手冊。該手冊描述了如何基于用戶自定義金融產(chǎn)品去設(shè)計編寫策略。該手冊以交易系統(tǒng)設(shè)計綜述開始,然后描述了OpenQuant系統(tǒng)概念,最后深入討論了OpenQuant中幾個交易策略的代碼。ThisdocumentisabouthowtowritecodefortheOpenQuantsystem.Ittalksaboutthemacrocodestructureofstrategyframeworks.Ittalksaboutthemicrocodeimplementationsofseveralexamplestrategies,andtalksaboutcodeeventsthatyoucanusetoimplementtheirstrategies.本文檔是用于指導(dǎo)用戶如何為OpenQuant編寫代碼的。既討論了策略框架的代碼結(jié)構(gòu),也討論了幾個示例策略的代碼實現(xiàn),同時也談到了用于實現(xiàn)策略的事件。Afterreadingthisdocument,youshouldhaveabasicunderstandingoftradingsystemdesign,includingsomecriticalthingsthatyouneedtogetrightandsomepitfallsthatyouneedtoavoid.Youshouldalsohaveafeelforthegeneraltheoriesbehindpopulartypesofstrategies,andhowtoimplementsimplestrategies—incode—withintheOpenQuantsystem.Onceyoufinishreadingthisdocument,itshouldbeeasyforyoutowriteandbacktestyourfirstfewtradingstrategies.閱讀完本文檔,你應(yīng)該對交易系統(tǒng)設(shè)計有個基本的認(rèn)識,包括一些需要優(yōu)先考慮的關(guān)鍵步驟和需要避免的錯誤。同時你也應(yīng)該通過一些熱門策略背后的理論對通用策略有個認(rèn)識,也知道如何通過OpenQuant編寫代碼實現(xiàn)簡單的策略。一旦你讀完本文檔,對于你來說去編寫、回測自己第一個新策略也是很容易的。2Inparticular,thisdocumentdiscussesthefollowingsubjectareas:特別地,本文檔討論了如下一些主題:1.GeneralTradingSystemDesignIssues.Compatibilitybetweenyouandyourtradingsystem;majortypesoftradingsystems;moneyandexposuremanagement;diversification;generaltradingsystempitfallssuchasoverfittingandbrittlesystems.通用交易系統(tǒng)設(shè)計議題。交易者和交易系統(tǒng)的兼容配合;交易系統(tǒng)的主要類型;資金和風(fēng)險管理;多樣化;通用交易系統(tǒng)設(shè)計誤區(qū)比如過度優(yōu)化及脆弱的系統(tǒng)。contentofC#codefiles;declarations;initializationmethod;systemevents(OnBarOpen,OnPositionOpened,OnBar,etc);codeforplacingtradingorders;codefordrawingaseriesonapricechart;初始化方法;系統(tǒng)事件(OnBarOpen,OnPositionOpened,OnBar等);下單代碼;價格時序圖繪制代碼。3.OpenQuantExampleStrategies.CodeforBreakoutstrategies;confirmationmethods(e.g.3consecutiveclosesaboveabreakoutpoint);oscillatorstrategies;movingaveragestrategies;Gapclosingstrategies;AltucherstrategiesfromTradeLikeaHedgeFundbook;ChandestrategyfromtheBeyondTechnicalAnalysisbook.OpenQuant示例策略。突破策略代碼;確認(rèn)方法(例如,突破點位之上的三個連續(xù)Closes);震蕩策略;移動平均策略;缺口關(guān)閉策略;來自書《TradeLikeaHedgeFund》的Altucher策略;來自書《BeyondTechnicalAnalysis》的Chande策略。4.Terminology.Definitionsoftermsusedinthisdocument;referencestobooksontradingsystemsandstrategydevelopment.術(shù)語。本文檔用到的術(shù)語定義;交易系統(tǒng)和策略開發(fā)的參考文獻(xiàn)ThisdocumentisanintroductorydocumentabouthowtowritecodefortheOpenQuantsystem,soitonlycoversbasicautomatedtradingsystemconceptsandsometypicalstrategyscenarios.Itdoesnotcovercodingtechniquesforadvancedstrategydevelopmentissuesordatamanagement.本文檔是關(guān)于如何用OpenQuant編寫代碼的介紹性文檔。因此它僅包含了基本的自動交易系統(tǒng)概念和典型的交易策略場景。它并不討論高級策略開發(fā)的代碼技巧或數(shù)據(jù)管理。3用交易系統(tǒng)設(shè)計問題Thegoalofthissectionistoprovideaperspectiveonthe"bigpicture"ofstrategydevelopment,beforediggingintothedetailsofhowtocodestrategieswiththeOpenQuantsystem.Thebigpicturediscussiontalksabouttwoimportantthings:本節(jié)的目的是在深入討論如何用OpenQuant系統(tǒng)編寫策略代碼前提供一個策略開發(fā)全景的觀點。全景討論主要包含兩方面:1.Whyitisimportantthatyouandyourstrategyarecompatible,andwhatyoucandoaboutincreasingthematchbetweenyouandyourtradingsystem;交易員和策略為什么必須要協(xié)調(diào)一致,通過做什么能增加匹配適應(yīng)。2.Alistofsomepopularkindsoftradingsystems,sothatyoucanpickatradingsystemthatiscompatiblewithyourtradingbeliefs.主流交易系統(tǒng)類型列表,目的是你可以挑選與你交易理念相匹配的交易系統(tǒng)。2.1YouandYourTradingSystem交易員和交易系統(tǒng)Successfultradingisnotjustaboutthetradingsystemitself—instead,it'saboutthecombinationofyouandyourtradingsystem.成功的交易不僅僅是交易系統(tǒng)本身,換句話說,成功的交易是交易員和交易系統(tǒng)的組合。Manysystemscanprovidegoodresultsaccordingtotheirdesign.Butthatdoesn'tmeanthatyoucanmakemoneywiththem.Maybeyoucan'tstandthetediumofmakingtoofewortoomanytrades.Maybeyoucan'tstandthehugedrawdownsduringhardtimes.Maybeyoucan'tletthetradesrunwhenthey'reshowinghugeprofits.Allsortsofreasonsandpressurescanconvinceyoutoabandonaworkingtradingsystem,andmaybetomakeitunprofitableforyou.許多系統(tǒng)根據(jù)設(shè)計能提供很好的結(jié)果。但是這并不表示你能用這些設(shè)計去賺錢。或許你不能容忍交易次數(shù)過多或過少?;蛟S你也不能容忍在下跌時的巨大損失?;蛟S你也不能在大幅盈利時繼續(xù)執(zhí)行交易。所有類型的壓力和理由都能使你有充足理由去放棄一個交易中的交易系統(tǒng),可能會使你無利可圖。Soit'snotjustaboutthetradingsystem—it'saboutyourabilitytotradeittoo.因此,這并不單單是交易系統(tǒng)的問題,也是你去使用它的能力問題。4易理念匹配Themaincompatibilityproblemisthatintheheatoftrading,youmightwanttodosomethingdifferentthanthetradingsystemwantstodo.Whogivestheorders?主要的匹配問題在于交易本身,你或許想去做一些不同于交易系統(tǒng)想去做的事情。誰在下單?Forexample,ifyou'reinadeepdrawdownwithfully50percent—half!—ofyourequitygoneintolosingtrades,whatdoyoudowhenthetradingsystemistellingyoutokeeponridingtheexisting(andfuture)tradesthatthesystemisthinkingup?Yourriskcontrolalarmsarescreamingtoclosethepositions,becausethe“portfolioheat”istoomuchforyou.Whatdoyouendupdoing?Howcanyoumitigateoravoidthisproblem?比如,如果你處于損失50%的情況下,交易系統(tǒng)告訴你繼續(xù)持倉,你會怎么做?你的風(fēng)險控制信號警示需要關(guān)閉目前的交易頭寸,因為投資組合過大。你能做什么?怎樣才能避免這種情況呢?Themainsolutiontothecompatibilityproblemistotradeasystemthatyoubelievein,sothatyoucanstickwithitduringhardtimes.Youcan'tdoanythingaboutthemarket,butyoucandosomethingaboutyourselfandyourtradingsystem.Pickanapproachthatyoubelievein,andthentestitextensivelytodeepenyourunderstandingandbeliefinit.Runitwithreasonablemoneymanagement(tradesizing)andexposure(portfoliorisk)constraints.Onlythenwillyouhaveachanceofstickingwiththesystemwhenyouremotionsrunhighandyourequityrunslow.匹配問題的解決方案在于用你信任的交易系統(tǒng)做交易,只有這樣才能在困難的時候堅持它。你不能預(yù)測市場,但是你可以做一些關(guān)于你自己和交易系統(tǒng)的事情。選擇一個你深信的方法并且深入的測試它去加深你的理解。只有這樣才能在困難時候堅持系統(tǒng)繼續(xù)執(zhí)行。2.1.2UseTechnicalMethodsthatYouBelieveIn使用你深信的技術(shù)方法Toincreaseyourchancesoftradingsuccess,pickatradingapproachthatyoubelievein.Therearemanytypesofprofitablesystemstochoosefrom—hereisalistofsomeofthem:為了增加交易成功機(jī)會,選擇你深信的交易方法。有許多種類的交易系統(tǒng)供選擇,下面是一個列●BreakoutSystems突破系統(tǒng)●TrendFollowingSystems趨勢跟隨系統(tǒng)●Trend/AntiTrend(Reversal)Systems趨勢/反趨勢(反轉(zhuǎn))系統(tǒng)●RangeTradingSystems區(qū)間交易系統(tǒng)●GapClosingSystems跳空回補系統(tǒng)5●VolatilitySystems波動系統(tǒng)●IntermarketCorelationSystems相關(guān)市場系統(tǒng)●ArbitrageSystems套利系統(tǒng)Moreinformationonthesetradingsystemsisprovidedinthesectionsbelow.Readthegeneraldescriptionofeachsystem,andseewhichonesintuitivelyappealtoyouthemost.Perhapsthosesystemsmightbegoodstartingpointsforyournextstrategydevelopmentproject.我們將在后續(xù)小節(jié)中提供更多的關(guān)于交易系統(tǒng)的信息。閱讀每一個系統(tǒng)的概述,然后看看哪個是最吸引你的?;蛟S這些系統(tǒng)是你下一個策略開發(fā)項目的開始。Youmightalsoconsiderthelistofbookreferencesnearthebeginningofthisdocumentformoreideasanddeeperinformationontradingsystemsofvariouskinds.Manyofthebooksinthelistareexcellentsourcesofusefultradinginformation.你或許認(rèn)為在本文檔開始時提供的參考文獻(xiàn)為各種類型的交易系統(tǒng)提供了更深入豐富的信息。這些書籍的確是優(yōu)秀交易系統(tǒng)的參考資料。Times測試給予你在困難時期的信念支持Onceyou'velearnedenoughabouttradingsystemstopickonethatyoulike,themostimportantthingyoucandotodeepenyourbeliefinthesystemistobacktestitagainstvarioussetsofhistoricaldataforvariousmarkets.一旦你學(xué)到足夠的關(guān)于交易系統(tǒng)的知識,并且選擇了一個你喜歡的,你能做的最重要的事情就是在系統(tǒng)中加深你的信念并且根據(jù)多個市場的歷史數(shù)據(jù)去回測該系統(tǒng)。Ifyoudoagoodjoboftesting,sothatyouknowthatyoursystemisrobustenoughtosurvive(andbeprofitable)inawidevarietyofpastmarketsituations,thenyouwillhavemorebeliefinit'sbehaviorandabilitiesinfuturemarkets,duringhorrendousdrawdowns.如果你測試做的足夠好,你會知道你的系統(tǒng)足夠強壯能在過去很寬泛的市場條件下盈利,那么你應(yīng)該確信在未來的市場中它同樣具有很好的盈利能力,包括在行情不好的時候。Inparticular,onceyouaresatisfiedwithyourbacktestingresultsonhistoricaldata,thenextstepforwardisto“papertrade”yourstrategyagainstrealtimedata(butwithfakemoney).Thisisanimportantsteptotakebecauseitexposesyourstrategy(andyou)totheupsanddownsoftherealmarket,inrealtime.Onceyouaresatisfiedwithyourpapertradingresultsforafewdaysorweeksormonths(theintervalmustfityouremotionalneeds),thenyoucanstartlivetradingyourstrategyandfeelconfidentaboutyourexpectedresults.尤其是,一旦你對用歷史數(shù)據(jù)做的回測結(jié)果滿意,下一步就是用實時數(shù)據(jù)進(jìn)行仿真交易,這是一個重要的步驟,因為測試系統(tǒng)完全暴露在市場的漲跌之中。一旦你在幾天或幾周或幾個月的仿真交易中獲取好的交易結(jié)果,那么你可以開始實盤交易了并且也應(yīng)該對未來的結(jié)果充滿信心。62.2MajorTypesofTradingSystems主要的交易系統(tǒng)類型Thissectionsummarizessomepopularkindsoftradingsystems—whatconceptsthey'rebasedon;whatthey'regoodat;andwhatthey'renotgoodat.Thesesummariesarenotcomprehensive.Theyareonlyintendedtodrawa"bigpicture"landscapeofpossibletradingsystemtypes,fromwhichyoucanchooseparticularstrategiesthatinterestyou.Allofthesestrategiesareexplainedinthebookreferencelistnearthebeginningofthisdocument.本節(jié)將總結(jié)一些熱門的交易系統(tǒng)類型的理念、特長、缺陷。這些總結(jié)也不一定很全面。他們僅僅用于描述可能的交易類型的全景,從這些類型中選擇你感興趣的。所有這些策略在參考文獻(xiàn)中均系統(tǒng)Tohelpnovicescharacterizetradingsystems,itisworthmentioningthattherearetwogeneralclassesoftradingsystems—thosethatexpectasituationtocontinue(totrendforward),andthosethatexpect(ortrytoforcebytrading)asituationtochange.為了幫助新手對交易系統(tǒng)有所認(rèn)識,非常有必要做個提示,該類型的系統(tǒng)有兩大類,一個類型是希望目前的趨勢繼續(xù),另外一類是希望當(dāng)前的趨勢改變。Systemsthatbetwithasituationarealltrendfollowingsystemsofonekindoranother.Theyusedifferenttechnicalmechanismstoenterandfollowandexitatrade,buttheyallgowiththeinitialchange,andhopeitbecomesatrendthattheycanfollowforprofit.TwoexamplesofthesesystemsincludetheBreakoutandTrendfollowingsystemsdescribedbelow.第一類系統(tǒng)包括各種類型的趨勢跟隨系統(tǒng)。他們可能用不同技術(shù)機(jī)制入場、跟隨、出場,但是所有的系統(tǒng)都跟隨初始的變化,并且希望它成為趨勢來獲利。這些系統(tǒng)包括下面將要描述的突破系統(tǒng)和趨勢跟隨系統(tǒng)。Incontrast,systemsthatbetagainstasituationincludemanysystemsthatarequalitativelydifferentfromeachother.Somesystemsbetagainstsimplepricedirection(Anti-trendsystems).Somebetagainstopengaps(GapClosingsystems).Somebetagainstdifferencesinpricesforthesamethingindifferentmarkets(Arbitragesystems).Andsomebetagainsttheaveragevalueofsomething(MeanReversionsystems),wheretheaveragevaluecanbeanythingfromthedirectionordistancebetweentwopriceseriestothevolatilityofasinglepriceseriesorofthedistancebetweentwoseries.與第一種類型不同,趨勢改變類型系統(tǒng)特征并不相同。一些系統(tǒng)依據(jù)簡單的價格方向(反趨勢系統(tǒng)),一些是依據(jù)跳空(跳空回補系統(tǒng)),一些是依據(jù)多市場價差的套利系統(tǒng)(套利系統(tǒng)),一些是依據(jù)某些指標(biāo)的平均值(均值回歸系統(tǒng)),而平均值既可以是單一價格時間序列的均值也可以是兩個時間序列差的均值。Furthermore,systemsthatbetwithasituation(suchastrendfollowingsystems)usuallywantthesituationtocontinueforalongandprofitabletime,whereassystemsthatbetagainstasituationwantthesituationtochangeassoonaspossible(soastocaptureaprofitfromthechangeasquicklyas7possible).Soifthemarketspermitit,andifthestrategyentrycriteriapermitit,"betwith"systemswillmakefewerandlongertradestoearntheirprofit,while"betagainst"systemswillusuallytrytomakemoretradesandshortertradestoearntheirprofit.(Thetradeentrycriteriaareimportant—forexample,yourgap-closingstrategycouldwaitformonthsbeforeitseesa5%gapdowntobetagainst).另外,趨勢跟隨系統(tǒng)通過希望這種趨勢能夠持續(xù)較長時間,相反趨勢改變系統(tǒng)希望條件盡快改變(通過條件改變能夠獲利)。因此如果市場允許,交易策略入場條件成立,趨勢跟隨系統(tǒng)將通過次數(shù)更少、時間更長的交易去獲利。(交易入場條件是很關(guān)鍵的,比如,你的跳空回補系統(tǒng)可能會數(shù)月才能找到5%的缺口)。2.2.2SystemsareLong,Short,orOut系統(tǒng)是看多,看空或者看平Systemscanalsobeclassifiedbytheirpossibletradingstates—inoroutofthemarket(state),and(direction)longorshortthemarket.系統(tǒng)也可以根據(jù)他們可能的交易狀態(tài)來進(jìn)行分類——入市或出市(狀態(tài)),看多或者看空(方向)。Singlestatesystemsarealwaysinthemarket.Singlestatesystemsarenotselectiveaboutmarketconditions.Theycanonlydecidetobelongorshort,evenifmarketconditionsdonotfavoranytradesatall(suchasaveryflatmarket).單一狀態(tài)系統(tǒng)是一直處于入市當(dāng)中的。單一狀態(tài)系統(tǒng)并不挑選市場條件。他們僅僅能決定看多還是看空,即使市場條件根本不適用我的交易(比如非常扁平的市場)。Two-statesystemscanbeinoroutofthemarket.Thesesystemscanbepatientandselectiveaboutwhichtradestheywanttoenter.Theyhavetheoptionofsittingoutunfavorablemarketconditions,sotheyaremoreflexiblethansinglestate(alwaysinthemarket)systems.雙狀態(tài)系統(tǒng)即可入市也可出市。這些系統(tǒng)是有耐心的并且會對試圖進(jìn)行的交易條件進(jìn)行選擇。他們可以根據(jù)市場條件選擇出市,因此比單一狀態(tài)系統(tǒng)(一直入市)更靈活。Aunidirectionalsystemcangolong,orshort,butisrestrictedsothatitcannotswitchbetweenlongorshort.Forexample,aconservativesystemmightonlyallowlongtrades.Incontrast,abidirectionalsystemcangolongorshortasitpleases.單向系統(tǒng)即可做多也可做空,但在多空之間轉(zhuǎn)換是受限制的。比如,一個保守的系統(tǒng)也許僅僅是允許做多。相反,一個雙向系統(tǒng)即可以做多也可以根據(jù)條件進(jìn)行做空。Notethatsinglestateunidirectionalsystemsmakenosenseatall—theywouldhavetobepermanentlyinthemarketlongorshortforever.Soforpracticalpurposes,allsinglestatesystemsmustbebidirectional(likeatrend-reversalortrend-flippingsystem)需要注意的是單狀態(tài)單邊系統(tǒng)根本沒有意義——他們將不得不在入市狀態(tài)一直做多或做空。因此從實際出發(fā),所有的單狀態(tài)系統(tǒng)必須是雙邊的(比如趨勢反轉(zhuǎn)系統(tǒng))。8Theconceptofabreakoutsystemisthatwhensomethingsignificanthappenstoaninstrument,thepricewillbreakout(eitherupordown)ofitsprevioustradingrange.Breakoutsystemsmonitortheusualwidthofthepricechannel(therange),andopennewpositionswhenthepricebreaksoutofthechannel.突破系統(tǒng)的概念是當(dāng)某些合約有特殊原因時其價格將突破(上升或下降)上一個交易區(qū)間的價格。突破系統(tǒng)監(jiān)控價格通道的通常寬度,當(dāng)價格突破該通道時會建立新頭寸。Oneoftheoldestfuturestradingsystemswasbasedonthisidea.Thetypicaltradingrulesweresomethinglike:Buywhenthepricebreaksabovethehighesthighofthepastfourweeks,orbelowthelowestlowofthepastfourweeks.Sellwhenyoureachaprofittarget,orwhenatrailingstoplosswas古老的期貨交易系統(tǒng)之一就是基于該理念的。典型的交易規(guī)則如下:當(dāng)價格突破過去四周的高點或者低于過去四周的最低點時就買入。當(dāng)盈利或者止損達(dá)到設(shè)定值時就賣出。Breakoutsystemsaregoodforcapturingmovesthatbreakoutandtakeoffsomedistancefromthechannel,andtheysaveyoufromtryingtotradesmallmovesaspriceswhipsawbackandforthwithinthepricechannel.Buttheycanwhipsawyoutoo,byprovidingfalsebreakoutsthatsuddenlyreturnbackintothechannelafteryou'veopenapositioninthebreakoutdirection.突破系統(tǒng)善于捕捉突破系統(tǒng)一定距離的信號,這樣可以避免企圖交易那些在通道內(nèi)來回波動導(dǎo)致的價格突破信號。即便如此突破系統(tǒng)也會由于提供了錯誤的突破對交易產(chǎn)生誤導(dǎo),這些突破在突破防線開倉后迅速回撤到通道內(nèi)。Somebreakoutsystemsuseextracriteriato“confirm”thatthebreakoutisvalid.Forexample,youmightrequirethatone,two,orthreebarscloseoutsidethechannelbeforeopeningaposition.Further,youmightrequirethatallthreebarsclosefartherawayfromthechanneleachday.有些突破系統(tǒng)使用額外的標(biāo)準(zhǔn)去驗證突破是否有效。比如我們在可以開倉前需要在通道外有一個,兩個或者三個Bars關(guān)閉。另外,我們也可以要求所有的三個Bars都在遠(yuǎn)離通道有一定的距Inallstrategies,addingmoreselectiveconfirmationcriteriawillusuallydecreasethenumberoftradesmadebecausemoretrades(bothwinningandlosing)areexcluded.Butifthecriteriaideasworkwell,boththeaccuracy(%winningtrades)andprofitabilityofthesystemwillincrease.在所有的策略中,通過增加一定的驗證標(biāo)準(zhǔn)會使交易數(shù)量減少。但是,如果的驗證標(biāo)準(zhǔn)是有效的,系統(tǒng)的準(zhǔn)確度和盈利將會增加。Theconceptofatrendfollowingsystemistoopenapositioninthedirectionofthecurrenttrend,andthenkeepthepositionopenuntilthetrendreverses.Usuallytrendsystemsareconstructedfromapairofmovingaveragesthatproducetradingsignalswhentheycrossovereachother.Onemovingaverageisfaster(fewerdaysinthelengthoftheaverage)thantheother,soithugsthepricemovementmore9closely.Theotheraverageisslower(moredays,morelength),andsotakesadifferent"path"throughthepricechartthanthefastaveragedoes.趨勢系統(tǒng)的概念是在當(dāng)前的趨勢方向上開倉并且保持倉位直到趨勢反轉(zhuǎn)。通常趨勢交易系統(tǒng)根據(jù)一對移動平均線在交叉時候產(chǎn)生的信號進(jìn)行交易的。一條移動平均線比另外一條的快(天數(shù)少,時間短),因此它捕捉的價格更接近。另外一條移動的慢(天數(shù)多,時間長),因此在價格曲線圖上它的路徑與快速的不同。Atypicalsetoftradingrulesislikethis:Buywhenthefastaveragecrossesabovetheslowaverage,andsellwhenthefastaveragecrossesbelowtheslowaverage.(Ifyouweretradingbothlongandshortsideswiththesystem,youwouldopenashortpositionheretoo,andreverseitbacktolongatthenextcrossoverpoint.)趨勢系統(tǒng)典型的交易規(guī)則如下:當(dāng)快移動平均線上穿慢移動平均線,當(dāng)快移動平均線下穿慢移動平均線時賣出。(如果做的是雙邊交易,也可以在賣出點開空頭寸并且在下一個交叉點反手做多。)Trendfollowingsystemscangeneratehugeprofitsonlongtrendsthatrunformonthsoryears,ifthesystemdoesn'texitprematurelyonpricepullbacksthatforcethemovingaveragestocrossandexitthetrade.Thereissomewhatofanarttochoosingthebesttypesofaveragesforaparticularmarket—simple,exponential,orweighted—andlengthsofaverages,toallowenoughpullbackroomsoyourpositionisnottakenoutonsmallpricemovesinalongertrend.趨勢持續(xù)幾個月或者幾年時,如果在價格回撤之時并沒有移動平均線交叉從而導(dǎo)致交易過早結(jié)束,這樣趨勢交易系統(tǒng)會產(chǎn)生巨大的盈利。為不同的市場選擇不同的移動平均線比如簡單的、指數(shù)的、加權(quán)等及移動平均線的長度是一門藝術(shù),在一個較長的趨勢中開倉后留有足夠的回撤空間能避免價格回撤導(dǎo)致過早平倉。Thebiggestproblemswithtrendsystemsisthattheyalsogiveupasignificantamountofmoneyattopsandbottomswhilewaitingfortheaveragestocrossover,andtheycanwhipsawyouintoheavylossesinaflat,range-tradingchannelkindofmarketastheyforceyouintounprofitabletradeswhenthereisnotenoughpricemovementbetweencrossoverpoints.趨勢系統(tǒng)最大的問題是在等待移動平均線交叉時,這個系統(tǒng)在頂部和底部也會放棄大量的金錢,并且在市場波動區(qū)間平坦時會令你受到雙重?fù)p失,因為在交叉點間沒有足夠的價格波動,會把你拖入沒有收益的交易之中。Theconceptofananti-trendsystemistoopenapositionagainstthedirectionofthetrend,intheexpectationthatthetrendwillreverseenoughtomakethepositionprofitable.Akeypointofthisconceptisthatonlyshorttermtrendsareconsidered,becauseshorttermtrendsoftendoreverse,andshorttermanti-trendtradesoftendoearnaprofit.Ofcourse,ifthetrenddoesn'treversesoonenough,orifitcontinuestoofarintheoriginaltrenddirection,thepositionisclosedataloss.反趨勢系統(tǒng)的概念是在趨勢的反方向進(jìn)行開倉,并且期待趨勢有足夠的反轉(zhuǎn)從而賺取盈利。這個概念的關(guān)鍵在于僅考慮短期趨勢,因為短期趨勢經(jīng)常發(fā)生反轉(zhuǎn)容易產(chǎn)生盈利。當(dāng)然,如果趨勢并不是短期內(nèi)就反轉(zhuǎn)或者在原始趨勢上持續(xù)太久就應(yīng)該止損平倉。Manydifferenttechnicalmechanismscanbeusedtoconstructanti-trendsystems.Butgenerallyspeaking,amovingaverageofsomekindisusedtorepresentthecenterofthetradingchannel.Thismightbean18or30daymovingaverage,forexample.Inadboundariesareusedtorepresenttheouterrangeoftheaveragetradingchannel.Whenpricesmovefarenoughawayfromtheaveragetowardoneoftheouterchannelboundaries,atradesignali許多不同的技術(shù)指標(biāo)可以用于構(gòu)建反趨勢系統(tǒng)。但通常來講,某些類型的移動平均線用于代表交易通道的中間線,比如18天或30天移動平均線。其他兩條線代表交易通道的邊界線。當(dāng)價格移動距離平均線足夠遠(yuǎn)時,交易信號就會觸發(fā)。Atypicalsetoftradingrulesmightbe:Buywhenpricestrenddownbelowthemovingaveragebymorethan1standarddeviationofthenormaltradingrange.Sellwhenpricesreturntothemovingaverage,orwhenaprofittargetisreached.Alsosellifthetrendcontinuesontoofarintheoriginal典型的交易規(guī)則如下:當(dāng)價格低于移動平均線下正常交易區(qū)間一個標(biāo)準(zhǔn)差時買入,當(dāng)價格回到移動平均線或者盈利達(dá)到預(yù)期時賣出。如果趨勢在原有方向上持續(xù)的更遠(yuǎn)或者交易依然有1或者2個Bars產(chǎn)生就賣出。Anti-trendsystemsaregoodforflat"sideanti-trendtradesworthwhile.Butbeaware,anti-trendsystemsaresusceptibletorealtrendsthatkeepongoing,forcingyoutoclosepositi反趨勢系統(tǒng)適用于扁平市場,因為在扁平市場中經(jīng)常會有反轉(zhuǎn)發(fā)生。但顯而易見的是,反趨勢系統(tǒng)容易在交易趨勢一直趨勢時逼迫交易平倉止損。Theconceptofagapclosingsystemisthalater.Byopeningapositionagainstthemovementthatcausedthegap,youcanmakeaprofitwhenpricesreturntofillthegap.Botho跳空回補系統(tǒng)的概念是缺口價格遲早要關(guān)閉的。在引起跳空的反向開倉,當(dāng)價格回歸回補跳空時產(chǎn)生盈利。隔夜和日內(nèi)跳空都是可交易的。Atypicalsetoftradingrulesmightbe:Buywhenpricesgapdownmorethan2%belowthepreviousbarclose.Sellwhenpricesrisetothepreviousclose,orsellattheendofthetradingday.Additionalconfirmationconditionsmightbetorequ典型的交易規(guī)則如下:當(dāng)跳空在前一個價格2%以下時買入。當(dāng)價格回歸到上一價格或者收市時賣出。附加的確認(rèn)條件也許需要前一交易是收跌日,或者說是指數(shù)或股票在前一交易日收跌。Gapclosingsystemsareverypopularwithmanykindsoftraders.That'sbecausetraderscanmakeprofitsongapsthatarecausedbynewseventsorstrong(butshortterm)pricepressures.However,gapscanlosetradersmoneytoo,ifgapsarecausedbylegitimatepricepressuresthatforcepricestocontinueonintheoriginaltrend.Worseyet,becausegappressuresarestrong,pricescanmovefastagainstyouandgeneratelossesforyouquitequicklyifyou'renot跳空回補系統(tǒng)受到很多交易者的歡迎。這是因為跳空回補系統(tǒng)能夠在由新聞事件或者明顯(但需要是短期)的價格壓力下產(chǎn)生的跳空而產(chǎn)生盈利。但是,同樣的,如果缺口是由于正常的價格壓力迫使價格在一個方向上變動時,跳空回補系統(tǒng)也能給交易者帶來損失。更糟糕的是,由于缺口壓力很大,價格會快速向預(yù)期的反方向移動,如果不是特別小心的話會迅速產(chǎn)生損失。Theconceptofaspreadtradingsystemistotradethespreadbetwetraveltogether.Whenthetwothingsgettoofarawayfromtheirnormalrelationship,youopenpositionthatanticipatestheirreturntonormalconditions.Spreadtradingsystemsusuallyhaveastructurethatincludesaspreadbetweentwoinstrume價差交易系統(tǒng)的概念是根據(jù)并行的兩個合約間的價差進(jìn)行交易。當(dāng)兩個合約脫離正常關(guān)系時進(jìn)行開倉,并且期待價差回到正常水平。價差交易系統(tǒng)通常要求兩個合約或者價格序列之間包含一個Forexample,youmightmakeatradethatsadirectionwiththeS&P500index,orthattwocurrenciesfromIfthetwogettoofarapart,youwouldbuyoneandselltheother,anticipatingareturntonormal比如,我們可以用道瓊斯指數(shù)與S&P500指數(shù),或者相鄰國家的貨幣做交易。如果兩個合約的價差擴(kuò)大時,就選擇買入一個賣出另外一個,希望在價差回歸時有盈利。Atypicalsetoftradingrulesmightbe:BuytheNasdaq10movingaveragevalueoftheratio,andiftheQQQQhashadabig-2%downdaythedaybefore.Closethepositionwhentheratiomovesbacktothe10價差交易的典型規(guī)則如下:當(dāng)QQQQ和SPY之間的比率低于10日移動平均線1.5個標(biāo)準(zhǔn)差并且QQQQ比前一交易有2%的下跌時買入QQQQ賣出SPY500。當(dāng)價差回到10日移動平均線時平Tobeclear,1.5standarddeviationsequatesto90%ofaNormalDistribution,soamothan1.5standarddeviationsfromthemeanis(intheory)supposedtobegreaterthan90%ofallthemovesthattheratiohasevermade.Sothatkindofamovedoesn'thappenveryoften.顯而易見,1.5個標(biāo)準(zhǔn)差相當(dāng)于標(biāo)準(zhǔn)正態(tài)分布的90%,因此超過1.5個標(biāo)準(zhǔn)差的移動是大于90%的移動的,這種類型的移動并不常見。Spreadtradingsystemsarepopular.Youcacorrelatedcloselyenoughtotraveltogetheralargepercentageofthetime.Forexample,twocloselycompetitivestocks,twocloselyrelatedcurrencies,ortwocloselyrelatedindexescanbeusedtotradethiskindofstrategy.價差交易系統(tǒng)很流行。可以在兩個大部分時間內(nèi)相關(guān)度很高的合約上做交易。比如,兩只相近的股票,兩種相近的貨幣或者兩個相近的指數(shù),都可以進(jìn)行這種交易。Noticethattoneutrallytradeaspreadbetweentwothings,youmustbuysimultaneously.That'stheonlywaytoisolatethespreadbetweentwomovingpricestreams.Thenifyouenterthetradebecausethespreadistoowide,youdon'tcareifbothpricesriseorfallwhi
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2024年特定區(qū)域獨家銷售代表合同版B版
- 城市物流園區(qū)停車場施工合同
- 隧道建設(shè)三方施工合同
- 臨時文化展覽館租賃合同
- 自行車店防火門安裝協(xié)議
- 農(nóng)村自建房屋協(xié)議
- 限時優(yōu)惠促銷二手房買賣合同
- 旅游景區(qū)供水井施工合同
- 城市公交站設(shè)施安全合同樣本
- 快遞公司配送司機(jī)勞動合同
- 知名汽車公司APQP質(zhì)量門檢查表
- 圓柱齒輪精度設(shè)計與檢測課件
- 《生產(chǎn)運作管理(第6版)》讀書筆記模板
- 退伙入伙協(xié)議
- 錨索張拉方案正
- 【機(jī)械手】-基于PLC機(jī)械手控制系統(tǒng)設(shè)計
- 城市停車特許經(jīng)營投標(biāo)技術(shù)方案
- “紅領(lǐng)巾獎?wù)隆闭聵訄D案及說明
- 化學(xué)平衡常數(shù)及計算復(fù)習(xí)教學(xué)設(shè)計(方良成)
- 中國體育科學(xué)學(xué)會《運動處方標(biāo)準(zhǔn)格式》
- GB/T 16496-1996化學(xué)試劑硫酸鉀
評論
0/150
提交評論