PyQuant News 🐍 Profile picture
Where finance practitioners get started with Python for quant finance, algorithmic trading, and data analysis | Tweets & threads with free Python code & tools.
38 subscribers
Sep 6 11 tweets 4 min read
In the age of AI, Jupyter Notebook is the most powerful tool Python developers have.

But most people don’t know the hidden features.

Need a quick web app?

Or create REST APIs?

Here are the 6 ways to use Jupyter Notebook (you never knew existed): The notebook to rule them all. Jupyter Notebook is a web app for creating and sharing computational documents.

When I say powerful, here's what I mean:

• It supports 40 languages
• Produces rich, interactive output
• Leverages big data tools like Spark

So, what else can we do with Jupyter Notebook?
Aug 31 12 tweets 4 min read
Myth:

You need a computer science degree to get started with Python, NumPy, and pandas.

Reality:

You need these 8 YouTube videos: "Python Pandas" by Corey Schafer

Learn the basics of creating and manipulating data frames, indexing and selecting data, and cleaning and manipulating data in Pandas.

Aug 24 13 tweets 4 min read
Statistical arbitrage is scary sh*t.

That's what I used to think until I spent 25 hours studying pairs trading.

Now I realize it's a great way to get started with algorithmic trading.

Here’s how to build a pairs trading strategy in Python.

Step by step: By replicating this framework, you’ll be able to:

1. Get stock price data
2. Find cointegrated pairs
3. Model the spread
4. Trade the strategy

What is pairs trading anyway?
Aug 20 10 tweets 4 min read
Python is the new Excel.

So don't be the only one stuck with 1,048,576 rows.

6 links to help you quickly get started with Python now: Image The Ultimate Beginner’s Guide to NumPy

What you'll learn: NumPy is the foundation for all data-driven libraries in Python. Understanding the basics will help you learn other libraries like Pandas and get an edge on your peers.

towardsdatascience.com/the-ultimate-b…
Aug 18 8 tweets 2 min read
You can use options to predict stock price moves.

Here’s how: Image Options traders are well-informed. Their expectations of future stock price moves are often priced into options. We can use options prices to extract the options market’s expectations of stock price moves.

If we know where to look…
Aug 12 11 tweets 4 min read
My PhD professors taught me MATLAB during my master's degree.

So I watched 200 YouTube videos to learn Python

96% of them were a complete waste of time.

But these 8 taught me more than all my PhD professors combined: Setting up Interactive Brokers API with Python

This video shows how to use Python with the Interactive Brokers API to automate a first strategy—cutting through its complexity in one clear walkthrough.

Aug 2 13 tweets 2 min read
Every piece of trading advice I could think of after 20+ years trading, 20+ years writing code, and 15+ years as a quant:

1. Bulls make money. Bears make money. Pigs go to slaughter. (Thanks Dad.) 2. Never add to a losing trade.
3. The best way to burn out learning Python is to learn stuff you can't actually use.
4. Fight on the winning side and be willing to change sides when one side has gained the upper hand.
Jul 19 9 tweets 3 min read
RenTec uses Hidden Markov Models in trading.

The technique generated 60% returns per year over 30 years.

One of the co-founders of RenTec's name is in the algorithm!

Here's how it works: Image A Hidden Markov Model (HMM) is a statistical model used to represent systems that evolve over time with unobservable (hidden) states.

It is widely applied in areas such as natural language processing, speech recognition, and bioinformatics.

And in trading:
Jul 10 14 tweets 5 min read
There are 137,000 Python libraries.

But you only need 11 for quant finance: pandas

• Allows quick data cleaning and preprocessing
• Provides DataFrame structure for time-series data
• Enables complex data operations with simple syntax

Use it for:

Manipulating and transforming financial market data. Image
Jul 7 8 tweets 3 min read
This Jane Street trader literally explains edge in this book.

