Where finance practitioners get started with Python for quant finance, algorithmic trading, and data analysis | Tweets & threads with free Python code & tools.
38 subscribers
Feb 25 • 15 tweets • 4 min read
Skip the quant finance degree.
Dive into 17 code repos that will teach you more than all your professors at school.
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.
Feb 6 • 9 tweets • 3 min read
You can use options to predict stock price moves.
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.
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…
Jan 9 • 12 tweets • 4 min read
A Bloomberg Terminal costs $30,000 per year.
Unaffordable for 99.9% of us.
But Bloomberg is not AI-enabled.
OpenBB dropped the $0 replacement with AI agent workspaces.
Free market data and an AI Copilot:
The 90-second step-by-step guide:
In case you're unfamiliar:
OpenBB is the first AI financial terminal that combines data integration 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:
Dec 31, 2024 • 11 tweets • 4 min read
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's 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?
Dec 26, 2024 • 20 tweets • 6 min read
99% of beginners get backtesting wrong:
Build backtest, get poor results.
Tweak backtest, get positive results.
Then they wonder why they lose money.
Here's the dead-simple framework the pros use to get backtesting right:
If you replicate this framework, you’ll:
• Setup a backtest with bt
• Run a backtest and analyze results
• Assess how random your results are
Plus, you’ll dramatically reduce the risk of your strategy performing poorly in the market after a great backtest.
But first…
Dec 22, 2024 • 21 tweets • 4 min read
I'm 43.
If you're still in your 20s or 30s, read this:
1. The compounding effect of doing the same thing over and over for a long period of time is a force of nature. Learn how to compound.
2. Learn how to be comfortable with being uncomfortable. Wealth doesn't accrue to people solving easy problems.
Dec 14, 2024 • 11 tweets • 3 min read
This is Edward Thorp.
The genius mathematician that returned 20%+ over 30 years.
He traded for 19 years, with his worst loss being 1%.
He beat Vegas dealers at blackjack.
His top 7 trading strategies (and how they work): 1. Statistical Arbitrage
He used mathematical models to identify price discrepancies between different markets or securities, buying undervalued assets and selling overvalued ones.
Dec 12, 2024 • 15 tweets • 4 min read
The best way to lose money with algo trading:
Overfitting to noise.
It’s how traders turn $100,000 accounts into $100.
So I spent 20 hours studying the state-of-the-art technique to learn how to keep my money.
Here’s the step-by-step guide to set it up (for any strategy):
Algo trading is a game of iteration.
The faster you can test parameter combinations, the faster you can discard ones that don’t work.
And nothing is faster than vectorbt.
It’s a state-of-the-art library that runs millions of simulations in a few seconds.
Here’s how it works:
Dec 7, 2024 • 20 tweets • 2 min read
I spent $90,000 on a master's degree to learn math for finance.
These are the 16 most important stochastic processes for asset pricing (bookmark this thread for later):
1/16 Bessel Process
Models the radial part of a particle's path in motion.
Used to quantify risk in mean-reverting financial instruments.
Dec 3, 2024 • 13 tweets • 4 min read
Most algorithmic traders only focus on the trade signal.
Then they wonder why they lose money.
It's not the signal that's most important.
It's the filter.
Here are 9 of the most popular filters everyone should know (with Python code):
Moving average filter
Uses a moving average of the data points to smooth out short-term fluctuations and highlight long-term trends.
Dec 2, 2024 • 15 tweets • 4 min read
It wasn’t until I met an old time options trader that I learned my mistake:
“I make money when others are panicking because they push the prices too far.”
I was trying to data mine strategies.
He was telling me to find inefficiencies.
That’s when everything changed:
When I first started trading, I thought success meant find the perfect trading strategy.
I spent countless hours backtesting, optimizing, and data mining.
I thought I had found the holy grail of trading.
But when I traded my strategy live, I lost money.
Over and over again.
Nov 28, 2024 • 14 tweets • 5 min read
This is Steve Cohen.
He's America’s most profitable day trader and has a net worth of $19.8B
Here’s his story:
Steve grew up in a middle-class family on Long Island with 7 siblings.
He liked sports.
Played basketball, soccer, and golf just like everyone else did.
He developed an obsession for poker, which eventually led him to trade.
Here’s how he got started:
Nov 27, 2024 • 14 tweets • 4 min read
Most investors struggle to find alpha.
So I spent 6 months reading everything I could
• Howard Marks (billionaire)
• Jim Simons (billionaire)
• Goerge Soros (billionairee)
Here's how the billionaires do it: 1. Cycles are inevitable:
Market cycles are an inherent part of the economic and investment landscape.
Recognizing this cyclical nature is crucial for investors.
Nov 14, 2024 • 7 tweets • 2 min read
I spent the last 25 years wasting my time writing 100,000 lines of code.
Most of the time, it was for analytics apps.
Now I can build 10 apps in under an hour.
All with Streamlit.
Here's the code:
Streamlit lets you build beautiful web apps in a few lines of code.
This app downloads stock data and lets you apply technical analysis.
Nov 13, 2024 • 25 tweets • 6 min read
Want to get started with Python for quant finance?
Step 1:
Install your custom Python Quant Lab.
Start with these 14 (free) Python libraries:
By the end of this thread, you'll have the right libraries for:
• Numerical libraries & data structures
• Financial instruments & pricing
• Backtesting & trading
• Market data