Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Python Algorithmic Trading Cookbook

You're reading from  Python Algorithmic Trading Cookbook

Product type Book
Published in Aug 2020
Publisher Packt
ISBN-13 9781838989354
Pages 542 pages
Edition 1st Edition
Languages
Author (1):
Pushpak Dagade Pushpak Dagade
Profile icon Pushpak Dagade

Table of Contents (16) Chapters

Preface 1. Handling and Manipulating Date, Time, and Time Series Data 2. Stock Markets - Primer on Trading 3. Fetching Financial Data 4. Computing Candlesticks and Historical Data 5. Computing and Plotting Technical Indicators 6. Placing Regular Orders on the Exchange 7. Placing Bracket and Cover Orders on the Exchange 8. Algorithmic Trading Strategies - Coding Step by Step 9. Algorithmic Trading - Backtesting 10. Algorithmic Trading - Paper Trading 11. Algorithmic Trading - Real Trading 12. Other Books You May Enjoy Appendix I
1. Appendix II
2. Appendix III

To get the most out of this book

This book is for anyone who is interested in the field of algorithmic trading. You are not expected to have any background in finance or algorithmic trading. You are expected to have a basic knowledge of the Python programming language. Each chapter introduces a new concept in algorithmic trading and takes you step by step, from zero to hero. This book can help you build a rock-solid foundation in algorithmic trading using Python.

You need to have the latest version of Python 3 installed on your computer. The recipes in this book were tested on Python 3.8.2 and they should work on any future release of Python as well.

You also need a broking account with Zerodha, a modern broker, to try out the recipes covered in most of the chapters. Appendix I provides detailed, step-by-step information on how to set up your Zerodha account in case you do not have one.

To execute trading strategies, you also need an account with AlgoBulls. Appendix II provides detailed, step-by-step information on how to set up your AlgoBulls account in case you do not have one.

Also, almost every chapter expects you to have additional Python packages installed, such as pyalgotrading. You can install these using pip. This is explained in the technical requirements section of every chapter.

All the recipes in this chapter are provided as Jupyter notebooks on our GitHub repository: https://github.com/PacktPublishing/Python-Algorithmic-Trading-Cookbook. You can install Jupyter Notebook as well if you would like to try out the recipes directly without typing any code. You can install this using pip: pip install notebook.

Software/hardware covered in the book

OS requirements

Python 3.7+ (https://www.python.org/downloads/)

Any OS that supports Python 3.7+; Linux, Windows, macOS X, and so on.

The requirements for each chapter are summarized in the following table:

Chapter number

Zerodha account

AlgoBulls account

1

No No

2

Yes No

3

Yes No

4

Yes No

5

Yes No

6

Yes No

7

Yes No

8

No Yes

9

No Yes

10

No Yes

11

No Yes

If you are using the digital version of this book, we advise you to type the code yourself or access the code via the GitHub repository (link available in the next section). Doing so will help you avoid any potential errors related to the copying and pasting of code.

Download the example code files

You can download the example code files for this book from your account at www.packt.com. If you purchased this book elsewhere, you can visit www.packtpub.com/support and register to have the files emailed directly to you.

You can download the code files by following these steps:

  1. Log in or register at www.packt.com.
  2. Select the Support tab.
  3. Click on Code Downloads.
  4. Enter the name of the book in the Search box and follow the onscreen instructions.

Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:

  • WinRAR/7-Zip for Windows
  • Zipeg/iZip/UnRarX for Mac
  • 7-Zip/PeaZip for Linux

The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/Python-Algorithmic-Trading-Cookbook. In case there's an update to the code, it will be updated on the existing GitHub repository.

We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

Download the color images

We also provide a PDF file that has color images of the screenshots/diagrams used in this book. You can download it here: https://static.packt-cdn.com/downloads/9781838989354_ColorImages.pdf.

Conventions used

There are a number of text conventions used throughout this book.

CodeInText: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "The broker provides unique keys to each customer, typically as api-key and api-secret key pairs."

A block of code is set as follows:

>>> plot_candlestick_chart(historical_data, 
PlotType.OHLC,
'Historical Data | '
'Japanese Candlesticks Pattern | '
'NSE:TATASTEEL | 1st Jan, 2020 | '
'Candle Interval: 1 Minute')

Any command-line input or output is written as follows:

$ pip install pyalgotrading

Bold: Indicates a new term, an important word, or words that you see on screen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: "A Japanese candle is green in color if its close price is above its open price."

Warnings or important notes appear like this.
Tips and tricks appear like this.
lock icon The rest of the chapter is locked
Next Chapter arrow right
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}