Here's what's inside: Image The author starts by explaining how the professionals and hedge funds think about trading. Image
Jul 1 13 tweets 6 min read
10 free Python PDF ebooks for download: Image
Image
Image
Image
Think Python

greenteapress.com/thinkpython2/t…Image
Jun 19 12 tweets 4 min read
OpenBB dropped the $0 cost financial AI agent workstation.

You can get 405 free data sources (and an AI Copilot).

Here's what you missed (in 90-seconds): OpenBB Terminal Pro In case you're unfamiliar:

OpenBB is the first AI financial workstation that combines data with an AI agent to transform investment research.

• Private (your data is not shared)
• 100s of free data sources
• Custom data backends
• Advanced AI Copilot

How it works:
Jun 17 12 tweets 4 min read
My master's degree completely failed to teach me how to test trading strategies.

So I spent 40 hours looking for Python backtesting libraries.

Then I started using the best ones.

But unlike my quant finance degree, these won't cost you $90,000.

Here they are for free. Poof Zipline

From Quantopian (acquired by Robinhood) the first to democratize quant trading, comes Zipline. It's a robust, fully-featured backtesting library which features slippage models, robust data handing and rich metrics.

github.com/quantopian/zip…
Jun 15 13 tweets 4 min read
9 trading strategies everyone should know (with Python code): Bollinger Bands Pattern Recognition

The mid band is the moving average on the price series.

The upper and lower bands are two moving standard deviations away from the mid band. Image
Jun 12 10 tweets 3 min read
Jupyter Notebook is the most powerful tool for Python.

But most people don’t know the hidden features.

Need a quick web app?

Or create REST APIs?

Here are the 6 ways to use Jupyter Notebook you never knew existed: The notebook to rule them all. Jupyter Notebook is a web app for creating and sharing computational documents.

When I say powerful, here's what I mean:

• It supports 40 languages
• Produces rich, interactive output
• Leverages big data tools like Spark

So, what else can we do with Jupyter Notebook?
Jun 8 9 tweets 3 min read
I lost $9,000 "technical trading."

So I watched 200 YouTube videos to learn algorithmic trading.

96% of them were a complete waste of time.

But these 6 turned me from a loser into a winner: Build a powerful AI finance agent with Python

Jun 6 11 tweets 3 min read
OpenAI, Google, and Anthropic just published guides on:

• Prompt engineering
• Building agents
• AI in business
• 601 AI use cases

9 of the best guides you can't miss: Image 1. AI in the Enterprise by OpenAI

Grab the PDF: cdn.openai.com/business-guide…
May 28 12 tweets 3 min read
If you use it right, Twitter is the most powerful information platform in the world.

Unfortunately, most people get lost in the noise.

Here are 8 threads for Python and quant finance to get you started today (#4 is a game changer): Level the playing field with the pros.
May 27 12 tweets 4 min read
Myth:

You need a computer science degree to get started with Python, NumPy, and pandas.

Reality:

You need these 8 YouTube videos: "Python Pandas" by Corey Schafer

Learn the basics of creating and manipulating data frames, indexing and selecting data, and cleaning and manipulating data in Pandas.

May 13 11 tweets 4 min read
My master's degree completely failed to teach me Python for quant finance (they taught me MATLAB).

And Octave (WTF?)

So I watched 200 YouTube videos.

And the truth is, 96% of them were a complete waste of time.

But these 8 taught me more than all my PhD professors combined: Algorithmic Trading Using Python (4.5 hours)

Learn how to perform algorithmic trading using Python in this complete course. Algorithmic trading means using computers to make investment decisions.

May 10 11 tweets 4 min read
My PhD professors taught me MATLAB during my master's degree.

So I watched 200 YouTube videos to learn Python

96% of them were a complete waste of time.

But these 8 taught me more than all my PhD professors combined: Algorithmic Trading Using Python (4.5 hours)

Learn how to perform algorithmic trading using Python in this complete course. Algorithmic trading means using computers to make investment decisions.