PyQuant News 🐍 Profile picture
Nov 16, 2022 24 tweets 8 min read Read on X
Myth:

You need a PhD to get started with Python for quant finance.

Reality:

You need Jupyter Notebooks pre-built with quant code.

Get 20 with Getting Started With Python for Quant Finance.

Here's a breakdown of all 20:
And here's what else you get:

• $1,000 at IB
• 6 deep dives
• 10 live sessions
• Private community
• 10-module curriculum
• Deep Dive into OpenBB
• Lifetime access to recordings
• A free copy of 2 options ebooks

Now, on to the Notebooks!

…gstartedwithpythonforquantfinance.com
Assess a real trading strategy

Algorithmic trading is hard for retail traders. Don't spend 6 months building a backtest for one that doesn't work.

This Notebook shows you how to assess a working trading strategy quickly.
Backtest a trading strategy with bt

When you're ready, use a backtesting framework to analyze the risk and performance metrics of your strategy.

This Notebook walks you through a backtest with bt.
Price options with the Edgeworth model

Pricing models assume stock returns are normally distributed. They're not. The Edgeworth model introduces skew and kurtosis.

This Notebook shows you how to price an option with the Edgeworth odel.
Use GARCH to forecast volatility

Quants use volatility forecasting to find market mispricings. Most volatility forecasts start with GARCH.

This Notebook shows you how you find market mispricings.
Python basics tutorial and walkthrough

If you're just getting started with Python, you need a good walkthrough of the basics.

This Notebook shows you how to get started with Python.
NumPy tutorial and walkthrough

The entire Python quant stack is based on NumPy. It's the standard tool for all scientific computing in Python.

This Notebook shows you how to use it.
pandas tutorial and walkthrough

Working with data starts with pandas. It's the standard tool for data manipulation in Python. It was started by a hedge fund.

This Notebook walks through the most important parts of pandas.
SciPy tutorial and walkthrough

The statistical functions like probability distributions that underpin quant finance are in SciPy.

This Notebook shows you what you need to use SciPy for quant finance.
yfinance tutorial and walkthrough

To build trading algorithims, you need stock and options data. yfinance is your gateway to free market data.

This Notebook walks you through the basics of using yfinance.
Theta Data tutorial and walkthrough

Historic and real time options data is expensive and hard to find. Theta Data gives you an API to access historic and real time options data.

This Notebook shows you how to use the API.
Riskfolio-Lib tutorial and walkthrough

Teams of Ph.D.s spent decades refining the portfolio optimization. Riskfolio-Lib wraps up dozens of portfolio and risk optimizations in one library.

This Notebook walks you through an example of how to use it.
pyfolio tutorial and walkthrough

Risk and performance reporting is critical for measuring your trading algorithms. pyfolio has a suite of tear sheets that gives you an in-depth view of your portfolio in one line of code.

This Notebook shows you how to use it.
Empyrical tutorial and walkthrough

Don't rebuild the statistical functions you need for risk and performance reporting. Empyrical gives you a library of common risk and performance metrics ready to use.

This Notebook outlines common use cases.
Connect to Interactive Brokers with Python

The first step in automatic execution is connecting to your broker.

This Notebook gives you the code to make the connection.
Risk management with value at risk

Hedge funds and trading firms value at risk to capture probability of losing money. You can use it too.

This Notebook shows you how to build your own value at risk measure.
Risk management with drawdown analysis

Drawdown is an important factor to consider when analyzing trading strategies. It's used to help undertand risk of going broke.

This Notebook calculates drawdown for a stock or portfolio.
Simulate stock prices with Geometric Brownian Motion

The foundation of all derivative pricing is asset price simulation. One of the most common methods is Geometric Brownian Motion.

This Notebook shows you how to simulate stock prices.
Simple order execution on Interactive Brokers with Python

Once you connect, you need to test simple trade execution.

This Notebook shows you how to send simple buy orders to Interactive Brokers.
Advanced algo trading on Interactive Brokers with Python

Once you get the connection set and a trade done, add complexity to your trading algorithms.

This Notebook demonstrates an advanced trading strategy executing on Interactive Brokers.
Store real time market data from Interactive Brokers with Python

All quants need data. The free sources are ok, but if you need something more complex, save it from Interactive Brokers.

This Notebook shows you how to save market data directly from the market.
Get all this plus:

• 6 deep dives
• 10 live sessions
• Private community
• 10-module curriculum
• Deep Dive into OpenBB
• Lifetime access to recordings
• A free copy of 2 options ebooks

In one course.

January cohort is open:

…gstartedwithpythonforquantfinance.com
There are limited seats for the course. If you're not ready yet, retweet the top tweet to remind yourself.

If you want more Python for quant finance, follow @pyquantnews.

• • •

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

Sep 6
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?
Package Development

nbdev let's you develop and publish Python packages right from Jupyter Notebook.

It generates documentation and publishes on GitHub Pages. You can also write tests and setup CI with GitHub Actions.

github.com/fastai/nbdev
Read 11 tweets
Aug 31
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.

"NumPy Array Basics" by sentdex

This video covers the basics of working with NumPy arrays, including creating arrays, indexing and slicing, and performing arithmetic operations.

Read 12 tweets
Aug 24
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?
Pairs trading is a way of trading an economic relationship between two stocks.

Two companieswith the same supply chain will be impacted by the same economic forces.

Pairs trading tries to model that relationship and make money when the relationship temporarily breaks down.
Read 13 tweets
Aug 20
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…
Random Forests for Complete Beginners

What you'll learn: A thorough walkthrough of building and using decision trees and random forest machine learning techniques in Python.

victorzhou.com/blog/intro-to-…
Read 10 tweets
Aug 18
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…
First, download earnings data. Image
Read 8 tweets
Aug 12
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.

1,000,000 backtest simulations in 20 seconds with vectorbt

The video explains how parameter tweaking on random noise ruins backtests and shows how vectorbt enables proper walk-forward optimization for pairs trading.

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!

:(