Fundamentals 3 min read

Exploring Python Stock Data Retrieval: pandas_datareader, yfinance, tushare, and JoinQuant Experiments

This article shares practical experiments using Python libraries such as pandas_datareader, yfinance, tushare, and the JoinQuant platform to fetch historical stock data, highlighting connection requirements, limitations, and the ease of obtaining data without additional installations.

Python Programming Learning Circle
Python Programming Learning Circle
Python Programming Learning Circle
Exploring Python Stock Data Retrieval: pandas_datareader, yfinance, tushare, and JoinQuant Experiments

After seeing a classmate's notes on the book "Deep Dive into Python Quantitative Trading Practice," the author shares their own experiments with the book's examples, inviting discussion and collective learning.

Pandas_datareader : The book starts with fetching stock data using pandas_datareader from Yahoo Finance. The author notes that a successful connection required using the school's VPN (referred to as V*N).

yfinance : Seeking an alternative that might work without a VPN, the author tried the yfinance library. The experiment showed that yfinance faces the same VPN requirement as pandas_datareader, which is manageable for students with campus network access.

tushare : The author discovered the Chinese‑developed tushare library, which can retrieve historical stock data without a VPN. However, the library warns that the current API will be discontinued and recommends the Pro version, which requires points for access.

JoinQuant : Exploring a ready‑made quant platform, the author used JoinQuant's get_price function to obtain market data. This method is straightforward, requiring no additional library installations.

In conclusion, the author has only read the initial chapters of the book but finds the hands‑on experiments valuable, noting that the material suits their interests while demanding practical problem‑solving skills.

pandas_datareaderyfinanceJoinQuanttusharestock data
Python Programming Learning Circle
Written by

Python Programming Learning Circle

A global community of Chinese Python developers offering technical articles, columns, original video tutorials, and problem sets. Topics include web full‑stack development, web scraping, data analysis, natural language processing, image processing, machine learning, automated testing, DevOps automation, and big data.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.