OpenQuantGettingStartedGuideChinese.docx

上传人:b****3 文档编号:3518081 上传时间:2022-11-23 格式:DOCX 页数:86 大小:3.07MB
下载 相关 举报
OpenQuantGettingStartedGuideChinese.docx_第1页
第1页 / 共86页
OpenQuantGettingStartedGuideChinese.docx_第2页
第2页 / 共86页
OpenQuantGettingStartedGuideChinese.docx_第3页
第3页 / 共86页
OpenQuantGettingStartedGuideChinese.docx_第4页
第4页 / 共86页
OpenQuantGettingStartedGuideChinese.docx_第5页
第5页 / 共86页
点击查看更多>>
下载资源
资源描述

OpenQuantGettingStartedGuideChinese.docx

《OpenQuantGettingStartedGuideChinese.docx》由会员分享,可在线阅读,更多相关《OpenQuantGettingStartedGuideChinese.docx(86页珍藏版)》请在冰豆网上搜索。

OpenQuantGettingStartedGuideChinese.docx

OpenQuantGettingStartedGuideChinese

 

OpenQuant

GettingStartedGuide

OpenQuant入门指南

Version3.2.2,2011-07-31

KevinJameson

凯文詹姆森

翻译:

伍侃、张毅

 

1Introduction引言

OpenQuantisanIDE(integrateddevelopmentenvironment)applicationfordesigningandexecutingcomputerizedquantitativetradingstrategiesoneitherhistoricalorlivemarketdata.OpenQuantisasimpler,moremodern,andlessexpensiveversionoftheoriginalprofessionalQuantDeveloperIDE.

OpenQuant是一个利用历史或实时数据进行设计和执行量化交易的IDE(集成开发环境),它比面向专家的QuantDeveloper的更加简单、现代和便宜的产品。

Inparticular,theOpenQuantIDEhasamodernlookandfeel,abetterwindowdockingsystem,betterdraganddropcapabilities,asimplerprogrammingAPI,andaneasywayofswitchingbetweenSimulationTrading,PaperTrading,andLiveTradingmodes.

特别的是,这个IDE有一个现代的外观和风格,一个更好的窗口停靠系统,更方便的拖拽功能,更简单的编程API和在模拟、仿真和实盘之间转换的简易方式。

HereisalistofotherSmartQuantdocumentsthatmightbeofinteresttoOpenQuantusers.Theseotherdocumentsdiscussgeneraltradingandstrategydevelopmenttopics.Youmightwanttoreadthedocumentsinthefollowingordertomaximizeyourlearningspeed.

以下是一些SmartQuant其他文档的列表,你也许会对它们感兴趣。

这些文档讨论的主题是交易和策略开发,你可以考虑按下面的顺序阅读这些文档以便于加快学习速度。

1.SystemArchitectureManual.ThismanualintroducesSmartQuantsystemterminology,majorsystemcomponents,andsystemconfigurationsforsolvingtypicalusergoals.

系统构架手册。

这本手册介绍了SmartQuant系统的术语、主要系统组件和典型的为了达到用户目标的系统配置。

2.GettingStartedManual.ThisOpenQuantmanual(theoneyouarereadingnow)showsyouhowtousetheOpenQuantIDEtoconfigureandexecuteasimplestrategyonhistoricaldatastoredintheIDEdatabase.Youcanchooseafinancialinstrument,runastrategy,andinspectthesimulationresults.

入门指南。

该指南(即本手册)描述了如何使用该框架配置、执行一个基于存储在OpenQuantIDE数据库中的历史数据的简单策略。

你可以选择一个金融产品,运行策略并且查看模拟结果。

3.StrategyDevelopmentManual.Thismanualshowsyouhowtodesignandcodeuser-definedstrategiesonuser-specifiedfinancialinstruments.Themanualbeginswithanoverviewoftradingsystemdesign,thenmovesontoSmartQuantsystemconcepts,andfinallydiscussestheSmartQuantcodeforseveralstrategiesindepth.

策略开发手册。

该手册描述了如何基于用户自定义的金融产品去设计和编写策略。

该手册以交易系统设计综述开始,然后描述了SmartQuant系统概念,最后深入讨论了SmartQuant中几个交易策略的代码。

1.1IntendedAudience面向的读者

ThisdocumentisanintroductoryGettingStarteddocumentfortheOpenQuantIDE,writtenatalevelthatissuitablefornovicestrategydevelopers.Experiencedstrategydeveloperswillhavenoproblemsatallunderstandingtheinformationprovidedhere.

本文档是介绍OpenQuantIDE的入门文档。

适合初学的策略开发人员。

有经验的策略开发人员在理解本文的所有内容时不会有任何问题。

1.2GoalsofThisDocument编写目的

ThemaingoalofthisdocumentistoshowyouhowtousethenewOpenQuantIDEtocreateandruncomputerizedtradingstrategiesoneitherhistoricalorlivemarketdata,usingeithersimulatedorlivetradeexecutionmodes.Inparticular,thisdocumentdiscussesthepurposeanduseofallIDEwindowssoyoucanusetheIDEproductively.

