Buy Hands-On AI Trading with Python, QuantConnect, and AWS
Book 1
Book 2
Book 3
Book 1
Book 2
Book 3
Book 1
Book 2
Book 3
Book 1
Book 2
Book 3
Home > Business and Economics > Finance and accounting > Finance and the finance industry > Investment and securities > Hands-On AI Trading with Python, QuantConnect, and AWS
Hands-On AI Trading with Python, QuantConnect, and AWS

Hands-On AI Trading with Python, QuantConnect, and AWS


     0     
5
4
3
2
1



Available


X
About the Book

Master the art of AI-driven algorithmic trading strategies through hands-on examples, in-depth insights, and step-by-step guidance

Hands-On AI Trading with Python, QuantConnect, and AWS explores real-world applications of AI technologies in algorithmic trading. It provides practical examples with complete code, allowing readers to understand and expand their AI toolbelt.

Unlike other books, this one focuses on designing actual trading strategies rather than setting up backtesting infrastructure. It utilizes QuantConnect, providing access to key market data from Algoseek and others. Examples are available on the book's GitHub repository, written in Python, and include performance tearsheets or research Jupyter notebooks.

The book starts with an overview of financial trading and QuantConnect's platform, organized by AI technology used:

  • Examples include constructing portfolios with regression models, predicting dividend yields, and safeguarding against market volatility using machine learning packages like SKLearn and MLFinLab.
  • Use principal component analysis to reduce model features, identify pairs for trading, and run statistical arbitrage with packages like LightGBM.
  • Predict market volatility regimes and allocate funds accordingly.
  • Predict daily returns of tech stocks using classifiers.
  • Forecast Forex pairs' future prices using Support Vector Machines and wavelets.
  • Predict trading day momentum or reversion risk using TensorFlow and temporal CNNs.
  • Apply large language models (LLMs) for stock research analysis, including prompt engineering and building RAG applications.
  • Perform sentiment analysis on real-time news feeds and train time-series forecasting models for portfolio optimization.
  • Better Hedging by Reinforcement Learning and AI: Implement reinforcement learning models for hedging options and derivatives with PyTorch.
  • AI for Risk Management and Optimization: Use corrective AI and conditional portfolio optimization techniques for risk management and capital allocation.

Written by domain experts, including Jiri Pik, Ernest Chan, Philip Sun, Vivek Singh, and Jared Broad, this book is essential for hedge fund professionals, traders, asset managers, and finance students. Integrate AI into your next algorithmic trading strategy with Hands-On AI Trading with Python, QuantConnect, and AWS.



Table of Contents:

Biographies xiii

Preface: QuantConnect xv

Introduction xxiii

Part I Foundations of Capital Markets and Quantitative Trading 1

Chapter 1 Foundations of Capital Markets 3

Market Mechanics 3

Market Participants 4

Trading Is the “Play” 4

The Stage and Basic Rules of Trading—The Limit Order Book 4

Actors—Liquidity Trader, Market Maker, and

Informed Trader 5

Liquidity Trader 5

Market Maker 5

Informed Trader 6

AI Actors Wanted! 7

Data and Data Feeds 7

Custom and Alternative Data 9

Brokerages and Transaction Costs 10

Transaction Costs 11

Security Identifiers 13

Assets and Derivatives 15

US Equities 15

US Equity Options 19

Index Options 21

US Futures 21

Cryptocurrency 23

Chapter 2 Foundations of Quantitative Trading 25

Research Process 25

Research 25

Backtesting 26

Parameter Optimization 26

Paper and Live Trading 26

Testing and Debugging Tools 26

Debuggers 27

Logging 27

Charting 27

Object Store 28

Coding Process 28

Time and Look-ahead Bias 29

Look-ahead Bias 29

Market Hours and Scheduling 30

Strategy Styles 30

Trading Signals 31

Allocating Capital 31

Regimes and Portfolios of Strategies 32

