Chapter 7. Where to Go From Here?

An investment in knowledge pays the best interest.

Benjamin Franklin

Congratulations. You have reached the final chapter of the book. If you have followed the chapters diligently, you have encountered already many important ideas and concepts in both financial theory and Python programming. That is great. The topics covered in this book, both with regard to breadth and depth, represent good starting points for exploring the exciting and fast changing world of computational finance. However, there is much more to explore and learn. This final chapter provides suggestions for moving on and going deeper in one or several directions in Python for finance.

Mathematics

This book makes use of different mathematical tools and techniques, such as from linear algebra, econometrics or optimization theory. The tools and techniques applied to financial problems are fairly standard and do not require advanced mathematical skills to be put to beneficial use with Python. However, modern finance can be considered an applied mathematics discipline, with some areas relying heavily on advanced mathematics — such as option pricing or financial risk management.

The following list provides references for several standard text books that can be used to improve your mathematical skills for finance:

  • Aleskerov, Fuad, Hasan Ersel and Dmitri Piontkovski (2011): Linear Algebra for Economists. Springer, Heidelberg et al.

  • Bhattacharya, Rabi and Edward Waymire (2007): A Basic Course in Probability Theory. Springer Verlag, New York.

  • Jacod, Jean and Philip Protter (2004): Probability Essentials. Springer, Berlin and Heidelberg.

  • Pemberton, Malcolm and Nicholas Rau (2016): Mathematics for Economists — An Introductory Textbook. 4th ed., Manchester University Press, Manchester and New York.

  • Protter, Philip (2005): Stochastic Integration and Differential Equations. 2nd ed., Springer Verlag, Berlin/Heidelberg.

  • Rudin,Walter (1987): Real and Complex Analysis. 3rd ed., McGraw-Hill, London.

  • Sundaram, Rangarajan (1996): A First Course in Optimization Theory. Cambridge University Press, Cambridge.

  • Williams, David (1991): Probability with Martingales. Reprint 2001, Cambridge University Press, Cambridge.

Financial Theory

Finance is a vast domain with many different specializations. This book covers some of the most important and popular financial models, such as the Mean-Variance Portfolio Theory, the Capital Asset Pricing Model and the Black-Scholes-Merton option pricing model. More generally speaking, it covers simple and more realistic static model economies (with two points in time only) as well as dynamic model economies to allow for uncertainty to resolve gradually over time. There are whole areas in mathematical finance that are not covered, however, such as continuous time models for option pricing which require additional, more advanced mathematical tools.

The following list provides several basic finance books that can be used to get a broader overview of topics in financial theory and their underpinnings in economics:

  • Copeland, Thomas, Fred Weston and Kuldepp Shastri (2005): Financial Theory and Corporate Policy. 4th ed., Addison Wesley, Boston et al.

  • Eichberger, Jürgen and Ian Harper (1997): Financial Economics. Oxford University Press, New York.

  • Milne, Frank (1995): Finance Theory and Asset Pricing. Oxford University Press, New York.

  • Markowitz, Harry (1959): Portfolio Selection — Efficient Diversification of Investments. John Wiley & Sons, New York et al.

  • Pliska, Stanley (1997): Introduction to Mathematical Finance. Blackwell Publishers, Malden and Oxford.

  • Rubinstein, Mark (2006): A History of the Theory of Investments. Wiley Finance, Hoboken.

  • Varian, Hal (1992): Microeconomic Analysis. 3rd ed., W.W. Norton & Company, New York and London.

For those who want to dig deeper into advanced mathematical modeling in finance, the following list provides several advanced text books about mathematical finance:

  • Baxter, Martin and Andrew Rennie (1996): Financial Calculus — An Introduction to Derivative Pricing. Cambridge University Press, Cambridge.

  • Björk, Tomas (2004): Arbitrage Theory in Continuous Time. 2nd ed., Oxford University Press, Oxford.

  • Delbaen, Freddy and Walter Schachermayer (2006): The Mathematics of Arbitrage. Springer Verlag, Berlin.

  • Duffie, Darrell (2001): Dynamic Asset Pricing Theory. 3rd ed., Princeton University Press, Princeton.

  • Duffie, Darrell (1988): Security Markets — Stochastic Models. Academic Press, San Diego et al.

  • Elliot, Robert and Ekkehard Kopp (2005): Mathematics of Financial Markets. 2nd ed., Springer Verlag, New York.

  • Glasserman, Paul (2004): Monte Carlo Methods in Financial Engineering. Springer Verlag, New York.

