Exclusive Interview: The Python Quant


Dr. Yves J. Hilpisch is founder and managing partner of The Python Quants (http://tpq.io), a group focusing on the use of open source technologies for financial data science, artificial intelligence, algorithmic trading and computational finance. He is the author of the books (http://books.tpq.io):

  • Python for Finance (O’Reilly, 2014)
  • Derivatives Analytics with Python (Wiley, 2015)
  • Listed Volatility and Variance Derivatives (Wiley, 2017)

Yves lectures on computational finance at the CQF Program (http://cqf.com), on algorithmic trading at EPAT (http://quantinsti.com) and is the director of the first online training program leading to a University Certificate in Python for Algorithmic Trading (http://certificate.tpq.io).

Yves has written the financial analytics library DX Analytics (http://dx-analytics.com) and organizes meetups, conferences and bootcamps about Python for quantitative finance in Frankfurt, Berlin, Paris, London and New York. He has given keynote speeches at technology conferences in the United States, Europe and Asia (http://hilpisch.com).

Grace: Tell us how you first got into Python for finance and what the experience was like.

Yves: Well, to provide some background, my first degree was in business administration. I didn’t study computer science or any hard science, but my Ph.D. thesis involved mathematical finance and quantitative finance and I became quite fond of these areas of study. Quite a few years later I worked as a management consultant and was consulting a company in Austria when I heard people talking about Python, which I had never heard of. People started to talk about how powerful it was, so I tried it out and thought it was perfectly suited for finance, as the syntax was very similar to mathematical/financial equations. This was more than ten years ago when almost nobody was using Python for finance because it was considered too slow for financial applications. I started doing some side projects with Python and some five years later I made a business out of it. As a business, we focus exclusively on Python for finance and algorithmic trading and I’m really enjoying it. The ecosystem has been growing at a tremendous rate and the finance community is benefiting from the advancements made in other areas like data science, artificial intelligence, and machine learning.

Grace: Tell us more about what inspired you to found the Python Quants.

Yves: I saw the potential for Python or finance a long time ago, but people didn’t believe in Python as a proper programming language for quant finance at that time, so I had difficulty creating a business out of it. However, this has changed tremendously as big institutions like banks and hedge funds have picked it up. This gave us the momentum to form The Python Quants group and come out with our offerings. Today we are mostly focusing on consulting clients and our online training offerings, which have been growing tremendously. We offer a formal certification for Python for Algorithmic Trading and also in Python for Finance. Areas like artificial intelligence, deep learning, machine learning and the likes now play an important role in the industry and this is what we teach our students.

Grace: Can you tell us a little bit more about the Python boot camp you organize?

Yves: We have been running this event for about five years now. The goal of the bootcamp is for people to come in, having maybe little to no Python background, and four days later be able to algorithmically trade in real-time using code that they have written. Essentially, they learn how to backtest their strategy ideas and how to implement them in real time in an automated fashion on a trading platform from start to finish within four days.

Grace: What do you think the newer systematic traders struggle with the most?

Yves: Most people come to the algo trading area being either experienced in trading with a need to learn the programming skills, or experienced in programming with the need to master the trading skills. These two groups obviously struggle with different topics. For the programmers it’s the financial language, the market microstructure, and risk management. On the other hand, experienced retail traders often struggle with the technical aspects of algo trading. If you as a retail trader want to get started properly with algo trading, you need to satisfy certain minimal requirements in regards to the infrastructure that you use, the reliability of your system, how you come up with code and so forth. It is easy to come up with ideas and to test them interactively but once you get started trading real money you want to make sure that it’s all properly implemented. From my experience, newer algo traders struggle the most with things like setting up a robust infrastructure, deploying code, and monitoring it in real time.

Grace: How do you go about generating ideas for trading systems and/or teaching those to your clients?

Yves: We focus on topics like artificial intelligence and machine learning algorithms, but we also cover traditional strategies based on simple moving averages, momentum, and mean reversion. If we think for a moment about the machine learning side we have an elegant situation as traders. Originally, people have relied on a chartist methodology for analysis, but the nice thing about machine learning algorithms is that you don’t even need to teach them a pattern – they come up with their own patterns. Instead of the 20 patterns a single person can handle, a machine easily tests twenty thousand different patterns and evaluates performance over time in sample and out of sample. In a sense we’re no longer using our brains to generate ideas but rather we use our brains to deploy the technology to come up with the ideas. Essentially, the idea generation is done by the machine.

…the nice thing about machine learning algorithms is that you don’t even need to teach them a pattern –  they come up with their own patterns

Grace: Where do you believe are the best places for retail systematic traders to look for data?

Yves: That depends on what you want to trade. For example, FXCM is one of the sole sources I’m aware of for easily accessible and free tick data, which is something you typically don’t get from other places. Depending on what you want to do, what instruments you want to trade, and what the time frame is, I think the resources differ. Generally when retail traders work with a certain platform they have access via API to the data they need for proper backtesting.

Grace: We know there are a lot of open source tools out there from backtesters to data visualization tools. Are there any particular tools you like?

Yves: Well of course I like Python and the ecosystem. When we think of what kind of categories you see in the Python ecosystem, you have the base technology, specifically the CPython interpreter which comes with additional packages which are generally known as the “standard library”. Then there is the scientific data stack which is typically used in most scientific communities as well as in finance and this includes some of the tools like the ones you mentioned such visualization tools. We have, for instance, a very powerful data analysis package called pandas in our ecosystem. On the third level you have dedicated solutions for backtesting, calculating statistics for trading strategies and so forth. One company that’s very active in this regard is Quantopian, they have a suite of open source tools that support, among others, backtesting of algorithmic trading strategies and risk management for such strategies. I’m a big fan of open source technology in this regard, and the Python ecosystem is an unbeatable space for what we need in the field of algo trading.

The Python ecosystem is an unbeatable space for what we need in the field of algo trading

Grace: You’ve written popular books on Python for quant finance: there is Python for Finance, Derivative Analytics with Python and Listed volatility and Variance Derivatives. Which would you recommend for newer quant traders and are there books for more experienced client traders?

Yves: The bestselling book of the three you mentioned is Python for Finance with O’Reilly, which is a reference book for people who want to apply Python to finance. I think this book is the best both for the starters as well as those who are advanced in trading or in Python. The second edition of the book will come out probably in the fourth quarter of 2018. The other books are more focused on quant finance in the sense that you learn methods required for option hedging and the calibration of options models.

I think proper foundations with regard to education are indispensable…

Grace: From your experience what advice do you have for those looking to get started  in the quantitative trading field?

Yves:   I recently saw a statistic that said from the 50 leading computer science departments in the United States, 40 already use Python to introduce students to programming. This used to be Java, but Python is a really good to learn different programming paradigms, like object orientation, so it’s a good language to start with. Python shouldn’t be the only language you learn, but if you only have time to master one then you should focus on Python. Whenever people ask me what they should study, I say the more formal the education, the better. I also think proper educational foundations are indispensable, and I will always recommend to master the basics. Whether on the buy side as a quant analyst/developer or as a retail quant trading your own money — I think this holds true for all types of traders. The more formal the education you have, the better equipped you are to become a quantitative trader.

Ready to try it yourself?

Call live and historical prices, execute trades, and more on FXCM’s REST API using the fxcmpy Python wrapper. Get your free API token and start algo trading today! To generate your token:

  1. Register for a free practice account here.
  2. Log into fxcm.com and click on the account ID in the upper right corner.
  3. Click token management and generate your token.

Risk Warning: The FXCM Group does not guarantee accuracy and will not accept liability for any loss or damage which arise directly or indirectly from use of or reliance on information contained within the webinars. The FXCM Group may provide general commentary which is not intended as investment advice and must not be construed as such. FX/CFD trading carries a risk of losses in excess of your deposited funds and may not be suitable for all investors. Please ensure that you fully understand the risks involved.