Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Hands-On Financial Trading with Python

You're reading from  Hands-On Financial Trading with Python

Product type Book
Published in Apr 2021
Publisher Packt
ISBN-13 9781838982881
Pages 360 pages
Edition 1st Edition
Languages
Authors (2):
Jiri Pik Jiri Pik
Profile icon Jiri Pik
Sourav Ghosh Sourav Ghosh
Profile icon Sourav Ghosh
View More author details
Toc

Table of Contents (15) Chapters close

Preface 1. Section 1: Introduction to Algorithmic Trading
2. Chapter 1: Introduction to Algorithmic Trading 3. Section 2: In-Depth Look at Python Libraries for the Analysis of Financial Datasets
4. Chapter 2: Exploratory Data Analysis in Python 5. Chapter 3: High-Speed Scientific Computing Using NumPy 6. Chapter 4: Data Manipulation and Analysis with pandas 7. Chapter 5: Data Visualization Using Matplotlib 8. Chapter 6: Statistical Estimation, Inference, and Prediction 9. Section 3: Algorithmic Trading in Python
10. Chapter 7: Financial Market Data Access in Python 11. Chapter 8: Introduction to Zipline and PyFolio 12. Chapter 9: Fundamental Algorithmic Trading Strategies 13. Other Books You May Enjoy Appendix A: How to Setup a Python Environment

Exploring the yahoofinancials Python library

The yahoofinancials Python library provides free access to the market data available from Yahoo Finance, whose provider is ICE Data Services. The library repository is available at https://github.com/JECSand/yahoofinancials.

It provides access to historical and, for most assets, also real-time pricing data for the following:

  • Currencies
  • Indexes
  • Stocks
  • Commodities
  • ETFs
  • Mutual funds
  • US Treasuries
  • Cryptocurrencies

To find the right ticker, use the lookup at https://finance.yahoo.com/.

There is a very strict limit on the number of calls per hour per IP address (about 1,000-2,000 requests per hour per IP address) and once you reach it, your IP address gets blocked for an extensive period of time. In addition, the functionality provided constantly changes.

Installation of the library is standard:

pip install yahoofinancials

Access to the data is very straightforward, as follows:

from...
lock icon The rest of the chapter is locked
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 ₹800/month. Cancel anytime