Without doubt, it is also often rewarding and illuminating to read the seminal finance articles from which the financial models and theories originated. You will also find that many of these articles are surprisingly accessible. The following list references such articles, the selection of which is inspired by the topics and methods covered in this book:

  • Black, Fischer and Myron Scholes (1973): “The Pricing of Options and Corporate Liabilities.” Journal of Political Economy, Vol. 81, No. 3, 638–659.

  • Boyle, Phelim (1977): “Options: A Monte Carlo Approach.” Journal of Financial Economics, Vol. 4, No. 4, 322–338.

  • Cox, John and Stephen Ross (1976): “The Valuation of Options for Alternative Stochastic Processes.” Journal of Financial Economics, Vol. 3, 145-166.

  • Cox, John, Jonathan Ingersoll and Stephen Ross (1985): “A Theory of the Term Structure of Interest Rates.” Econometrica, Vol. 53, No. 2, 385–407.

  • Cox, John, Stephen Ross and Mark Rubinstein (1979): “Option Pricing: A Simplified Approach.” Journal of Financial Economics, Vol. 7, No. 3, 229–263.

  • Duffie, Darrell (1986): “Stochastic Equilibria: Existence, Spanning Number, and the `No Expected Gains from Financial Trade´ Hypothesis.” Econometrica, Vol. 54, No. 5, 1161-1183.

  • Harrison, Michael and David Kreps (1979): “Martingales and Arbitrage in Multiperiod Securities Markets.” Journal of Economic Theory, Vol. 20, 381–408.

  • Harrison, Michael and Stanley Pliska (1981): “Martingales and Stochastic Integrals in the Theory of Continuous Trading.” Stochastic Processes and their Applications, Vol. 11, 215–260.

  • Heston, Steven (1993): “A Closed-Form Solution for Options with Stochastic Volatility with Applications to Bond and Currency Options.” The Review of Financial Studies, Vol. 6, No. 2, 327–343.

  • Longstaff, Francis and Eduardo Schwartz (2001): “Valuing American Options by Simulation: A Simple Least Squares Approach.” Review of Financial Studies, Vol. 14, No. 1, 113–147.

  • Markowitz, Harry (1952): “Portfolio Selection.” Journal of Finance, Vol. 7, No. 1, 77-91.

  • Merton, Robert (1976): “Option Pricing when the Underlying Stock Returns are Discontinuous.” Journal of Financial Economics, No. 3, Vol. 3, 125-144.

  • Perold, André (2004): “The Capital Asset Pricing Model.” Journal of Economic Perspectives, Vol. 18, No. 3, 3-24

  • Protter, Philip (2001): “A Partial Introduction to Financial Asset Pricing Theory.” Stochastic Processes and their Applications, Vol. 91, 169–203.

  • Sharpe, William (1964): “Capital Asset Prices: A Theory of Market Equilibrium under Conditions of Risk.” The Journal of Finance, Vol. 19, No. 3, 425-442.

For those looking for a single, comprehensive reference, the Market Risk Analysis book collection might be worth having a closer look:

  • Alexander, Carol (2008): Market Risk Analysis I — Quantitative Methods in Finance. John Wiley & Sons, Chicester.

  • Alexander, Carol (2008): Market Risk Analysis II — Practical Financial Econometrics. John Wiley & Sons, Chicester.

  • Alexander, Carol (2008): Market Risk Analysis III — Pricing, Hedging and Trading Financial Instruments. John Wiley & Sons, Chicester.

  • Alexander, Carol (2008): Market Risk Analysis IV — Value-at-Risk Models. John Wiley & Sons, Chicester.

Python Programming

Nowadays, there is a large number of resources available to learn Python programming. The following books have proven to be useful for myself. When it comes to getting a better Python programmer in general and you want to pick only one from the list, you should go with the book by Ramalho (2021) which dives deep into the Python programming language itself.

  • McKinney, Wes (2017): Python for Data Analysis. 2nd ed., O’Reilly, Sebastopol et al.

  • Harrison, Matt (2017): Illustrated Guide to Python 3: A Complete Walkthrough of Beginning Python with Unique Illustrations Showing how Python Really Works. http://hairysun.com.

  • Ramalho, Luciano (2021): Fluent Python. 2nd ed., O’Reilly, Sebastopol et al.

  • Ravenscroft, Anna, Steve Holden, Alex Martelli (2017): Python in a Nutshell. 3rd ed., O’Reilly, Sebastopol et al.

  • VanderPlas, Jake (2016): Python Data Science Handbook. O’Reilly, Sebastopol et al.

Python for Finance

This book is my sixth book about Python applied to finance. You might wonder: “Why does the most basic, introductory text book comes only after the five other, more advanced text books?” There is probably not a short, simple answer. However, the writing of this book, Financial Theory with Python, was motivated by requests from my readers of the other books and from our training program participants. Many were looking for a gentle introduction to both finance and Python programming — complementing the other books.1 Therefore, Financial Theory with Python introduces both topics from scratch and thereby closes the initial gap, say, to get started with the book Python for Finance, which expects both some background in finance and programming from the reader.

My other five books are:

  • Hilpisch, Yves (2020): Artificial Intelligence in Finance: A Python-Based Guide. O’Reilly, Sebastopol et al.

  • Hilpisch, Yves (2020): Python for Algorithmic Trading: From Idea to Cloud Deployment. O’Reilly, Sebastopol et al.

  • Hilpisch, Yves (2018): Python for Finance: Mastering Data-Driven Finance. 2nd ed., O’Reilly, Sebastopol et al.

  • Hilpisch, Yves (2017): Listed Volatility and Variance Derivatives: A Python-Based Guide. Wiley Finance.

  • Hilpisch, Yves (2015): Derivatives Analytics with Python: Data Analysis, Models, Simulation, Calibration and Hedging. Wiley Finance.

Financial Data Science

Data Science has become an important discipline and function in basically every industry. In the same way, Financial Data Science has developed to a core discipline and function in finance. Ever increasing data volumes make the application of more advanced and sophisticated data logistics and management approaches necessary. Excel spreadsheets are for sure not enough anymore. My book Python for Finance is primarily about Python for Financial Data Science. Relevant topics that are covered in parts II and III of this book include: Data Types and Structures, Numerical Computing with NumPy, Data Analysis with pandas, Object-Oriented Programming, Data Visualization, Financial Time Series, Input/Output Operations, Performance Python, Mathematical Tools, Stochastics, and Statistics (incl. basic Machine Learning). After you have finished Financial Theory with Python, the book Python for Finance represents a natural next step in leveling up your Python skills.

Algorithmic Trading

Systematic or Algorithmic Trading has become the standard not only for hedge funds but even for many retail traders. The availability of powerful APIs, even to retails traders with smaller budgets, has given rise to a proliferation of algorithmic trading strategies — and this practically across all asset classes. While larger financial institutions in general have dedicated teams for every step of the trading process — from data analysis, research and backtesting to deployment, monitoring and risk management — retail traders generally need to take care of all of this on their own.

What a few years back might have seem an almost impossible endeavor for a single person, can nowadays be relatively easily accomplished due to the powerful ecosystem of Python. Retails traders with Python programming skills can in principle set up an algorithmic trading operation within weeks or even days. My book Python for Algorithmic Trading covers the main Python skills required in this context and leads the reader from data management and idea generation to the backtesting of strategies and their automated deployment in the cloud.

Part IV of Python for Finance also covers key skills in Python for algorithmic trading. While not as detailed as Python for Algorithmic Trading, readers should nevertheless be able, based on the self-contained resources in Python for _Finance, to efficiently generate and deploy a trading strategy that places trades automatically.

For both the Python for Algorithmic Trading book and part IV of Python for Finance, it is helpful but not necessarily required if the reader has studied Financial Theory with Python and Python for Finance (parts I, II, and III) beforehand.

Computational Finance

Quantitative and Computational Finance have long been dominated by compiled programming languages, such as C or C++. This is because the speed of the execution of oftentimes complex numerical computations and simulations is of the essence — in particular when scalability is required by larger financial institutions. While pure Python might indeed be too slow to implement, say, computationally demanding simulation algorithms, packages such as NumPy and pandas allow much faster execution times when used appropriately. Such packages provide high level programming APIs to functionality that is implemented in performant C code in general. This often allows for speed-ups compared to pure Python code of 10-30 times, making Python plus specialized packages a valid alternative also for computational finance these days.

My book Derivatives Analytics with Python introduces the major mathematical and financial concepts required to price and hedge derivatives in a market-based way — that is based on market-calibrated pricing models. The book provides a self-contained Python code base that implements all algorithms and techniques from scratch, making heavy use of the capabilities of NumPy. Those having read Financial Theory with Python and Python for Finance (parts I, II, and III) are well equipped to deepen their knowledge in mathematical and computational finance with Derivatives Analytics with Python.

Part V of Python for Finance develops a simple version of my derivatives pricing library DX Analytics (https://dx-analytics.com). It shows how the concepts, approaches, and numerical methods from Derivatives Analytics with Python can be used to create a flexible and powerful pricing library based on Monte Carlo simulation. Those who need additional models and even more capabilities — such as for risk measurement and management — can, of course, use the DX Analytics open source package itself.

Volatility as an asset class has become quite important over recent years. Be it to manage risk or to generate additional alpha, listed volatility and variance derivatives are used around the globe in systematic fashion. The book Listed Volatility and Variance Derivatives introduces the main concepts of trading and pricing such financial instruments and provides a self-contained Python code base illustrating all concepts — such as the model-free replication of variance or the calculation volatility indexes — in an easy-to-reproduce way.

Artificial Intelligence

It is safe to assume that Artificial Intelligence (AI) will play a dominant role in finance in the future, as it does already in so many other industries. Basically every financial institution has initiated projects to explore the potential of AI to improve operations, to save costs, to generate alpha, and so forth. Algorithms from machine learning, deep learning, and reinforcement learning are basically tested and in use in every field of finance. Researchers and academics are also publishing papers at the intersection of AI and finance with ever increasing speeds.

My book Artificial Intelligence in Finance provides in part I background and historical information about AI and its success stories. It proceeds in part II to discuss traditional financial theory and recent advances in the field such as data-driven finance and AI-first finance. Part II also discusses machine learning as a process. Part III of the book introduces and discusses major models and algorithms from deep learning, such as Dense Neural Networks (DNNs), Recurrent Neural Networks (RNNs) and Reinforcement Learning (Q-Learning). Part IV of the book illustrates how statistical inefficiencies in financial markets can be economically exploited through algorithmic trading, that is by a trading bot who interactively learns how to trade based on a Q-Learning algorithm. Part V of the book discusses consequences of AI-first finance for the competitive landscape in the financial industry. It also discusses the possibility of a financial singularity — that is, a point in time from which on an Artificial Financial Intelligence (AFI) exists that, for example, can generate (almost) perfect predictions about future prices in the markets.

The book Artificial Intelligence in Finance can be considered complementary to the book Python for Algorithmic Trading in that it discusses in detail the formulation, backtesting, and risk management of AI-powered algorithmic trading strategies. However, readers do not have to have read the algorithmic trading book before diving into the fascinating world of AI in finance. However, a solid understanding of Python for finance, based on this book and parts I to III of Python for Finance, for sure is helpful.

Other Resources

You might have noticed that this section discusses only my own books about Python for finance. The very purpose of this section is to guide the reader who has finished this book through my other works. For sure, there are many other resources in book form available today that cover, for example, Python topics related to finance or machine learning algorithms as applied to finance. While other authors also offer valuable content and guidance, readers who like this book will probably also like my other books since they are similar in style and approach.

While some readers learn efficiently based on books and the accompanying code only, others like a more interactive, guided learning experience. My company The Python Quants GmbH offers since years comprehensive online training programs that teach the skills from my books and much more in a systematic, structured way. There are three different online training programs available at the time of this writing:

These three programs can also be combined in a single program for those who benefit from all core topics (https://home.tpq.io/certificates).

Final Words

Congratulations again. With Financial Theory with Python you have laid the foundations for your next exciting steps with Python for finance. This chapter provides a wealth of resources for you to explore. If you see Python for finance as a skill that you train regularly, diligently, and systematically, you will probably reach black belt level some time soon. Such an achievement is not only personally rewarding, it also guarantees you a successful future because Python for finance has become undoubtedly a key skill in the financial industry. May the Python force be with you.

1 I like to think of this book as being what The Hobbit by J.R.R. Tolkien is to his Lord of the Rings trilogy. Of course, there is no literary comparison implied here.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
54.234.6.167