PyQuant News 🐍
PyQuant News 🐍

@pyquantnews

25 Tweets 4 reads Dec 07, 2022
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.
jupyter.org
Now, let's get to the libraries!
Numerical libraries & data structures
All quant finance and trading relies on math.
These libraries come packed with the pre-built math and statistics every quant needs.
numpy
NumPy is the fundamental package for scientific computing with Python.
numpy.org
scipy
SciPy (pronounced “Sigh Pie”) is a Python-based ecosystem of open-source software for mathematics, science, and engineering.
scipy.org
pandas
pandas is an open source, BSD-licensed library providing high-performance, easy-to-use data structures and data analysis tools for the Python programming language.
pandas.pydata.org
Financial instruments & pricing
From market research, to derivatives pricing, to volatility.
Python has you covered with just a few libraries.
OpenBB Terminal
Terminal for investment research for everyone.
github.com
PyQL
QuantLib Cython wrappers
github.com
vollib
vollib is a python library for calculating option prices, implied volatility and greeks.
github.com
Backtesting & trading
Have an idea?
Test it in a backtest.
Working?
Start trading in the market with these libraries.
Blankly
Fully integrated backtesting, paper trading, and live deployment.
github.com
backtrader
Python Backtesting library for trading strategies.
github.com
Risk analysis
Once you have trades on, time to manage risk.
Do it with these powerful libraries.
pyfolio
Portfolio and risk analytics in Python.
github.com
empyrical
Common financial risk and performance metrics.
github.com
Riskfolio-Lib
Portfolio Optimization and Quantitative Strategic Asset Allocation in Python.
github.com
Market data
And finally, data.
Python makes it easy to get market data free or through your broker.
Here's the best libraries to get started.
yfinance
Yahoo! Finance market data downloader (+faster Pandas Datareader)
github.com
IBApi
The official API for Interactive Brokers provides access to all the data available through IB. Replaces IBPy.
interactivebrokers.github.io
Alpha Vantage
Alpha Vantage delivers a free API for real-time financial data and most used finance indicators in a simple JSON or CSV format.
github.com
To get started with Python for quant finance, you need a quant lab.
• Numerical libraries & data structures
• Financial instruments & pricing
• Backtesting & trading
• Market data
All for free with Python.
That's a lot of data!
What to keep all these handy?
Hop back to the top and retweet the top tweet so you can find it later - and so others can find it too!
Here's the link:
336 others already went from beginner to up and running with Python for quant finance.
Join us:
• Community
• Frameworks
• Live sessions
• Special guests
• Jupyter Notebooks
January cohort is open - limited spots.
gettingstartedwithpythonforquantfinance.com

Loading suggestions...