Parameter Sensitivity Testing and Optimization 33

1. Remove 33

2. Replace 34

3. Reduce 34

Parameter Sensitivity Testing 34

Margin Modeling 35

Equities 35

Equity Options 36

Futures 37

Diversification and Asset Selection 37

Fundamental Asset Selection 38

ETF Constituents Asset Selection 39

Dollar-Volume Asset Selection 40

Universe Settings 40

Indicators and Other Data Transformations 41

Automatic Indicators 41

Manual Indicators 41

Indicator Warm Up 42

Storing Objects 42

Indicator Events 42

Sourcing Ideas 42

Hypothesis-driven Testing 43

Data Driven Investing 44

Quantpedia 44

QuantConnect Research and Strategy Explorer 45

Part II Foundations of AI and ML in Algorithmic Trading 47

Step-by-step Guide for AI-based Algorithmic Trading 48

Chapter 3 Step 1: Problem Definition 49

Chapter 4 Step 2: Dataset Preparation 53

Data Collection 53

Exploratory Data Analysis 53

Data Preprocessing 54

Handling Missing Data 55

Handling Outliers 58

Feature Engineering 61

Normalization and Standardization of Features 62

Transforming Time Series Features to Stationary 64

Identification of Cointegrated Time Series with Engle-Granger Test 70

Feature Selection 76

Correlation Analysis 76

Feature Importance Analysis 77

Auto-identification of Features 78

Dimensionality Reduction/Principal Component Analysis 80

Splitting of Dataset into Training, Testing, and Possibly Validation Sets 83

How to Split Your Data 83

Chapter 5 Step 3: Model Choice, Training, and Application 87

Regression 88

Linear Regression 89

Polynomial Regression 91

LASSO Regression 93

Ridge Regression 96

Markov Switching Dynamic Regression 99

Decision Tree Regression 103

Support Vector Machines Regression with

Wavelet Forecasting 105

Classification 110

Multiclass Random Forest Model 110

Logistic Regression 114

Hidden Markov Models 117

Gaussian Naive Bayes 119

Convolutional Neural Networks 122

Ranking 127

LGBRanker Ranking 127

Clustering 130

OPTICS Clustering 130

Language Models 132

OpenAI Language Model 132

Amazon Chronos Model 135

FinBERT Model 137

Part III Advanced Applications of AI in Trading and Risk Management 141

Getting Started with Source Code 141

Chapter 6 Applied Machine Learning 143

Example 1—ML Trend Scanning with MLFinlab 143

Example 2—Factor Preprocessing Techniques for Regime Detection 148

Example 3—Reversion vs. Trending: Strategy Selection by Classification 154

Example 4—Alpha by Hidden Markov Models 158

Example 5—FX SVM Wavelet Forecasting 170

Example 6—Dividend Harvesting Selection of

High-Yield Assets 176

Example 7—Effect of Positive-Negative Splits 181

Example 8—Stop Loss Based on Historical Volatility and Drawdown Recovery 185

Example 9—ML Trading Pairs Selection 197

Example 10—Stock Selection through Clustering

Fundamental Data 207

Example 11—Inverse Volatility Rank and Allocate to Future Contracts 214

Example 12—Trading Costs Optimization 221

Example 13—PCA Statistical Arbitrage Mean Reversion 228

Example 14—Temporal CNN Prediction 233

Example 15—Gaussian Classifier for Direction Prediction 242

Example 16—LLM Summarization of Tiingo News Articles 250

Example 17—Head Shoulders Pattern Matching with CNN 256

Example 18—Amazon Chronos Model 265

Example 19—FinBERT Model 272

Chapter 7 Better Hedging with Reinforcement Learning 281

Introduction 281

A New AI Trading Assistant 281

Continuous Hedging Is Not Required 282

Machine Learning Comes to the Rescue 283

A Simplified but Effective Reinforcement

Learning Approach 284

