I have begun a new series on backtesting with Python, starting with Market Profile stats 'cuz I found it interesting since a lot of traders think it's merely a discretionary tool. Soon, gonna explore a wide range of other backtesting subjects.
Python for Data Science - Course for Beginners
This Python data science course will take you from knowing nothing about Python to coding and analyzing data with Python using tools like Pandas, NumPy, and Matplotlib.
(Time:12 hr 20m)
First things I installed on my new MacBook Pro 16"
0. VS
@code
1.
@alfredapp
(better spotlight)
2. bartender (organize)
3. divvy (window mgt with keyboard)
4. wifi signal (detailed)
5.
@snagit
(screen caps & animated gifs)
6. insomnia (http)
7. Amphetamine
8. Dropbox
9. Chrome
Finally took the plunge and published NSE F&O Bhavcopy summarizer on Github.
A lot of moving objects there and impossible to explain everything so I just commented the code
This is the code flow and sample diagram it will generate
If you are looking for ideas to develop strategies or simply want to see the performance reports of various concepts here is a collection of various systems, all coded in python (Quant Connect API, to be precise)
#reference
#python
Market edge can be classified into 3 types
Information edge: Data
Analytical edge: Deep learning, statistics, charting, TA, FA etc
Emotional edge: How you manage yourself under greed & fear, are your mechanical models suitable for your personality etc.
If you prefer to learn through video tutorials then this is the best youtube channel to learn Python. Corey has a knack for explaining things in a simple way which doesn't feel like someone just reading the documentation.
Python notebook on how to quickly run an idea and do basic backtest without any backtesting library
Here the idea is to check the profitability of BTFD system
If close < 20% of day's range then buy at close
Sell at next day's close
Best use of Market Profile is to get what market participants are trying to tell us instead of solely focusing on the price.
Here we use the
#MarketPprofile
to determine which strategy to execute, momentum or mean reversion?
#Xpost
This thread feels like a crash course in Python algo trading for latency insensitive strategies. Mostly he explained his tech stack intuitively, full marks for that
The best systematic trading setup consists of a computer, a man and a dog. The computer runs a fully automated strategy, the man feeds the dog, and the dog bites the man if he touches the computer.
Trade for living? Have a backup plan for these things.
Backup PC
Backup data storage (offline)
Backup Internet provider
Backup power supply
Backup phone line
Backup broker (cant stress enough)
Backup trading desk
Painkillers if everything fails.
A common misconception about the algo trading is that u write some code & ur algo will make u super-rich while u sniff cocaine in your personal yacht. Most of the successful algo traders were discretionary traders first, understood the market dynamics & then started mechanically
This article provides a starting point to explore basic algorithmic trading within 100 lines of Python code. All the steps are illustrated, like retrieving data, backtesting a momentum strategy, and automating it.
Someone mentioned that his strategy has 300% annual returns but the maximum drawdown is 115%. LOL
At 100% max drawdown your investment is literally worthless, how the system traded with no capital? 😂
[Python] A library to calculate Market Profile (Volume Profile) from Numpy and Pandas DataFrame. (thanks
@alkd1976
for bringing this up to our attention)
Market Profile Value Area Calculations With Nifty Future. This is based on bfolkens code
Changed the original example code as google finance API is not working. Also, made a few changes. Details with code in the post
Anyone is looking for some sample rule-based strategies to hone their programming skills or to understand strategy templates then this is the oldest and great resource (click 'Traders TIP'S link)
Python is just made for data scraping. Learn requests and beautifulsoup, it wont take more than a day but its worth it rather than depend on data scraping libraries that use these tools. Websites often change & break scraping libraries
start with this link
Start with a Python library called pandas. It’s a huge library but it's mostly fun for traders because it's kind of rewarding to learn each function and how it gonna affect the way you handle the financial data.
Books on Quant finance along with some entertainment (and less or no theory)
Fortune's Formula
The Physics of Wall Street
Flash Boys
The Quants
When Genius Failed
Dark Pools
This is the most beginner-friendly book on evaluating trading strategies. All the basics concepts about backtesting parameters covered with easy to follow examples.
Interesting method to use Volume Profile in Python. Especially really liked the way he solved the volume node function. Few ideas in this article are worth implementing.
Displaying market profile features for each day on top of TPO chart was something really important for me, now we can do that with Pandas dataframe. I tried to include Machine Learning predictions too in the table but it slowed down the whole process & increased dependency
Algo trading has become such a low entry barrier business. To make a profitable algo you have to bring something new to the table- an edge.
In Machine Learning, 1minute univariate price data won't cut it. ML isn't a magic machine that you put the trash in and gold will come out
Slither Into Python: An Introduction to Python for Beginners
This book is free to read online, no programming background is needed.
The author explained basic concepts such as memory or "how computers work".
From The Man Who Solved the Market, this is so far the biggest revelation for me.
My expectations about this book were Simons life outside the financial markets but this book is more about Medallion fund rather than Simons ( will post in detail after finishing the book)
Mentioned this book before, highly recommended for those who don't know anything about machine learning or even Python. If you're curious about WTF ML is then read the first part of the book
Then learn some basic stuff about Python library called NumPy. Pandas is built on NumPy. Numpy is huge, you just need to understand some basic NumPy functions like NumPy shapes and NumPy arrays
"If you are depressed you are living in the past. If you are anxious you are living in the future. If you are at peace you are living in the present." Lao Tzu
For Market Profile glossary bookmark this page
And for some basic MP concepts check this thread by me
(note that its a very old thread (2009) & I'm not active there, but it covers most of the MP basics)
There is no comedy show that comes closest to the Senate hearing on technology-related matters, be it crypto or social media.
Senate to Zuckerberg: Why you censored Trump jr.?
Zuckerberg: Hard to say because that happened on Twitter 🤣
Don't let someone tell you what works in the market and what doesn't.
If someone says something doesn't work then interpret it as it didn't work for them.
This book explains some important ideas in Machine Learning in a statistical framework without going too much into theory.
The Elements of Statistical Learning - Data Mining, Inference and Prediction - 2nd Edition (pdf)
Instead of any book, go through these traderlabaratory sticky threads on Volume Spread Analysis. There are some practical applications with examples, some interesting discussions, and doubts.
If you are looking for ways to connect Python with your favorite trading s/w like NinjaTrader or Multicharts then check this free tool called SharedVar Server
In fact, it can connect w/ every client app which can communicate with DLL files
Correlation matrix of various market profile features
Underscore means minus.
eg. cVAH_cPOC = composite value area high minus composite point of control.
Composite period = 5 days
scrip: Nifty F
period: since 2008
Best Way To Start Learning Python – A Complete Roadmap.
It's not a big read as title suggests. Basically it covers what kind of resources are available, topics to concentrate etc
Vollib, a Python library to calculate option greeks. it is faster than Mibian.
Vollib is built around Peter Jäckel's LetsBeRational, an extremely fast and accurate technique for obtaining Black's implied volatility.