登录
首页 » Others » Building Trading Bots Using Java [2016]

Building Trading Bots Using Java [2016]

于 2020-12-07 发布
0 202
下载积分: 1 下载次数: 0

代码说明:

Building Trading Bots Using JavaEnglish | 6 Jan. 2017 | ISBN: 1484225198 | 300 Pages | PDF | 6.22 MBBuild an automated currency trading bot from scratch with java. In this book, you will learn about the nitty-gritty of automated trading and have a closer look at Java, the Spring Framework, event-Building Trading Bots Using Javahekhar VarshneyGrangesSwitzerlandISBN13(pbk):978-1-4842-2519-6ISBN-13(electronic): 978-1-4842-2520-2DOI10.1007/978-1-4842-2520-2Library of Congress Control Number: 2016961228Copyright o 2016 by Shekhar VarshneyThis work is subject to copyright All rights are reserved by the Publisher, whether the wholeor part of the material is concerned, specifically the rights of translation, reprinting, reuse ofillustrations, recitation, broadcasting, reproduction on microfilms or in any other physicalway, and transmission or information storage and retrieval, electronic adaptation, computersoftware, or by similar or dissimilar methodology now known or hereafter developedTrademarked names, logos, and images may appear in this book. Rather than use a trademarksymbol with every occurrence of a trademarked name, logo, or image we use the names, logos,nd images only in an editorial fashion and to the benefit of the trademark owner, with nointention of infringement of the trademarkThe use in this publication of trade names, trademarks, service marks, and similar terms, even ifthey are not identified as such, is not to be taken as an expression of opinion as to whetheror notthey are subject to proprietary rightsWhile the advice and information in this book are believed to be true and accurate at thedate of publication, neither the authors nor the editors nor the publisher can accept any legalresponsibility for any errors or omissions that may be made. The publisher makes no warranty,express or implied, with respect to the material contained hereinManaging Director: Welmoed SpahrLead Editor: Steve AnglinEditorial Board: Steve Anglin, Pramila Balan, Laura Berendson, Aaron Black, Louise Corrigan,Jonathan gennick, Robert Hutchinson, Celestin Suresh John, Nikhil KarkalJames Markham, Susan McDermott, Matthew Moodie, Natalie Pao, Gwenan SpearingCoordinating Editor: Mark PowersCopy Editor: Kezia EndsleyCompositor: SPi GlobalIndexer: SPi GlobaArtist: SPi GlobalDistributed to the book trade worldwide by Springer Science+ Business Media New York,233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax(201)348-4505e-mailorders-ny@springer-sbm.comorvisitwww.springeronline.com.ApressMedia,Llcisa California LlC and the sole member(owner) is Springer Science Business Media FinanceInc(SSBM Finance Inc). SSBM Finance Inc is a Delaware corporationForinformationontranslationspleasee-mailrights@apress.comorvisitwww.apress.comApress and friends of ed books may be purchased in bulk for academic, corporate, or promotionaluse eBook versions and licenses are also available for most titles For more information referenceourSpecialbUlkSales-ebookLicensingwebpageatwww.apress.com/bulk-salesAny source code or other supplementary materials referenced by the author in this text areavailabletoreadersatwww.apress.com.Fordetailedinformationabouthowtolocateyourbookssourcecodegotowww.apress.com/source-code/.ReaderscanalsoaccesssourcecodeatSpringerlink in the Supplementary Material section for each chapter.Printed on acid-free paperedicated to the angels in my lifemy mother, my wife Preshita, and my two daughters Mihika and anyaLast but not the least, my college professor, Dr. Rajat Moona,who sowed the seeds of computer programming in my dnaContents at a glanceAbout the authorChapter 1: Introduction to Trading Bota.Chapter 2: Account Management27Chapter 3: Tradeable Instruments47Chapter 4: Event Streaming: Market Data EventsChapter 5: Historic Instrument Market Data aeEERaar75Chapter 6: Placing Orders and trades97Chapter 7: Event Streaming: Trade/Order/Account Events159Chapter 8: Integration with Twitter aamna■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■175Chapter 9: Implementing Strategies.am.203Chapter 10: Heartbeating ammmmmmmmmmmn 219Chapter 11: E-Mail Notifications ammmmatmmammmmmmmnmamman 231Chapter 12: Configuration, Deployment, and Running the Bot 243Chapter 13: Unit Testing■■■■■■■■■■■■口■■■■■■■■■■■■■■■■■■■口■■■■■■■■■■■■■■■■■■口■■■■■263Index…277ContentsAbout the author,i币Chapter 1: Introduction to Trading Bot m mmmemmIRD■■■■■■■■■■■■■■■■■■■■■■■■■What Is a Trading Bot?Why do We need a trading bot?...3The capabilities of the Trading BotDesign goalsCode organization and software Stack Used .OANDA REST API as Reference Implementation.m....ammann. 8Opening an oanda practice Account80 ANDA JS0 N Keys…………Constructor Dependencies for OANDA Implementations15Event-Driven architectureG0 ogle eventBus…18Provider helper Interface20Trading Config class.........mmonann......mtnonnn.......tnn 22Obtaining the Source Code.aaeeaaaee... 24Try It Yourself section..aaaaaa.. 24Chapter 2: Account Managementa27Account provider interface31A Concrete Implementation for AccountDataProvider32Encapsulating Everything Behind a Generic AccountlnfoService37Try It yourself43VIlCONTENTSChapter 3: Tradeable Instruments47InstrumentA Concrete Implementation for InstrumentDataProvider52Encapsulating Everything Behind a Generic Instrumentservice56Try It yourself58Chapter 4: Event Streaming: Market Data Events mmmmmmmmmm. 61Streaming Market Data Interface.A Concrete Implementation for MarketData StreamingService .m..63Downstream Market data event disseminationMarketEventcallback……69Try It Yourself,…70Chapter 5: Historic Instrument Market Data mmmmmmmm 75How to read a candlestick75Enum Defining the Candlestick Granularity76Define pojo to hold candlestick information77Historical Data Provider Interface79A Concrete Implementation for HistoricMarketDataProvidern81Discussion An Alternate Database Implementation85Candlesticks for Moving Average Calculations....88MovingAverage calculation Service89Try lt YourselfChapter 6: Placing Orders and Trades■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■97Order pojo definition98Order Management provider Interface101A Concrete Implementation for Order ManagementProvider,103A Simple orderInfoService,115CONTENTSValidating Orders Before Execution: PreOrderValidationService... 116Putting It All Together in an OrderExecution Service .mmmm... 121Trade pojo definition124Trade Management provider Interface127A Concrete Implementation for TradeManagementProvider129Encapsulating Read Operations Behind TradelnfoService.....m. 136Try It yourself144Chapter 7: Event Streaming: Trade/order/Account Events m 159Streaming Event Interface161A Concrete Implementation for Events StreamingService162Try It Yourself171Chapter 8: Integration with Twitter■■■■■■■■■■■■■■■■■■■■175Creating a Twitter Application175Spring Social180Using and Configuring Spring Social180Harvesting FX Tweets181Tweetharvester Interface wmmm. 185XTWeethandler Interface,,,………AbstractFxtweethandler base class186User-Specific TweetHandlersTry lt Yourself.Chapter 9: Implementing Strategies.aa203Copy Twitter Strategy204Fade the Move Strategy210Try It Yourself214CONTENTSChapter 10: Heartbeating ammammmmmmmmmmmmmmm 219HeartBeatPayload. ..m......m. 219Streaming the Heartbeat Interface220A Concrete Implementation for HeartBeatstreamingService221HeartBeatcallback Interface223DefaultheartBeatservice223Try It Yourself226Chapter 11: E-Mail notifications n231Notification Design.EmailPayLoad poJoEmailContentgenerator interface……232Sample Implementations.EventEmailNotifier service mm...m. 235Try It Yourself.237Chapter 12: Configuration, Deployment, and running the bot m 243Configuring the Trading Bot243Core Beans configuration244Twitter-Related Beans Configuration.....................247Provider Beans Configuration248Strategies configuration…254Services Configuration254Building the Bot...,,,,,…,,……256Running the bot.....,,……259CONTENTSChapter 13: Unit Testinga263Using Mockito as a Mocking Framework.Mocking Http iNteraction..............m....................e........................ 264Mocking Streams.The versatile verify Mockit0…....,.,,…271Mocking Twitter Interaction .EclEmma Code Coverage Tool for Eclipse ide.nDDDDDDDDDm274Index■■■■■■■■■■■■■■■■■■■口En277

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 北大计算机网络概论课件——严伟教授
    北大严伟教授讲授的计算机网络课件,还可以,你值得拥有
    2020-12-11下载
    积分:1
  • arcgis js api最优路径分析
    实现了arcgis js api 最优路径分析,包里有路径分析好的数据,按照推荐的网站发布成网络服务,修改下网页中加载的服务路径,最优路径分析功能就可以运行,里面有本人好的效果。希望帮助到你
    2020-12-05下载
    积分:1
  • MPU-6050 六轴传感器数据手册(中文)
    MPU-6050 六轴传感器数据手册(中文)T。pvewTop View88昌翼24123122212019CLKIN18 GNDCLKIN 118 GNDNc 217|NcNC 2Nc6NCNc 316NCMPU-6000MPU-6050Nc16 NCNc514NCAUX DA613VDDAUX_DA613VDDmoQB5B召azQFN PackageQFN Package24-pin, 4mm x 4mm xo9mm24-pin, 4mm x 4mm x 0.9mm+2+7.2典型应用GNDCr 10n2巴2222l2巴2凹2CLKINMPU600回而MPU-6050 sAX CLAUX CLGNDClVLOGIC△NDGNDTypical Operating Circuits73所用电容规格器件标签规格数量校准滤波电容(Pm10)C1陶瓷,Ⅹ7R,0.1uF±10%,2VVDD旁路电容(Pin13)C2陶瓷,Ⅹ7R,0.1uF±10%,4∨电荷泵电容(Pin20)C3陶瓷,Ⅹ7R,10UF±10%,50VLOGC旁路电容(Pin8)C4陶瓷,X7R,10uF±10%,4V7.4上电过程建议Power-Up Sequencing1. TVDDR is VDD rise time: Time for vdd to risefrom 10% to 90% of its final valueVDDR2. TVDDR is $100msec3. tvr is VLOGIC rise time: Time forVLOGIC to rise from 10% to 90% of its finalVDDvaltlVR4. TVGR is S3msec90%5. TvG-VDD is the delay from the start of VDDramp to the start of VLOGIC riseVLOGIC10%6. TVLGVDD is 20: VLOGIC amplitude mustalways be sVDD amplitude7. VDD and VLOGIC must be monotonicramps1.VLOG|C振幅必须sVDD振幅2.VDD上升时间(TvDR)为实际值的10%到90%之间3.VDD上升时间(TvDR)≤100ms4.ⅥLOGC上升时间( TVLGR)为实际值的10%到90%之间5. VLOGIO上爪时间(TvcR)≤3ms6. TVG-VDD为从VDD上升沿到LOG|C上升沿的时间7.VDD和ⅥLOGC必须是单调边沿7.5系统结构图CLKINCLKOUTacknowledgSCL FROMMASTER8clock pulse forSTARTacknowledgementconditionAcknowledge on the ic bus通信开始标志(S)发出后,主设备会传送一个7位的Save地址,并且后面跟着一个第8位,称为Read/ Write位。R^W位表小主改备是在接受从改备的数据还是在向其写数据。然后,主设备释放SDA线,等待从设各的应答信号(ACK)。每个字节的传输都要跟随有一个应答位。应答产生时,从设备将SDA线拉低并且在SCL为晑电平时保持低。数据传输总是以停止标志(P)结束,然后释放通信线路。然而,主设备也可以产生重复的开始信号去操作另一台从设备,而不发出结束标志。综上可知,所有的SDA信号变化都要在SCL时钟为低电平时进行,除了廾始和结束标志。SDA91-7891-7START ADDRESS RN ACKDATAACKDATAACK STOPconditionComplete IC Data Transfer如果要写MPU-60X0寄存器,主设备除了发出开始标志(S)和地址位,还要加一个R∧W位,0为写,1为读。在第9个时钟周期(高电平时),MPU-60X0产生应答信号。然后主设备开始传送奇行器地址(RA),接到应答后,开始传送寄存器数据,然后仍然要有应答信号,依次类推。单字节写入时序Master S AD+WRADATASlaveACKACKACK连续写入时序
    2020-12-05下载
    积分:1
  • 2010中国气象数据集
    2010中国气象数据集
    2020-12-06下载
    积分:1
  • java、MYSQL作业上传系统
    一套在java+MySQL开发的线作业提交系统,本人做的毕业设计,希望有用哦!!
    2020-11-04下载
    积分:1
  • 国际参考电离层模型IRI的matlab
    包含IRI2007、2012、2016三个版本,分别为IRI2007、IRI2012、IRI2016三个文件。在iritest中fun2test的参数分别更改为@iri2007、@iri2012、@iri2016可以得到对应的iri模型值。
    2020-11-30下载
    积分:1
  • 词法分析器
    词法分析器 输入为字符串(或待进行词法分析的源程序),输出为单词串,即由(单词,类别)所组成的二元组序列。
    2021-03-29 15:49:10下载
    积分:1
  • 黑马序员_超全面的JavaWeb视频教vedio33天1-13天源码笔记.rar
    黑马程序员_超全面的JavaWeb视频教程vedio33天1-13天源码笔记.rar )
    2020-12-11下载
    积分:1
  • 机器人聊天
    机器人聊天。 有趣好玩。
    2020-12-11下载
    积分:1
  • 电动汽车再生制动与ABS协调控制策略研究simulink整车模型
    电动汽车再生制动与ABS协调控制策略研究simulink整车模型,模型可运行,主要包括电池、电机、轮胎、车辆动力学模型、控制策略模型。
    2021-05-06下载
    积分:1
  • 696518资源总数
  • 106242会员总数
  • 10今日下载