Overview of the Reinforcement Learning 285

Identification 285

Simulation 286

Ref inement Training on Actual Market Data 287

Testing and Implementation 287

Implementation on QuantConnect 288

Primary Research Notebook 289

The Policy Network 290

Model Functions 292

Fine-tuning with Market Data 296

Results 300

Conclusion 303

Chapter 8 AI for Risk Management and Optimization 305

What Is Corrective AI and Conditional

Parameter Optimization? 305

Feature Engineering 308

Applying Corrective AI to Daily Seasonal Forex Trading 312

What Is Conditional Parameter Optimization? 318

Applying Conditional Parameter Optimization to an ETF Strategy 319

Unconditional vs. Conditional Parameter Optimizations 320

Performance Comparisons 322

Conditional Portfolio Optimization 322

Regime Changes Obliterate Traditional Portfolio Optimization Methods 322

Learning to Optimize 324

Ranking Is Easier Than Predicting 325

The Fama-French Lineage 327

Comparison with Conventional Optimization Methods 327

Model Tactical Asset Allocation Portfolio 331

CPO Software-as-a-Service 333

Conclusion 340

Definitions of Spread_EMA & Spread_VAR 340

Chapter 9 Application of Large Language Models and Generative AI in Trading 341

Role of Generative AI in Creating Alpha 341

Selecting an LLM for Building a Generative AI Application 342

Prompt Engineering 344

Prompt Engineering in Practice 345

Addressing Model “Hallucination” 346

Question Answering Using a Retrieval Augmented Application in SageMaker Canvas 347

RAG Application Costs and Optimization Techniques 350

Testing Our Infrastructure 351

Summarization 356

Useful AI Platforms and Services 359

ChatGPT 359

Gemini 359

Bedrock 359

SageMaker 359

Q Business 360

References 361

Subject Index 363

Code Index 379



About the Author :

JIRI PIK: Founder and CEO of RocketEdge.com. A software architect and cloud computing expert, Jiri Pik specializes in designing high-performance trading systems. He has decades of experience in financial technologies and has worked with some of the world’s leading financial institutions, including Goldman Sachs and JPMorgan Chase.

ERNEST P. CHAN: A pioneer in applying machine learning to quantitative trading, Ernest P. Chan founded Predictnow.ai and QTS Capital Management. He is author of books such as Quantitative Trading and Machine Trading.

JARED BROAD: Founder and CEO of QuantConnect, Jared Broad has empowered over 300,000 algorithmic traders worldwide with a platform that simplifies strategy design, backtesting, and live deployment.

PHILIP SUN: CEO and Co-founder of Adaptive Investment Solutions, LLC, and a seasoned quantitative fund manager, Philip Sun and his team focus on building state-of-the-art AI-driven risk management platform for wealth advisors and institutional investors.

VIVEK SINGH: A product leader at Amazon Web Services (AWS), Vivek Singh spearheads the development of large language models (LLMs) and Generative AI applications, bringing cutting-edge AI technologies to the trading domain.


Best Sellers


Product Details
  • ISBN-13: 9781394268436
  • Publisher: John Wiley & Sons Inc
  • Publisher Imprint: John Wiley & Sons Inc
  • Height: 254 mm
  • No of Pages: 416
  • Returnable: Y
  • Spine Width: 23 mm
  • Width: 180 mm
  • ISBN-10: 1394268432
  • Publisher Date: 18 Feb 2025
  • Binding: Hardback
  • Language: English
  • Returnable: Y
  • Returnable: Y
  • Weight: 1094 gr


Similar Products

Add Photo
Add Photo

Customer Reviews

