Our new book The Alpha Formula; High Powered Strategies to Beat the Market with Less Risk is now available at https://tradingmarkets.com/alphaformula
How Python Made Me A Better Trader (And Can Do The Same For You)
The one thing we all have in common is every one of us is looking to improve our trading and investment results. It’s a never-ending passion that’s well worth pursuing.
In order to achieve this, your improvement must come in many places. We spend a lot of time focusing on trading and investing strategies in the Connors Traders Research Journal. That’s obviously important.
Just as important, is the ability to be able to build and test these new strategies. In order to do this, you must have professional-level programming tools and skills.
Like many professional traders, both those who work for major investment firms and those who trade for themselves, my trading and strategy development skills were greatly enhanced when I learned how to program in Python. I’m confident Python will do the same for your trading.
I am often asked what I can do now that I wasn’t able to do before using my previous programming tools? How has Python expanded my skill set, improved my research process, and ultimately led me to be a better, more profitable trader?
If your goal is to achieve better trading results, and to expand your knowledge to professional levels, keep reading to find out what Python has done for me, and can do for you.
Before joining Connors Research, I had 10 years of experience as an institutional fixed income trader for a very successful trading firm.
The systematic way of trading and investing has always appealed to me. After using only Excel for years, I realized that if I was serious about improving, I needed to learn how to code.
This was a daunting task at first, as I had no formal computer science or coding training. I was a Finance major in undergrad and programming was not formally required.
After doing some research, I settled on TradeStation and their in-house coding language – EasyLanguage. I bought books on EasyLanguage, locked myself in a room for weekends on end, and taught myself how to code.
After the frustrating first couple of weeks, I eventually got the hang of EasyLanguage programming. I subsequently used TradeStation and EasyLanguage as my primary coding, system development and analysis tool for the next couple of years. I even developed my first live trading strategy using TradeStation.
As my skills advanced, I began to realize that, while TradeStation and EasyLanguage were working ok for me, it had its limitations.
Being a closed source, in-house coding language, owned and operated by TradeStation, I was at the mercy for the developers at TradeStation to advance the language and extend its functionality.
I also realized that I was only using EasyLanguage for backtesting trading strategies and nothing else. I heavily relied on Excel to analyze backtested results and do other number crunching and I continued to rely on visually observing charts to find potential trading edges.
There had to be a better way!
Moving Into The Big Leagues
I needed to step up my game. While TradeStation was fine, at the end of the day it is a retail product. I wanted to enter the big leagues and learn a more flexible, open-source, professionally used coding language. A language that the biggest and best banks and hedge funds on Wall Street were using.
When I reached out to fellow professional systematic and quant trading friends, I learned, every one of them used Python as their primary tool. They couldn’t stop raving about Python, and everything it allowed them to do.
The decision from there was easy; I set out to learn Python as well.
How Python Made Me a Better Trader
Fast forward three years and Python is now my primary tool for trading – ranging from developing complete trading strategies to analyzing my backtests, to finding new trading edges.
Python has greatly expanded my skill-set, ultimately making me a better, more profitable trader.
Below are some of the ways I use Python in my trading and research. I can now…
- Code any strategy I can think of with much greater efficiency and improved flexibility.
- Code PORTFOLIO LEVEL trading strategies, not just strategies applied to one security at a time.
- Professionally manage hundreds and even thousands of individual securities (think US Stocks) in a dynamically changing universe, and use that universe to create strategies.
- Advanced number-crunching – Python has largely replaced Excel for me!
- Perform backtests on Futures Contracts, using continuous futures with several “roll” options for realistic simulations.
- Test individual trading signals for historical edges before incorporating that signal into a complete strategy. Answering questions such as “every time the RSI has been below 10, what has happened over the next 3 business days?” for example.
- Utilize hundreds of fundamental data points in my trading strategies such as price/book ratio, return on equity, and gross margins to name a few.
- Perform deep analysis of backtested results, including custom metrics.
- Run statistical and machine learning models, which are already pre-programmed in Python.
- Write custom code to monitor the performance of my portfolio in real-time.
- Make custom charts and plots of any data I can get my hands on – this includes things like line charts, bar charts, scatter plots and correlation matrices.
- Analyze data not just from the Quantopian database, but also from any website, program with a Python API (there are tons of them), Excel spreadsheets or CSV files.
- Joined a large community of traders, data scientists, developers and researchers using Python. This has huge benefits including always having somebody available to help with questions and generous sharing of code throughout the community.
- Greatly improved any career prospects I may seek. If you look at the professional job boards, almost every tradings job, quant job, researcher, or portfolio manager now requires you know Python. Nobody requires you to be able to code in EasyLangauge or Amibroker!
The bottom line is that learning Python advanced my professional knowledge, made my work more efficient, helped me find new and better trading edges, greatly expanded my backtesting ability, and lead to me being a better, more profitable trader.
Python can do the same for you!
If you’d like to learn more about what Python can do to improve your trading, you can sign up for a free 45-minute webinar we’re holding Tuesday, August 13 at 1 pm ET. To register, please click here now.
PS – Each of the strategies and the portfolios that are presented in my new book, The Alpha Formula – High Powered Strategies To Beat The Market With Less Risk, written with Larry Connors, was done in Python.
Could they have been done in other languages? To a degree. But the professional trading firms including many of the largest and best asset management firms and hedge funds have their traders and researchers build their strategies in Python. At the webinar, we’ll show you how you can too! Click here to register now.