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):
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:
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.
Here’s how:
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:
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.
Jul 7 • 8 tweets • 3 min read
This Jane Street trader literally explains edge in this book.
Here's what's inside:
The author starts by explaining how the professionals and hedge funds think about trading.
Jul 1 • 13 tweets • 6 min read
10 free Python PDF ebooks for download:
Think Python
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):
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.
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.