REVIEWS      0     
Click Here To Be The First to Review this Product
Hands-On AI Trading with Python, QuantConnect, and AWS
John Wiley & Sons Inc -
Hands-On AI Trading with Python, QuantConnect, and AWS
Writing guidlines
We want to publish your review, so please:
  • keep your review on the product. Review's that defame author's character will be rejected.
  • Keep your review focused on the product.
  • Avoid writing about customer service. contact us instead if you have issue requiring immediate attention.
  • Refrain from mentioning competitors or the specific price you paid for the product.
  • Do not include any personally identifiable information, such as full names.

Hands-On AI Trading with Python, QuantConnect, and AWS

Required fields are marked with *

Review Title*
Review
    Add Photo Add up to 6 photos
    Would you recommend this product to a friend?
    Tag this Book Read more
    Does your review contain spoilers?
    What type of reader best describes you?
    I agree to the terms & conditions
    You may receive emails regarding this submission. Any emails will include the ability to opt-out of future communications.

    CUSTOMER RATINGS AND REVIEWS AND QUESTIONS AND ANSWERS TERMS OF USE

    These Terms of Use govern your conduct associated with the Customer Ratings and Reviews and/or Questions and Answers service offered by Bookswagon (the "CRR Service").


    By submitting any content to Bookswagon, you guarantee that:
    • You are the sole author and owner of the intellectual property rights in the content;
    • All "moral rights" that you may have in such content have been voluntarily waived by you;
    • All content that you post is accurate;
    • You are at least 13 years old;
    • Use of the content you supply does not violate these Terms of Use and will not cause injury to any person or entity.
    You further agree that you may not submit any content:
    • That is known by you to be false, inaccurate or misleading;
    • That infringes any third party's copyright, patent, trademark, trade secret or other proprietary rights or rights of publicity or privacy;
    • That violates any law, statute, ordinance or regulation (including, but not limited to, those governing, consumer protection, unfair competition, anti-discrimination or false advertising);
    • That is, or may reasonably be considered to be, defamatory, libelous, hateful, racially or religiously biased or offensive, unlawfully threatening or unlawfully harassing to any individual, partnership or corporation;
    • For which you were compensated or granted any consideration by any unapproved third party;
    • That includes any information that references other websites, addresses, email addresses, contact information or phone numbers;
    • That contains any computer viruses, worms or other potentially damaging computer programs or files.
    You agree to indemnify and hold Bookswagon (and its officers, directors, agents, subsidiaries, joint ventures, employees and third-party service providers, including but not limited to Bazaarvoice, Inc.), harmless from all claims, demands, and damages (actual and consequential) of every kind and nature, known and unknown including reasonable attorneys' fees, arising out of a breach of your representations and warranties set forth above, or your violation of any law or the rights of a third party.


    For any content that you submit, you grant Bookswagon a perpetual, irrevocable, royalty-free, transferable right and license to use, copy, modify, delete in its entirety, adapt, publish, translate, create derivative works from and/or sell, transfer, and/or distribute such content and/or incorporate such content into any form, medium or technology throughout the world without compensation to you. Additionally,  Bookswagon may transfer or share any personal information that you submit with its third-party service providers, including but not limited to Bazaarvoice, Inc. in accordance with  Privacy Policy


    All content that you submit may be used at Bookswagon's sole discretion. Bookswagon reserves the right to change, condense, withhold publication, remove or delete any content on Bookswagon's website that Bookswagon deems, in its sole discretion, to violate the content guidelines or any other provision of these Terms of Use.  Bookswagon does not guarantee that you will have any recourse through Bookswagon to edit or delete any content you have submitted. Ratings and written comments are generally posted within two to four business days. However, Bookswagon reserves the right to remove or to refuse to post any submission to the extent authorized by law. You acknowledge that you, not Bookswagon, are responsible for the contents of your submission. None of the content that you submit shall be subject to any obligation of confidence on the part of Bookswagon, its agents, subsidiaries, affiliates, partners or third party service providers (including but not limited to Bazaarvoice, Inc.)and their respective directors, officers and employees.

    Accept


    Inspired by your browsing history


    Your review has been submitted!

    You've already reviewed this product!