Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Python for Algorithmic Trading Cookbook
Python for Algorithmic Trading Cookbook

Python for Algorithmic Trading Cookbook: Recipes for designing, building, and deploying algorithmic trading strategies with Python

Arrow left icon
Profile Icon Jason Strimpel
Arrow right icon
zł39.99 zł193.99
Full star icon Full star icon Full star icon Full star icon Half star icon 4.6 (15 Ratings)
eBook Aug 2024 404 pages 1st Edition
eBook
zł39.99 zł193.99
Paperback
zł241.99
Subscription
Free Trial
Arrow left icon
Profile Icon Jason Strimpel
Arrow right icon
zł39.99 zł193.99
Full star icon Full star icon Full star icon Full star icon Half star icon 4.6 (15 Ratings)
eBook Aug 2024 404 pages 1st Edition
eBook
zł39.99 zł193.99
Paperback
zł241.99
Subscription
Free Trial
eBook
zł39.99 zł193.99
Paperback
zł241.99
Subscription
Free Trial

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Python for Algorithmic Trading Cookbook

Analyze and Transform Financial Market Data with pandas

The pandas library was invented by Wes McKinney while at the investment management firm AQR Capital Management, where he researched macro and credit trading strategies. He built pandas to provide flexible, easy-to-use data structures for data analysis. Since it was open sourced in 2009, pandas has become the standard tool to analyze and transform data using Python.

pandas is well-suited for working with tabular data, like that stored in spreadsheets or databases, and it integrates well with many other data analysis libraries in the Python ecosystem. Its capabilities extend to handling missing data, reshaping datasets, and merging and joining datasets, and it also provides robust tools for loading data from flat files, Excel files, databases, and HDF5 file formats. It’s widely used in academia, finance, and many areas of business due to its rich features and ease of use.

This chapter will begin by covering recipes...

Diving into pandas index types

The Index is an immutable sequence that’s used for indexing and alignment that serves as the label or key for rows in the DataFrame or elements in a series. It allows for fast lookup and relational operations and as of pandas version 2, it can contain values of any type, including integers, strings, and even tuples. Indexes in pandas are immutable, which makes them safe to share across multiple DataFrames or Series. They also have several built-in methods for common operations, such as sorting, grouping, and set operations such as union and intersection. pandas supports multiple indexes, allowing for complex, hierarchical data organization. This feature is particularly useful when dealing with high-dimensional data such as option chains. We’ll see examples of MultiIndexes later in this chapter.

There are seven types of pandas indexes. The differences are dependent on the type of data used to create the index. For example, an Int64Index...

Analyze and Transform Financial Market Data with pandas

The pandas library was invented by Wes McKinney while at the investment management firm AQR Capital Management, where he researched macro and credit trading strategies. He built pandas to provide flexible, easy-to-use data structures for data analysis. Since it was open sourced in 2009, pandas has become the standard tool to analyze and transform data using Python.

pandas is well-suited for working with tabular data, like that stored in spreadsheets or databases, and it integrates well with many other data analysis libraries in the Python ecosystem. Its capabilities extend to handling missing data, reshaping datasets, and merging and joining datasets, and it also provides robust tools for loading data from flat files, Excel files, databases, and HDF5 file formats. It’s widely used in academia, finance, and many areas of business due to its rich features and ease of use.

This chapter will begin by covering recipes...

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Follow practical Python recipes to acquire, visualize, and store market data for market research
  • Design, backtest, and evaluate the performance of trading strategies using professional techniques
  • Deploy trading strategies built in Python to a live trading environment with API connectivity
  • Purchase of the print or Kindle book includes a free PDF eBook

Description

Discover how Python has made algorithmic trading accessible to non-professionals with unparalleled expertise and practical insights from Jason Strimpel, founder of PyQuant News and a seasoned professional with global experience in trading and risk management. This book guides you through from the basics of quantitative finance and data acquisition to advanced stages of backtesting and live trading. Detailed recipes will help you leverage the cutting-edge OpenBB SDK to gather freely available data for stocks, options, and futures, and build your own research environment using lightning-fast storage techniques like SQLite, HDF5, and ArcticDB. This book shows you how to use SciPy and statsmodels to identify alpha factors and hedge risk, and construct momentum and mean-reversion factors. You’ll optimize strategy parameters with walk-forward optimization using VectorBT and construct a production-ready backtest using Zipline Reloaded. Implementing all that you’ve learned, you’ll set up and deploy your algorithmic trading strategies in a live trading environment using the Interactive Brokers API, allowing you to stream tick-level data, submit orders, and retrieve portfolio details. By the end of this algorithmic trading book, you'll not only have grasped the essential concepts but also the practical skills needed to implement and execute sophisticated trading strategies using Python.

Who is this book for?

