在好例子网,分享、交流、成长!
您当前所在位置:首页Others 开发实例一般编程问题 → Advanced Algorithmic Trading

Advanced Algorithmic Trading

一般编程问题

下载此实例
  • 开发语言:Others
  • 实例大小:13.83M
  • 下载次数:12
  • 浏览次数:183
  • 发布时间:2021-03-04
  • 实例类别:一般编程问题
  • 发 布 人:好学IT男
  • 文件格式:.pdf
  • 所需积分:2
 

实例介绍

【实例简介】
这是一本算法交易的书,sklearn的机器学习算法交易。 Finally...implement advanced trading strategies using time series analysis, machine learning and Bayesian statistics with the open source R and Python programming languages, for direct, actionable results on your strategy profitability.
3.5.1 Beta Distribution 5. 2 Why Is A Beta Prior Conjugate to the Bernoulli Likelihood? 3.5.3 Multiple ways to specify a beta p 3.6 USing Bayes Rule Lo Calculate a Posterior Markov Chain Monte Carlo 5 4.1 Bavesian Inference Goal 35 4.2 Why Markov Chain Monte Carlo' hms 4. 2. 1 Markov Chain Montc Carlo Algorith 37 4.3 The Metropolis Algorit. h 37 4.4 Introducing PvMC3 4.5 Inferring a Binomial Proportion with Markov Chain Monte Carlo Inferring a Binonial Proportion with Conjugate Priors Recap 4 Inferring a Binomial Proportion with PyMC3 4. 6 Bibliographic Note Bayesian Linear Regression ,47 5.1 Frequentist Linear regression 47 5. 2 Bayesian Linear regression 5.3 Bayesian Linear Regression will PyMC 5.3.1 What are Generalised Linear Models? 5.3.2 Simulating Data and Fitting thc Modcl with PyMC3 ⑤.4 Bibliographic Note 5.5 Full Code 56 6 Bayesian Stochastic volatility model 59 6.1 Stochastic Volatility 6.2 Bavesian Stochastic Volatility 6.3 PyMC3 Implementation 63 6.3.1 Obtaining thc Price History model specification in Py Mo 65 6.3.3 Fitting the Model with NUTS 6.4 full code 67 III Time Series Analysis 71 Introduction to Time Series Analysis 73 7.1 What is Time Series Analysis? 73 How Can We Apply Time Series Analysis in Quantitative Finance? 74 7.3 Time Series Analysis Software 翻4 74 4 Time Series Analysis Roadmap 7.5 How Does This Relate to Other Statistical Tools? 76 8 Serial Correlation. 77 8.1 Expectation, Variance and Covariance 8.1.1 Example: Sample Covariance in R 78 区,2 Correlation 8. 2. Example: Sample Correlation in R 8.3 Stationarity in ' Time Series 8.4 Serial correlation 8.5 Thc Correlogram S.5.I Example I- Fixed Linear Trend 84 8.5.2 Example 2-Repeated Sequence 8.6 Next Steps 9 Random Walks and White Noisc Models.................87 9.1 Time Series Modelling process 9.2 Backward Shift and Difference Operators 9.3 White noise 9.3.1 Sccond-Ordcr Propcrtics 2 Correlogram 9. 4 Random walk 9.4.1 Second-Order Properties 9.4.2 Correlogram 9.4.3 Fitting Random Walk Models to Financial Data. 93 10 Autoregressive Moving Average Models 9 10.1 How Wil we Proceed? 10.2 Strictly Stationary.... 98 10.3 Akaike information Criterion 99 0. 4 Autoregressive(AR) Models of order pl 10.4.1 Rationale 10.4.2 Stationarity for Autoregressive Processes........... 10.4.3 Second Order Properties 10.4.4 Simulations and Correlograms 102 10.4.5 Financial Data 10.5 Moving Avcragc(MA) Models of ordor q 110.5. 1 Rationale 112 10.5.2 Definition 10.5.3 Second Order Properties 112 10.5.4 Simulations and Correlograms 113 10.5.5 financial Datal 10.5.6 Next Steps 123 10.6 Autogressive Moving Average (ARMA) Models of order p, q 124 10.6.1 Bayesian Information Criterion 10.6.2 Ljung-Box Test 125 10.6. 3 Rationale 126 10.6.4 Definition 126 10.6.5 Simulations and Correlograms 126 10.6.6 Choosing the Best ARMA(p, q) Model 10.6.7 Financial Datal 4 10. 7 Next Steps 134 11 Autoregressive Integrated Moving Average and Conditional Heteroskedastic Models,.,,,.,,,,.,, 135 11.1 Quick recap 135 11.2 Autoregressive Integrated Moving Average(ARIMA) Models of order p, d, q 皿2. 1 Rationale 136 111. 2.2 Definitions 13 11.2.3 Simulation Correlogram and Model Fitting 137 11.2.1 Financial Data and Prediction [ 11.2.5 Next Steps 144 11.3 volatility 11. 4 CoudiLiOmal Heteros kedasLicily 144 11.5 Autoregressive Conditional Heteroskedastic Models 145 11.5.1 ARCH Dcfinition 145 11.5.2 Why Does This Model Volatility? 146 11.5.3 When Is It Appropriate To Apply ARCI()? 146 1154 ARCH(p) Model图 .146 [11.6 Generalised Autoregressive Conditional Heteroskedastic Models 11.6.2 Simulations, Correlograms and Model Fitting 147 11.6. 1 GARCH Dcfinition 147 147 IT.6. 3 Financial Data 11.7 Next Steps 153 12 Cointegrated Time Series 155 12. 1 Mean Reversion Trading Strategies 155 12.2 Cointegration 156 12.3 Unit Root Tests 156 12.3.1 Augmcntcd Dickcy-Fullcr Icst .157 12.3.2 Phillips-Perron 2.3.3 Phillips-Quliaris lest 157 12.3. 4 Dillicullies with Unit Root Tests 157 2. 4 Simulated Cointegrated Time Series with R 157 12.5 Cointegrated Augmcnted Dickcy Fullcr Test 162 12.6 CADF on Simulated Data 112.7 CADF on Financial Dat 12.7.1 EWA and Ewc 12.7.2 RDS-A and RDS-Bl 168 12. 8 Full codc 171 2jOhansen Test 74 12.9.1 Johansen Test on Simulated Data 175 12.9.2 Johansen Test on Financial Data 178 12.9.3 Full Codel 181 3 State Space Models and the Kalman Filter 18 13. 1 Linear State-Space Modell 186 13.2 The Kalman Filter 187 yesan Approa 13.2.2 prediction 13.3 Dymanic Hedge Ratio Between ETF Pairs Csing Che Kalman Filter 13.3.1 Linear Regression via the Kalman Filter 13. 3. 2 Applying thc Kalman Filter to a Pair of ETFS 192 18.3.3 TIT and ETF 192 13.3.4 Scatterplot of etf prices 192 13.3.5 Time-Varying Slope and intercept 13.4 Next Steps .196 13.5 Bibliographic Notc 196 13. 6 Full Codel 196 14 Hidden Markov Models 春·垂《·看 201 14.1 Markov Models 202 14.1.1 Markov Model Mathematical specification 203 14.2 Hidden Markov Models 204 14.2.1 Hidden Markov Model Mathematical Specification 14.2.2 Filtering of Hidden Markov Models 205 4.3 Regime Detection with Ilidden Markov Models 206 14.3.1 Market Regimes 207 14.3.2 Simulated Datal 207 14.3.3 Financial Data 210 14.4 xt ster 2l3 14.5 Bibliographic Note 213 正6 Full Code 213 IV Statistical Machine Learning 217 15 Introduction to Machine Learning 219 15. 1 What is Machine Learning? 219 15.2 Machinc Learning domains 220 15.2.1 Supervised learning 220 15.2.2 Unsupervised Learning 220 15.2. 3 Reiltorceenl Learning 220 15.3 Machine Learning Techniques 220 15.3.1 Lincar Regrcssion 15.3.2 Linear Classification 15.3.3 Tree-Based Methods 221 15.3.4 Support Vector machines 221 115.3. 5 Artificial Neural Networks and Deep Learning 221 15.3.6 Bayesian Networks 221 15.3.7 Clusterin 22 153.8Dn 15.4 Machine Learning Applications 22 15.4.1 Forecasting and Prediction 15.4.2 Natural Language Processing 222 15.4.3 Factor Models D.4.4 llage Classilicalio 15.4.5 Model accuracy 223 15. 1.6 Parametric and Non-Parametric Models 223 15.4.7 Statistical Framework for Machine Learning Domains 16 Supervised Learning 225 16.1 Mathematical Framework 225 6.2 Classification 226 166.3 Regression 226 16.3.1 Fiancial Example 227 16. 1 Training 227 17 Linear Regression 229 17. 1 Linear Regression 229 17.2 Probabilistic Interpretation 230 17.2.1 Basis Function Expansion 232 17.3 Maximum Likelihood Estimation 233 17.3.1 Likelihood and Negalive Log likelhood 233 17.3.2 Ordinary Least Squares 234 17.41 Simulated Data Example with Scikit-Learnl 235 117.5 Full Code 238 17.6 Bibliographic Notel 241 18 Trcc-Bascd Mcthods 243 8. Decision Trees -Mathematical Overview 243 18. 2 Decision Trees for Regression 244 18.2.1 Creating a Regression Tree and Making Predictions 18.2.2 Pruning The Tree 246 18.3 Dccision Trees for Classification 247 18.3.1 Classification Error Rate/Hit Rate 247 18.3.2 Gini Index 247 18. 3.3 Cross-Eutropy deviance 247 18.4 Advantages and Disadvantages of Decision Tre es 18.4.1 Advantages 248 18. 4.2 Disadvantages 248 18.5 Ensemble Methods 248 18.5.1 The Bootstrap 248 18.5.2 Bootstrap Aggregation 249 1 18.5. 3 Random Forests 250 18.5. 4 Boosting 250 18.5.5 Pyt hon Scikit-Learn Implementation 25l 8.6 Bibliographic Not 18.7 Full Code 19 Support Vector Machines 。,,,,,,,,,261 19. 1 Motivation for Support Vector Machines 261 19.2 Advantages and Disadvantages of SVms 262 19.2.1 AdvanTages 262 19. 2.2 Disadvantages 26 19.3 Lincar Scparating Hypcrplancs 263 1 9. 4 Classification 119.5 Deriving the Clas SHiner 26 19.6 Constructing the Maximal Margin Classifier 267 19.7 Support Vector Classificrs .,268 19.8 Support Vector Machines 271 19.8.1 Biblographic Notes 27 20 Model selection and Cross-Validation 275 20Bias-Ⅴ ariance Trade-O田 275 1 Machine Learning models 275 20.1.2 Model Selection 276 20.1.3 The Bias-Variance Tradeoff 278 20. 2 Cross-Validation 281 20.2.1 Overview ol Cross-Validalionl 20.2.2 Forecasting Example 20.2.3 Validation Sct Approach 283 20.2.4 k-Fold Cross validation 284 20.2.5 Python Implementation 285 20.2.6 k-Fold Cross Validation 289 20.2.7 Full Python Code 292 21 Unsupervised Learning 301 21.1 High Dimcnsional Data .302 21.2 Mathematical Overview of Unsupervised Learning 302 21.3 Unsupervised Learning algorithms 303 1.3.1 Dimensionality Reduction .,303 1.3.2 Clusterin 303 21.4 Bibliographic Note 304 22 Clustering Methods 305 22.1 K-Means Clustering 305 22.1.I The algorithm 306 22.1. 2 Issues 307 22. 1.3 Simulated Datal 308 22.1.4 OHIC Clustering Bibliographic notel 18 22.3 Full Codel 318 23 Natural Language Processing 325 23. 1 Overview 325 23.2 Supervised document Classification 326 23. 3 Preparing a Dataset for Classification 少,4 Vectorisation 23.5 Term-Frequency lnverse Document-Frequency 23.6 Training the Support Vector Machine .340 23.7 Performance Metrics 342 23. 8 Full Codc 344 v Quantitative Trading Techniques 349 24 Introduction to QSTraderl ,。,,351 24.1 Motivation for QSTraderl 351 24.2 Design Consideratio 24.3 nstallation 54 25 Introductory Portfolio Strategies 355 25.1 Motivation .355 25.2 The Trading Strategies 25.3 Data 356 25.4 Python QSTrader Iiplelllentaliou 357 25.4.1 MonthlyLiquidateReDalanceStralegy .358 25. 4.2 LiquidateRebalance Position Sizer 359 25. 4.3 Backtest Interface .5 Strategy Results 36l 25.5.1 Transaction Costs 25.5.2 US Equities Bonds 60/40 EtF Portfol 361 25. 5.3" Weight ETF Portfolio 362 25.5. 4 Equal Weight etf Portfolio 364 25.6 Full Code 365 26 ARIMA-GARCH Trading Strategy on Stock Market Indexes Using R 369 26. 1 Strategy Overview 369 26.2 Strategy Implementation 370 26.3 Strategy result 373 26. 4 Full Code 27 Cointegration-Based Pairs Trading using QSTrader 381 I The hipot h p nesIs 27.2 Cointegration Tests in R 38 7. 3 The Trading StraLegy 384 27.4 Datal 27.5 Python QSTrader Implementat 27.6 Strategy results 391 27.6.1 Transaction Costs 391 ②762 Tearsheet 392 27.7 Full Code 393 28 Kalman Filter-Based Pairs Trading using QSTrader..............401 The Trading Strategy 28.1.1Data 402 28.2 Python QSTrader Implementation 403 28.3 Strategy Rcsults 410 ②4 Next steps 410 28.5 Full Code 412 29 Supcrviscd Lcarning for Intraday Rcturns Prcdiction using QSTradcr....419 29. Prediction Goals with Machine Learning 419 29.1.1 Class Imbalance 420 29.2 Building a Prediction Model on Historical Data 421 29.3 QSTrader Strategy Object 29.4 QsTrader Backtest Script 429 29.5 Results 432 29.6 Next Steps 29.7 Full Code 435 30 Sentiment Analysis via Sentdex Vendor Sentiment Data with QSTrade 445 30. 1 Sentiment analysis 445 30.1.1 Scntdcx API and Samplc Filc 446 30.2 The Trading Strategy 447 30.3 Dalal 447 30.4 Python Implementation ..,,,449 30.4. 1 Sentiment, handling with estrade 449 30.4. 2 Sentiment Analysis Strategy Code 453 0.5 Strategy Results 456 30.5.1 Transaction Costs ,,,456 30.5. 2 Sentiment on SP500 Tech Stocks .456 30.5.3 Sentiment on S&P500 Energy Stocks 30.5.4 Sentiment on sp500 Defence stocks 458 30.6 Full Codel 460 B1 Market Regime Detection with Hidden Markov Models using QSTrader.465 B1. 1 Regime Detection with Hidden Mar koy Models .,465 31.2 The Trading Strategy 466 31.3 Data 466 31. 4 Python IiuplementaLion 467 B1. 4.1 Returns Calculation with QSTradcr 467 31.4.2 Regime Detection Implementation 468 B1.5 Strategy Results 31.5.1 Transaction Costs 478 B1.5.2 No Regime Detection Filter 478 31.5. 3 HMM Regime Detection Filte 31.6 Full Codel 479 【实例截图】
【核心代码】

标签:

实例下载地址

Advanced Algorithmic Trading

不能下载?内容有错? 点击这里报错 + 投诉 + 提问

好例子网口号:伸出你的我的手 — 分享

网友评论

发表评论

(您的评论需要经过审核才能显示)

查看所有0条评论>>

小贴士

感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。

  • 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
  • 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
  • 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
  • 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。

关于好例子网

本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明

;
报警