PyQuant News 🐍 Profile picture
Jul 10, 2025 14 tweets 5 min read Read on X
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
NumPy

• Advanced statistical functions for analysis
• Efficient vectorized operations for large datasets
• Powerful random number generators for simulations

Use it for:

Fast and versatile scientific computing. Image
SciPy

• Advanced stats and hypothesis testing
• Linear algebra for portfolio optimization
• Efficient numerical routines and model calibration

Use it for:

Optimization and calibration. Image
Matplotlib

• Integrates with pandas
• Plot financial time series data
• Generate histogram, scatter plots

Use it for:

Fast plotting of market data and summary statistics. Image
Statsmodels

• Hypothesis testing to test trading strategy efficacy
• Regression analysis for factor analysis and hedging
• Time series analysis with ARIMA and VAR models for forecasting

Use it for:

Regression and statistical analysis. Image
vectorbt

• High performance to run millions of simulations
• Flexible using NumPy and pandas under the hood
• Easy to use once to get up and running fast

Use it for:

Prototyping trading strategies and optimizing parameters. Image
Zipline Reloaded

• Create custom data pipelines
• Backtest strategies with realistic data
• Access a vast array of trading algorithms

Use it for:

A realistic market simulation for backtesting. Image
PyFolio Reloaded

• Detailed portfolio risk analysis
• Integrates with Zipline for backtesting
• Supports custom tear sheets for personalized analytics

Use it for:

Risk and performance metrics. Image
AlphaLens Reloaded

• Visualizes key metrics effectively
• Robust statistical analysis of factors' long-term trends
• Streamlines performance analysis of predictive alpha factors

Use it for:

Alpha factor analysis. Image
OpenBB

• Access financial market data from one place
• Fast Terminal environment for investment research
• SDK for programmatic access to all OpenBB functions

Use it for:

Research and data acquisition. Image
RiskFolio-Lib

• Optimize asset allocation with 20+ risk measures
• Perform scenario, stress testing, and backtesting
• Tools for risk budgeting and risk contribution

Use it for:

Advanced portfolio optimization and risk management. Image
This is a long, in-depth thread.

The best way to come back to it?

Click the link here, hop to the top tweet, and retweet it!
Looking to start using Python for quant finance?

Here's a free Crash Course with everything you need to get started.

Join the 1,000s of people who finally started with Python after reading it:

pyquantnews.com/free-course

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with PyQuant News 🐍

PyQuant News 🐍 Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @pyquantnews

Jun 8
Steal this 8-step framework to take an algorithmic trading strategy from idea to execution.
1/ The idea

Look for market anomalies that repeat.

Your strategy should be based on some economic rationale. In other words, “using machine learning” is not a trading strategy.
2/ Research

Find out if the anomaly you think you found actually exists in history.

Get data and start exploring.
Read 11 tweets
May 30
An 8-step, dead-simple algorithmic trading framework billion hedge fund managers follow: Image
1/ The idea

Look for market anomalies that repeat.

Your strategy should be based on some economic rationale. In other words, “using machine learning” is not a trading strategy.
2/ Research

Find out if the anomaly you think you found actually exists in history.

Get data and start exploring.
Read 10 tweets
May 22
There is $664,000,000,000 invested in factor strategies.

Factors can help you manage risk and amplify returns.

I spent 3 years figuring it out.

Now you can do it in 10 minutes.

Here’s how in Python.
By reading this thread, you’ll be able to:

• Download historic factor data
• Compute the sensitivities to the factors
• Figure out the risk contribution of the factors

But first…
A quick primer on factor investing:

• Used to target specific return drivers
• Helps manage risk outside diversification
• Important for active managers that get paid for performance

You can use the famous Fama-French 3-factor model for free.

Here’s how.
Read 13 tweets
May 8
I read the 161-page Financial Machine Learning paper.

It took me 3 days.

Here are the key topics (in 30 seconds): Image
Understanding Asset Prices

Prices as predictions, reflecting future payoffs and investor valuations.
Large Information Sets

The vast scope of information influencing market prices, highlights the need for complex models.
Read 11 tweets
May 4
There is $664,000,000,000 invested in factor strategies.

Factors can help you manage risk and amplify returns.

I spent 3 years figuring it out.

Now you can do it in 10 minutes.

Here’s how in Python.
By reading this thread, you’ll be able to:

• Download historic factor data
• Compute the sensitivities to the factors
• Figure out the risk contribution of the factors

But first…
A quick primer on factor investing:

• Used to target specific return drivers
• Helps manage risk outside diversification
• Important for active managers that get paid for performance

You can use the famous Fama-French 3-factor model for free.

Here’s how.
Read 13 tweets
May 3
7 of the best books on algorithmic trading with Python you can buy: Image
Trading Evolved by Andreas Clenow

Professional backtesting environment using Python, and provides strategies for trading both futures and equities.

• Professional backtesting with Python
• Source code and strategy explanation
• Focus on futures and equities trading Image
Algorithmic Trading with Interactive Brokers by Matthew Scarpino

Introduces readers to algorithmic trading through Interactive Brokers' Trader Workstation (TWS) programming interface.

• Guide to using IB TWS API
• Focuses on Python and C++
• No prior experience needed Image
Read 11 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(