Quant Science Profile picture
Mar 15 6 tweets 2 min read Read on X
Every trader should know Python.

How to do this in 1 line of code: Image
The Python library is called quantstats.

Here's some cool stuff you can do with 1 line of python code.

1. First, run this:

pip install quantstats
2. Visualize stock performance

Use qs.plot.snapshot() Image
3. Create a Strategy Tearsheet

Use qs.reports.html() Image
I have 1 more thing for you.

If you want to get started with algorithmic trading in Python, I have a free workshop on March 26th.

I'll cover my best strategies and have a full Python code demo.

Register here (500 seats): learn.quantscience.io/qs-registerImage
That's a wrap!

If you enjoyed this thread:

1. Follow me @quantscience_ for more of these
2. RT the tweet below to share this thread with your audience

• • •

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

Keep Current with Quant Science

Quant Science 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 @quantscience_

Mar 14
*Using Mathematics to Make Money* by legend Jim Simons.

8 page PDF free for download: Image
The main ingredients of RenTec's success:

• Building and continuously improving investment models
• Fostering collaboration among the company’s workforce
• Hiring scientists who have decided they want to make money

Here's the link:

papers.ssrn.com/sol3/papers.cf…
Want to learn how to build algorithmic trading strategies in Python (that actually work)?

On March 26th, we are sharing one of our best algorithmic trading strategies live.

👉 Join us live for our free training (500 seats): learn.quantscience.io/qs-registerImage
Read 4 tweets
Mar 13
🚨BREAKING: A new Python library for algorithmic trading.

Introducing TensorTrade: An open-source Python framework for trading using Reinforcement Learning (AI) Image
TensorTrade is an open source Python framework for building, training, evaluating, and deploying robust trading algorithms using reinforcement learning leveraging:

- numpy
- pandas
- gym
- keras
- tensorflow
Example: Using TensorTrade to Train and Evaluate with Reinforcement Learning

Step 1: Create training and evaluation sets

We'll start by creating a training and evaluation set as CSV files. Image
Read 9 tweets
Mar 12
Nancy Pelosi's Portfolio... 1400% return.

We optimized it in Python. Image
Step 1: Download Stock Data from Yfinance

Run this code to collect the assets and price data. Then covert prices to returns. Image
Step 2: Create the Riskfolio Portfolio Object

Next, we'll create a Riskfolio Portfolio Object from the returns data. Image
Read 7 tweets
Mar 11
How to set up Python for trading.

My simple 8 step process: Image
1. Install Python & Set Up Your Environment

- Install Anaconda
- Create a conda env (e.g. quant-stack) using this terminal command:

conda create -n quant-stack numpy pandas matplotlib scipy scikit-learn Image
2. Install Essential Libraries

Use pip or conda to install key packages:

- yfinance
- zipline-reloaded
- pyfolio-reloaded
- alphalens-reloaded
- vectorbt
Read 12 tweets
Mar 11
Why do 99% of traders fail?

NO systematic trading process.

Here's mine: Image
There are 5 steps:

1. Set Up Python for Trading
2. Develop Trading Strategies
3. Backtest the Strategies
4. Manage Risk
5. Trade Execution Image
The Benefit:

Once you have a systematic trading process, the rest is easy:

Select 1 to 3 core trading strategies and iterate.
Read 6 tweets
Mar 10
BREAKING: New Python Library for Finance Analysis with AI Agents

Here's a 30-second overview (+ Python Getting Started Tutorial): Image
1. OpenBB LLM Agents

A Python library for creating financial analyst agents.

- Financial Research
- Answer questions with up-to-date financial data
- Function calling to use OpenBB Platform
2. Installation:

pip install openbb-agents --upgrade Image
Read 9 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!

:(