本文档的主要目的是说明如何使用新的OpenQuantIDE利用历史或实盘数据来模拟或实盘执行交易策略。

此外,本文档讨论了所有IDE窗口的建立目的和使用方法,这样,你就能有效率的使用这个IDE了。

Thisdocumentdoesnottalkaboutthetheoryandclassificationofcomputerizedtradingstrategies.Nordoesdescribehowtowriteprofitableandefficienttradingsystemsusingtrendfollowing,gaptrading,volatilitytrading,orarbitragetradingstrategies.Forthatkindofinformation,readtheSmartQuantStrategyDevelopmentManual.

本文档讨论的不是计算机交易策略的理论和分类,更没有描述如何编写有效的趋势跟随、跳空交易、波动率交易或者套利策略。

想了解这些内容,请阅读SmartQuant策略开发手册。

Afterreadingthisdocument,youshouldhaveagoodunderstandingofhowtheOpenQuantIDEworks,andshouldbeabletowriteandtestyourowntradingstrategiesrightaway.

阅读这篇文档之后,你能深入了解OpenQuantIDE如何工作,并且能够立刻编写和测试自己的交易策略。

2InstallingtheLicenseFile安装证书文件

ThelicensefilefortheOpenQuantapplicationisnamedOpenQuant.license.CopythisfileintotheSmartQuantFramework/bin/directory,normallylocatedhereinatypicaldefaultinstallationonWindows7:

OpenQuant的证书文件被命名为OpenQuant.license。

把这个文件复制到SmartQuant的Framework/bin/目录下,一般在Windows7下默认安装在如下地址:

C:

\ProgramFiles\SmartQuantLtd\OpenQuant\Framework\bin\OpenQuant.license

OnceOpenQuantcanfindthelicensefile,thesplashscreenwillnotshowa―“Demoversion”warning.

只要OpenQuant能找到这个证书文件,启动画面就不会显示“Demoversion”警告了。

3TouringtheOpenQuantIDEInterface浏览OpenQuant开发界面

ThissectionprovidesanoverviewofthemainelementsoftheOpenQuantuserinterface.Theinterfaceisintendedtosupporttheactivitiesof

这一部分提供了OpenQuant用户界面主要元素的概述。

界面能支持如下功能:

●Financialinstrumentanalysiswithtechnicalindicatorssuchasmovingaverages

使用技术指标对金融合约分析,如移动平均线

●StrategydevelopmentinC#usingtheOpenQuantprogrammingAPI,and

使用C#语言,利用OpenQuantAPI进行策略开发

●AutomatictradinginSimulation,PaperTrading,andLiveTradingmodesofoperation

以模拟、仿真和实盘模式进行自动化交易

First,hereisascreenshotoftheentireIDE,showingmenus,dockabletoolbars(deliberatelyspreadapartforvisualseparation),dockablesideandbottomwindows,andachartofAMZNshowninthecenterwindowpane.

首先,这里有一张完整主界面的截图,展示了菜单、停靠工具栏(为了观看刻意展开),停靠侧边栏和底部窗口,还有一个在中心面板的图表窗口正显示股票AMZN。

TheOpenQuantIDEismodeledaftermodernsoftwaredevelopmentIDEssuchasVisualStudio—themaindifferencebeingthatOpenQuantisintendedforcomputerizedquantitativetradingstrategydevelopment,whereasVisualStudioisintendedforgeneralsoftwaredevelopment.

OpenQuant集成开发环境是以时下流行的软件开发环境为模型,例如VisualStudio—主要区别是OpenQuant是面向计算机量化交易策略开发,而VS面向通用软件开发。

3.1UnderstandingIDEMenus了解IDE菜单

ThissectionintroducestheIDEmenus,onebyone.Ascreenshotofeachmenuisfollowedbyabriefdescriptionofthemenufunctionality.

这一部分一一介绍了IDE菜单。

每个菜单都有一个截图和一段简短的菜单的功能描述。

3.1.1TheFileMenu文件菜单

TheFileMenuprovidestheusualmenuchoicesforcreatingnewsolutioncontainersandstrategyprojects,openingexistingsolutionsandstrategies,andaccessingrecentlyusedsolutionsandstrategies.Asolutioncontainercancontainmultiplestrategyprojects.Eachstrategywithinasolutioncanimplementadifferentalgorithm,usingdifferentinstruments(tickers)andcodeblocks.

文件菜单提供了通用的菜单选项,如创建一个新的解决方案和策略项目,打开已存的解决方案和策略,访问最近使用的解决方案和策略。

一个解决方案容器能包含多个策略项目。

每个策略与解决方案结合,使用不同的合约和代码块能实现不同的算法。

3.1.2TheEditMenu编辑菜单

TheEditMenuprovidestheusualcut/copy/paste/undo/redooptionsforeditingC#strategysourcecodefiles.(NochoicesareselectableinthisscreenshotbecausethemainwindowisacandlestickchartofAAPL—youmusthavesometext(code)selectedbeforeanyofthesechoiceswillbecomeactive.)

