PyQuant News 🐍 Profile picture
Aug 5 3 tweets 1 min read Twitter logo Read on Twitter
15 coded quant trading strategies.

All in Python.

All free.

Get them here: Image
These scripts include various types of momentum trading, opening range breakout, reversal of support & resistance, and statistical arbitrage strategies.

Plus, an options straddle backtest.

github.com/je-suis-tm/qua…
My professors taught me MATLAB during my master's degree—but no one uses MATLAB except for professors.

So to get a quant job, I spent 1000s of hours teaching myself Python.

Now I share what I've learned over 20 years every week with over 18,000 readers.

pythonforquantfinancemasterclass.com

• • •

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

Jul 27
Machine learning and trading.

Most beginners have it completely wrong.

It sounds great, but where do you start?

Here's a dead-simple machine learning technique quants use to:

• Diversify portfolio risk
• Design pairs strategies
• Analyze market structure

The code:
In case you’re unfamiliar with KMeans:

• Common clustering technique in data science
• Creates K number of clusters from a dataset
• Assigns each data point to its closest cluster

So how can you use it in your trading and investing? Image
Quants use KMeans to help with risk management and building trading strategies:

• Identifying clusters of similar stocks
• Uncovering stocks sharing common risks
• Get insights on potential market reactions

Here’s how to get started with KMeans and Python.

Step by step:
Read 13 tweets
Jul 23
I read 65 books on quant finance during my master's degree.

Most of them were useless.

But these 4 are still on my shelf 11 years later: Image
Quantitative Methods for Investment Analysis

What you learn:

Probability theory, statistical inference, regression analysis, time-series analysis, and portfolio management. Image
Interest Rate Models-Theory and Practice by Domino Brig and Fabio Mercurio

What you learn:

A comprehensive and practical guide to interest rate modeling, including the latest developments in the field. Image
Read 8 tweets
Jul 15
Want to get started with Python for quant finance?

Set up your own custom 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

Let's go!
One thing before we start:

Jupyter Notebook.

What is it: A web application for creating and sharing computational documents.



Now, let's get to the libraries!jupyter.org
Read 24 tweets
Jul 12
ChatGPT will never work for trading.

That's what I thought 3 months ago.

Then I spent 100+ hours in the GPT-4 rabbit hole.

These 6 blogs show you what you can do.

And it doesn't take a Ph.D. in prompt engineering:
Machine Learning Trading Essentials

What you learn:

Financial data structures and their role in building efficient and accurate trading algorithms.

hudsonthames.org/machine-learni…
Can We Backtest Asset Allocation Trading Strategy in ChatGPT?

What you learn:

The feasibility of using ChatGPT to backtest asset allocation trading strategies and its potential as a useful tool in finance and trading.

quantpedia.com/can-we-backtes…
Read 9 tweets
Jul 6
My alpha factor engineering strategy using Average True Range (ATR):

1. Use ATR to assess volatility
2. Rank portfolio by ATR z-score
3. Assess the factor performance
4. Combine factors for diversification

Here's the step-by-step guide (with Python code):
In case you're unfamiliar with ATR:

1. Measures market volatility through price range fluctuations
2. Helpful for setting stop-loss orders
3. Uses high, low, and close prices

It's also a useful factor for exposure to volatiltiy.

And here's the crazy thing:
Most people just consider it a technical indicator!

You can compute ATR using the popular TA Lib Python library.

Here's how it's done, step-by-step:
Read 13 tweets
Jun 29
The single most powerful tool for quants, traders, and coders in 2023:

LangChain

Over the past 3 months I spent 50 hours down the rabbit hole to:

• Use the internet with GPT4
• Load, search, summarize PDFs
• Use Wikipedia data in prompts

Here's one of the most incredible:
This thread is based on great work by Nicholas Renotte.

By reading it, you will create an AI financial advisor:

• Get the tools installed to use the OpenAI API
• Fine tune an LLM on a PDF unseen by the model
• Ask the PDF questions and get accurate answers

Are you ready?
A quick primer on LangChain:

• Use it to access the internet, load PDFs, and more
• An integration framework to create LLM-basd apps
• Comes with access to toolkits and other language models

Here’s the step-by-step process to turn GPT into your own financial advisor:
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 on Twitter!

:(