Python for Algorithmic Trading Cookbook equips traders, investors, and Python developers with code to design, backtest, and deploy algorithmic trading strategies. You should have experience investing in the stock market, knowledge of Python data structures, and a basic understanding of using Python libraries like pandas. This book is also ideal for individuals with Python experience who are already active in the market or are aspiring to be.

What you will learn

  • Acquire and process freely available market data with the OpenBB Platform
  • Build a research environment and populate it with financial market data
  • Use machine learning to identify alpha factors and engineer them into signals
  • Use VectorBT to find strategy parameters using walk-forward optimization
  • Build production-ready backtests with Zipline Reloaded and evaluate factor performance
  • Set up the code framework to connect and send an order to Interactive Brokers

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Aug 16, 2024
Length: 404 pages
Edition : 1st
Language : English
ISBN-13 : 9781835087763
Category :
Languages :
Concepts :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Aug 16, 2024
Length: 404 pages
Edition : 1st
Language : English
ISBN-13 : 9781835087763
Category :
Languages :
Concepts :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just zł20 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just zł20 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 637.97
Modern Time Series Forecasting with Python
zł213.99
Python Feature Engineering Cookbook
zł181.99
Python for Algorithmic Trading Cookbook
zł241.99
Total 637.97 Stars icon
Banner background image

Table of Contents

15 Chapters
Chapter 1: Acquire Free Financial Market Data with Cutting-Edge Python Libraries Chevron down icon Chevron up icon
Chapter 2: Analyze and Transform Financial Market Data with pandas Chevron down icon Chevron up icon
Chapter 3: Visualize Financial Market Data with Matplotlib, Seaborn, and Plotly Dash Chevron down icon Chevron up icon
Chapter 4: Store Financial Market Data on Your Computer Chevron down icon Chevron up icon
Chapter 5: Build Alpha Factors for Stock Portfolios Chevron down icon Chevron up icon
Chapter 6: Vector-Based Backtesting with VectorBT Chevron down icon Chevron up icon
Chapter 7: Event-Based Backtesting Factor Portfolios with Zipline Reloaded Chevron down icon Chevron up icon
Chapter 8: Evaluate Factor Risk and Performance with Alphalens Reloaded Chevron down icon Chevron up icon
Chapter 9: Assess Backtest Risk and Performance Metrics with Pyfolio Chevron down icon Chevron up icon
Chapter 10: Set Up the Interactive Brokers Python API Chevron down icon Chevron up icon
Chapter 11: Manage Orders, Positions, and Portfolios with the IB API Chevron down icon Chevron up icon
Chapter 12: Deploy Strategies to a Live Environment Chevron down icon Chevron up icon
Chapter 13: Advanced Recipes for Market Data and Strategy Management Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.6
(15 Ratings)
5 star 86.7%
4 star 0%
3 star 6.7%
2 star 0%
1 star 6.7%
Filter icon Filter
Top Reviews

Filter reviews by




Lucas Aug 17, 2024
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Subscriber review Packt
kasidit asavakittikawin Sep 09, 2024
Full star icon Full star icon Full star icon Full star icon Full star icon 5
"Python for Algorithmic Trading Cookbook" stands out as a practical and accessible guide for those seeking to enhance their algorithmic trading knowledge. The author's hands-on experience and understanding of the needs of beginners shine through in this well-structured book.Practical Approach: The book is filled with actionable Python recipes for acquiring, visualizing, storing, and analyzing market data. It walks readers through the entire process of designing, backtesting, and deploying trading strategies, making the complex world of algo trading manageable.Updated Data Sources: The book provides free and updated data sources, a valuable resource for those looking to apply the concepts in a real-world setting.
Amazon Verified review Amazon
Didier Lopes Sep 15, 2024
Full star icon Full star icon Full star icon Full star icon Full star icon 5
If you are starting using Python to do algorithmic trading - you should get this book. I recommend the paperback version personally, particularly to have it by your desk in a way that you can access it easily.The book is packed with clear, hands-on examples that make complex topics feel easy - Jason is one of the best people I know at doing this. That's why he has hundreds of thousands of followers and has had over 1000 students attending his cohorts.I also love how practical the book is. All theory has real-world examples that myself, as the reader, can use to better understand the topic at hand.It goes from basic technical analysis to more advanced strategies like machine learning, so there's a lot of room to grow your skills.If you're like me and appreciate learning by doing, this book is perfect. The code examples are super clear, and you can quickly get a strategy up and running or modify it to fit your own ideas.PS: I also particularly love that the book features OpenBB!
Amazon Verified review Amazon
Roger A. Strimpel Aug 29, 2024
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Excellent book!!
Amazon Verified review Amazon
Amazon Customer Aug 24, 2024
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I thought this book was very insightful and excellent source for information. The charts were understandable!
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.