编辑菜单提供了通用的剪切/复制/粘贴/撤销/恢复选项,这些选项能编辑C#策略源文件。

(在截图中没有选项能选择,这是因为主窗口是一个AAPL股票的蜡烛图——当你在使用这些选项之前,你必须有一些文本(代码)能选择。

3.1.3TheViewMenu视图菜单

TheViewMenuprovideschoicesformanydifferentwindowpanesandtoolbars.Hereisabriefdescriptionofthevariouswindowpanes.ManyofthewindowpaneslistedontheViewmenuarevisibleintheentirescreenshotshownatthestartofthissection.

视图菜单提供了许多不同的面板和工具栏。

这有个多种面板的简单描述。

在视图菜单中罗列了许多面板,可以在本章节开始的完整截图中明显地看出来。

Allofthedockingpanesontheleft,bottom,andrightsideoftheinterfacearemodern“tear-off”windowspanes.Bygrabbingthepanetitlebarwithyourmouse,youcantearoffthepanesandrepositionthematotherscreenlocationsinsideoroutsideofthemainwindowboundaries.

左侧、底部、左侧的停靠面板都是现代的可分离面板,通过鼠标拖动窗口标题栏,可以分离面板或者把面板定位在界面的其他位置,主窗口边界内外均可。

ThelistbelowonlygivesashortintroductorystatementabouteachmenuchoiceontheViewmenu.AmoredetailedpictureanddescriptionofeachwindowpanereferencedbytheViewmenuisshownlaterinthisdocument.

以下列表只给出了每个视图菜单按钮的简短介绍。

更多的细节图片和每个视图面板的描述会在这篇文档之后的内容中列出。

●TheInstrumentswindowpane(topleft)showsfinancialinstrumentsthataredefinedforusebytheIDE.TheInstrumentsisvisibleunderneaththemenuinthisscreenshot.Youmustdefineyourfavoriteinstrumentsherebeforeyoucanusetheminatradingstrategy.

合约面板(左上)展示了已定义的金融合约。

截图中的菜单遮挡了这些合约。

你在交易策略中使用你喜欢的合约之前,必须先对这些合约下好定义。

●TheIndicatorswindowpane(bottomleft)showsvarioustechnicalindicatorsthatyoucandraganddropontoachartofaninstrumentforanalyzinginstrumentbehavior.TheIndicatorstabisinactiveinthisscreenshot.

指标面板(左下)展示了多种技术指标,你能拖拽它们到一个合约的图表上来分析这些合约的行为。

指标选项卡在这个截图中非活动状态。

●TheOrderManagergrid(centertab)helpsyoutoview,enter,andcanceltradingordersthataresenttotheExecutionproviderthatisresponsibleforexecutingtradingorders.

报单管理(中央选项卡)帮助你查看、入场和撤销已发送给交易接口的交易指令,负责执行交易指令。

●ThePortfoliogrid(centertab)showsallthetradesforalltheinstrumentsthatwereexecutedaspartofyourstrategy.AseparatePortfolioisprovidedforeachtradingmode(Simulation,PaperTrading,orLiveMode).ThePortfoliogridshowsyouropenpositionswhenyouareinlivetradingmode,profitandlossforthosepositions,aswellasAccountvaluesandAccounttransactions.

投资组合(中央选项卡)显示了作为你策略部分的已执行的所有合约的所有交易。

一个分离的投资组合提供了各种交易模式(模拟、仿真或者实盘模式)。

当你在实盘交易模式的时候,投资组合选项卡显示你的开仓头寸,这些头寸的盈亏,还有账户权益和交易记录。

●TheProviderswindowpane(bottomleft)showsprovidersfortradeExecution,HistoricalMarketData,Instrumentdefinitions,andrealtimeMarketData.ThedockableProviderspanesharesdockingspacewiththeIndicatorspaneinthebottomleftofthescreen.

提供商面板(左下)显示了交易执行,历史数据、合约、实时行情提供商。

提供商面板与指标面板共享左下停靠空间。

●TheProviderErrorswindowpane(bottomcenter)showserrormessagesthatmightarisefromproviders.Typicalerrorsincludeconnectionfailuremessages,anddatarequestfailures.Checkthiswindowforinformationifyouhavetroublewithproviders.

提供商错误面板(中下)显示提供商引发的错误。

典型的错误包括连接失败信息,和数据请求失败。

如果你的提供商出现问题,请查看这个窗口的信息。

●TheBrokerInfowindowpane(centertab)showsinformationaboutyourcurrentbrokeraccount,whenyouarepapertradingorlivetradingwitharealbrokerageaccount.Thecentertabisemptyifyouaredoingsimulatedtrading.

账号信息面板(中央)。

当你仿真或实盘交易一个实际账号时会显示账户信息。

模拟下只显示空白。

●TheSolutionExplorerw

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 表格模板 > 合同协议

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1