Lectures on Stochastic Programming-Model
这是一本关于随机规划比较全面的书!比较难,不太容易啃,但是读了之后收获很大。这是高清版的!To Julia, Benjamin, Daniel, Nalan, and Yael;to Tsonka Konstatin and Marekand to the memory of feliks, Maria, and dentcho2009/8/20pagContentsList of notationserace1 Stochastic Programming ModelsIntroduction1.2 Invento1.2.1The news vendor problem1.2.2Constraints12.3Multistage modelsMultiproduct assembl1.3.1Two-Stage Model1.3.2Chance Constrained ModeMultistage modelPortfolio selection131.4.1Static model14.2Multistage Portfolio selection14.3Decision rule211.5 Supply Chain Network Design22Exercises2 Two-Stage Problems272.1 Linear Two-Stage Problems2.1.1Basic pi272.1.2The Expected Recourse Cost for Discrete Distributions 302.1.3The Expected Recourse Cost for General Distributions.. 322.1.4Optimality Conditions垂Polyhedral Two-Stage Problems422.2.1General Properties422.2.2Expected recourse CostOptimality conditions2.3 General Two-Stage Problems82.3.1Problem Formulation, Interchangeability482.3.2Convex Two-Stage Problems2.4 Nonanticipativity2009/8/20page villContents2.4.1Scenario formulation2.4.2Dualization of Nonanticipativity Constraints2.4.3Nonanticipativity duality for general Distributions2.4.4Value of perfect infExercises3 Multistage problems3. 1 Problem Formulation633.1.1The general setting3.1The Linear case653.1.3Scenario trees3.1.4Algebraic Formulation of nonanticipativity constraints 7lDuality....763.2.1Convex multistage problems·763.2.2Optimality Conditions3.2.3Dualization of Feasibility Constraints3.2.4Dualization of nonanticipativity ConstraintsExercises4 Optimization models with Probabilistic Constraints874.1 Introduction874.2 Convexity in Probabilistic Optimization4.2Generalized Concavity of Functions and measures4.2.2Convexity of probabilistically constrained sets1064.2.3Connectedness of Probabilistically Constrained Sets... 113Separable probabilistic Constraints.1144.3Continuity and Differentiability Properties ofDistribution functions4.3.2p-Efficient Points.1154.3.3Optimality Conditions and Duality Theory1224 Optimization Problems with Nonseparable Probabilistic Constraints.. 1324.4Differentiability of Probability Functions and OptimalityConditions13344.2Approximations of Nonseparable ProbabilisticConstraints134.5 Semi-infinite Probabilistic Problems144E1505 Statistical Inference155Statistical Properties of Sample Average Approximation Estimators.. 1555.1.1Consistency of SAA estimators1575.1.2Asymptotics of the saa Optimal value1635.1.3Second order asStochastic Programs5.2 Stoch1745.2.1Consistency of solutions of the SAA GeneralizedEquatio1752009/8/20pContents5.2.2Atotics of saa generalized equations estimators 1775.3 Monte Carlo Sampling Methods180Exponential Rates of Convergence and Sample sizeEstimates in the Case of a finite Feasible se1815.3.2Sample size estimates in the General Case1855.3.3Finite Exponential Convergence1915.4 Quasi-Monte Carlo Methods1935.Variance-Reduction Techniques198Latin hmpling1985.5.2Linear Control random variables method200ng and likelihood ratio methods 205.6 Validation analysis5.6.1Estimation of the optimality g2025.6.2Statistical Testing of Optimality Conditions2075.7Constrained Probler5.7.1Monte Carlo Sampling Approach2105.7.2Validation of an Optimal solution5.8 SAA Method Applied to Multistage Stochastic Programmin205.8.1Statistical Properties of Multistage SAA Estimators22l5.8.2Complexity estimates of Multistage Programs2265.9 Stochastic Approximation Method2305.9Classical Approach5.9.2Robust sA approach..23359.3Mirror Descent sa method235.9.4Accuracy Certificates for Mirror Descent Sa Solutions.. 244Exercis6 Risk Averse Optimi2536.1 Introductio6.2 Mean-Risk models.2546.2.1Main ideas of mean -Risk analysis546.2.2Semideviation6.2.3Weighted Mean Deviations from Quantiles.2566.2.4Average value-at-Risk2576.3 Coherent risk measures2616.3.1Differentiability Properties of Risk Measures2656.3.2Examples of risk Measures..2696.3.3Law invariant risk measures and Stochastic orders2796.3.4Relation to Ambiguous Chance Constraints2856.4 Optimization of risk measures.2886.4.1Dualization of Nonanticipativity Constraints2916.4.2Examples...2956.5 Statistical Properties of Risk measures6.5.IAverage value-at-Ris6.52Absolute semideviation risk measure301Von mises statistical functionals3046.6The problem of moments306中2009/8/20page xContents6.7 Multistage Risk Averse Optimization3086.7.1Scenario tree formulation3086.7.2Conditional risk mappings3156.7.3Risk Averse multistage Stochastic Programming318Exercises3287 Background material3337.1 Optimization and Convex Analysis..334Directional Differentiability3347.1.2Elements of Convex Analysis3367.1.3Optimization and duality3397.1.4Optimality Conditions.............3467.1.5Perturbation analysis3517.1.6Epiconvergence3572 Probability3597.2.1Probability spaces and random variables7.2.2Conditional Probability and Conditional Expectation... 36372.3Measurable multifunctions and random functions3657.2.4Expectation Functions.3687.2.5Uniform Laws of Large Numbers...,,3747.2.6Law of Large Numbers for Random Sets andSubdifferentials3797.2.7Delta method7.2.8Exponential Bounds of the Large Deviations Theory3877.2.9Uniform Exponential Bounds7.3 Elements of Functional analysis3997.3Conjugate duality and differentiability.......... 4017.3.2Lattice structure4034058 Bibliographical remarks407Biibliography415Index4312009/8/20pageList of Notationsequal by definition, 333IR", n-dimensional space, 333A, transpose of matrix(vector)A, 3336I, domain of the conjugate of risk mea-C(X) space of continuous functions, 165sure p, 262CK, polar of cone C, 337Cn, the space of nonempty compact sub-C(v,R"), space of continuously differ-sets of r 379entiable mappings,176set of probability density functions,I Fr influence function. 3042L, orthogonal of (linear) space L, 41Sz, set of contact points, 3990(1), generic constant, 188b(k; a, N), cdf of binomial distribution,Op(), term, 382214S, the set of &-optimal solutions of theo, distance generating function, 236true problem, 18g(x), right-hand-side derivative, 297Va(a), Lebesgue measure of set A C RdCl(A), topological closure of set A, 334195conv(C), convex hull of set C, 337W,(U), space of Lipschitz continuousCorr(X, Y), correlation of X and Y 200functions. 166. 353CoV(X, Y, covariance of X and y, 180[a]+=max{a,0},2ga, weighted mean deviation, 256IA(, indicator function of set A, 334Sc(, support function of set C, 337n(n.f. p). space. 399A(x), set ofdist(x, A), distance from point x to set Ae multipliers vectors334348dom f, domain of function f, 333N(μ,∑), nonmal distribution,16Nc, normal cone to set C, 337dom 9, domain of multifunction 9, 365IR, set of extended real numbers. 333o(z), cdf of standard normal distribution,epif, epigraph of function f, 333IIx, metric projection onto set X, 231epiconvergence, 377convergence in distribution, 163SN, the set of optimal solutions of the0(x,h)d order tangent set 348SAA problem. 156AVOR. Average value-at-Risk. 258Sa, the set of 8-optimal solutions of thef, set of probability measures, 306SAA problem. 181ID(A, B), deviation of set A from set Bn,N, optimal value of the Saa problem,334156IDIZ], dispersion measure of random vari-N(x), sample average function, 155able 7. 2541A(, characteristic function of set A, 334吧, expectation,361int(C), interior of set C, 336TH(A, B), Hausdorff distance between setsLa」, integer part of a∈R,219A and B. 334Isc f, lower semicontinuous hull of funcN, set of positive integers, 359tion f, 3332009/8/20pageList of notationsRc, radial cone to set C, 337C, tangent cone to set C, 337V-f(r), Hessian matrix of second orderpartial derivatives, 179a. subdifferential. 338a, Clarke generalized gradient, 336as, epsilon subdifferential, 380pos w, positive hull of matrix W, 29Pr(A), probability of event A, 360ri relative interior. 337upper semideviation, 255Le, lower semideviation, 255@R. Value-at-Risk. 25Var[X], variance of X, 149, optimal value of the true problem, 1565=(51,……,5), history of the process,{a,b},186r, conjugate of function/, 338f(x, d), generalized directional deriva-g(x, h), directional derivative, 334O,(, term, 382p-efficient point, 116lid, independently identically distributed,1562009/8/20page xlllPrefaceThe main topic of this book is optimization problems involving uncertain parametersfor which stochastic models are available. Although many ways have been proposed tomodel uncertain quantities stochastic models have proved their flexibility and usefulnessin diverse areas of science. This is mainly due to solid mathematical foundations andtheoretical richness of the theory of probabilitystochastic processes, and to soundstatistical techniques of using real dataOptimization problems involving stochastic models occur in almost all areas of scienceand engineering, from telecommunication and medicine to finance This stimulates interestin rigorous ways of formulating, analyzing, and solving such problems. Due to the presenceof random parameters in the model, the theory combines concepts of the optimization theory,the theory of probability and statistics, and functional analysis. Moreover, in recent years thetheory and methods of stochastic programming have undergone major advances. all thesefactors motivated us to present in an accessible and rigorous form contemporary models andideas of stochastic programming. We hope that the book will encourage other researchersto apply stochastic programming models and to undertake further studies of this fascinatinand rapidly developing areaWe do not try to provide a comprehensive presentation of all aspects of stochasticprogramming, but we rather concentrate on theoretical foundations and recent advances inselected areas. The book is organized into seven chapters The first chapter addresses modeling issues. The basic concepts, such as recourse actions, chance(probabilistic)constraintsand the nonanticipativity principle, are introduced in the context of specific models. Thediscussion is aimed at providing motivation for the theoretical developments in the book,rather than practical recommendationsChapters 2 and 3 present detailed development of the theory of two-stage and multistage stochastic programming problems. We analyze properties of the models and developoptimality conditions and duality theory in a rather general setting. Our analysis coversgeneral distributions of uncertain parameters and provides special results for discrete distributions, which are relevant for numerical methods. Due to specific properties of two- andmultistage stochastic programming problems, we were able to derive many of these resultswithout resorting to methods of functional analvsisThe basic assumption in the modeling and technical developments is that the proba-bility distribution of the random data is not influenced by our actions(decisions). In someapplications, this assumption could be unjustified. However, dependence of probability dis-tribution on decisions typically destroys the convex structure of the optimization problemsconsidered, and our analysis exploits convexity in a significant way
- 2020-12-09下载
- 积分:1
Building Trading Bots Using Java [2016]
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
- 2020-12-07下载
- 积分:1