Programming Languages for Quants

Programming Languages for Quants

Jayati WALIA

In this article, Jayati WALIA (ESSEC Business School, Grande Ecole Program – Master in Management, 2019-2022) presents an overview of popular programming languages used in quantitative finance.

Introduction

Finance as an industry has always been very responsive to new technologies. The past decades have witnessed the inclusion of innovative technologies, platforms, mathematical models and sophisticated algorithms solve to finance problems. With tremendous data and money involved and low risk-tolerance, finance is becoming more and more technological and data science, blockchain and artificial intelligence are taking over major decision-making strategies by the power of high processing computer algorithms that enable us to analyze enormous data and run model simulations within nanoseconds with high precision.

This is exactly why programming is a skill which is increasingly in demand. Programming is needed to analyze financial data, compute financial prices (like options or structured products), estimate financial risk measures (like VaR) and test investment strategies, etc. Now we will see an overview of popular programming languages used in modelling and solving problems in the quantitative finance domain.

Python

Python is general purpose dynamic high level programming language (HLL). It’s effortless readability and straightforward syntax allows not just the concept to be expressed in relatively fewer lines of code but also makes it’s learning curve less steep.

Python possesses some excellent libraries for mathematical applications like statistics and quantitative functions such as numpy, scipy and scikit-learn along with the plethora of accessible open source libraries that add to its overall appeal. It supports multiple programming approaches such as object-oriented, functional, and procedural styles.

Python is most popular for data science, machine learning and AI applications. With data science becoming crucial in the financial services industry, it has consequently created an immense demand for Python, making it a programming language of top choice.

C++

The finance world has been dominated by C++ for valid reasons. C++ is one of the essential programming languages in the fintech industry owing to its execution speed. Developers can leverage C++ when they need to programme with advanced computations with low latency in order to process multiple functions fasters such as in High Frequency Trading (HFT) systems. This language offers code reusability (which is crucial in multiple complex quantitative finance projects) to programmers with a diverse library comprising of various tools to execute.

Java

Java is known for its reliability, security and logical architecture with its object-oriented programming to solve complicated problems in the finance domain. Java is heavily used in the sell-side operations of finance involving projects with complex infrastructures and exceptionally robust security demands to run on native as well as cross-platform tools. This language can help manage enormous sets of real-time data with the impeccable security in bookkeeping activity. Financial institutions, particularly investment banks, use Java and C# extensively for their entire trading architecture, including front-end trading interfaces, live data feeds and at times derivatives’ pricing.

R

R is an open source scripting language mostly used for statistical computing, data analytics and visualization along with scientific research and data science. R the most popular language among mathematical data miners, researchers, and statisticians. R runs and compiles on multiple platforms such as Unix, Windows and MacOS. However, it is not the easiest of languages to learn and uses command line scripting which may be complex to code for some.

Scala

Scala is a widely used programming language in banks with Morgan Stanley, Deutsche Bank, JP Morgan and HSBC are among many. Scala is particularly appropriate for banks’ front office engineering needs requiring functional programming (programs using only pure functions that are functions that always return an immutable result). Scala provides support for both object-oriented and functional programming. It is a powerful language with an elegant syntax.

Haskell and Julia

Haskell is a functional and general-purpose programming language with user-friendly syntax, and a wide collection of real-world libraries for user to develop the quant solving application using this language. The major advantage of Haskell is that it has high performance, is robust and is useful for modelling mathematical problems and programming language research.

Julia, on the other hand, is a dynamic language for technical computing. It is suitable for numerical computing, dynamic modelling, algorithmic trading, and risk analysis. It has a sophisticated compiler, numerical accuracy with precision along with a functional mathematical library. It also has a multiple dispatch functionality which can help define function behavior across various argument combinations. Julia communities also provide a powerful browser-based graphical notebook interface to code.

Related posts on the SimTrade blog

   ▶ Jayati WALIA Quantitative Finance

   ▶ Jayati WALIA Quantitative Risk Management

   ▶ Jayati WALIA Value at Risk

   ▶ Akshit GUPTA The Black-Scholes-Merton model

Useful Resources

Websites

QuantInsti Python for Trading

Bankers by Day Programming languages in FinTech

Julia Computing Julia for Finance

R Examples R Basics

About the author

The article was written in October 2021 by Jayati WALIA (ESSEC Business School, Grande Ecole Program – Master in Management, 2019-2022).

Quantitative Finance: Introduction and Scope

Quantitative Finance: Introduction and Scope

Jayati WALIA

In this article, Jayati WALIA (ESSEC Business School, Grande Ecole – Master in Management, 2019-2022) presents an overview of Quantitative Finance.

Quantitative Finance: Introduction and Scope

Quantitative finance has become an integral part of modern finance with the advent of innovative technologies, trading platforms, mathematical models, and sophisticated algorithms. In lay man terms, it is essentially the application of high-level mathematics and statistics to finance problems. Quantitative finance majorly focuses on most frequently traded securities. The very basis of it involves observation and quantitative analysis of market prices (stock prices, exchange rates, interest rates, etc.) over time, along with applying them to stochastic models and deducing results to make security pricing, trading, risk assessment, hedging and many other investment decisions. Hence, the heavy involvement of mathematics and especially stochastic calculus. However, it is not limited to that. In fact, theories and concepts from many other disciplines including physics, computer science, etc. have contributed to put together what we know as quantitative finance today.

Brief History

It was in the 20th century that the foundations of Quantitative Finance were laid starting off with the ‘Theory of Speculation’ PhD thesis by the French mathematician Louis de Bachelier. Bachelier applied the concept of Brownian motion to asset price behavior for the first time. Later the Japanese mathematician Kiyoshi Îto wrote a paper on stochastic differential equations and founded the stochastic calculus theory that is also named after him (Îto calculus) and is widely used in option pricing. The major breakthrough however, came in the 1970s when Robert Merton’s ‘On the pricing of corporate debt: the risk structure of interest rates’ and Fischer Black and Myron Scholes’ ‘The pricing of options and corporate liabilities’ research papers were published which inherently presented a call and put option pricing model and after that there was no looking back. The Black-Sholes-Merton model known as “BSM” model is widely used and is creditable for the boom of the options market. Today many more stochastic models have been devised to extend the BSM model, setting the benchmarks of quantitative analysis higher and benefitting the global economy.

Market participants

Quantitative Finance is used by many market participants: banks, financial institutions, investors and businesses who want better and automated control over their finances given the fluctuating behavior of the assets they trade. Initially, quantitative finance was majorly used in modelling market finance problems like pricing and managing derivative products for trading, managing risk of the investments in contracts, etc. basically in the sell-side of the firms such as Investment Banking. However, with continuous advancements, we see increased usage in buy-side as well among areas like Hedge Funds and Asset Management through development of quantitative models to analyze asset behavior and predict market movements in order to leverage potential trading opportunities.

Thus, any firm or investor that deals in financial derivatives (futures and options), portfolios of stocks and/or bonds, etc. need to use Quantitative Finance. These participants have specialized analysts to work on the quantitative finance and they are generally known as Quantitative Analysts or ‘quants’. Once referred to as ‘the rocket scientists of Wall Street’, quants have sound understanding of finance, mathematics and statistics combined with the acumen of programming/coding. With the dramatic changes in industry witnessed over the past years, quants with a stellar combination of the mentioned disciplines are greatly in demand.

Types of Quants

Quants create and apply financial models for derivative pricing, market prediction and risk mitigation. There are however many variations in quant roles, some of which are explained below:

  • Front Office Quant: Work in proximity with traders and salespersons on the trade floor. Implement pricing models used by traders to spot out new opportunities and provide guidance on risk strategies.
  • Quant Researcher: Essentially the Back Office quants, they research and design high frequency algorithms, pricing models and strategies for traders and brokerage firms.
  • Quant Developer: They are essentially software developers in a financial firm. They translate business requirements provided by researchers into code applications.
  • Risk Management Quant: They build models for keeping in check credit and regulatory operations and assessing credit risk, market risk, ALM (Asset and Liability Management) risk etc. They are the Middle Office quants and perform risk analysis of markets and assets and stress testing of the models too.

The Future of Quantitative Finance

Quants and Quantitative finance are here to stay! With firms becoming larger than life and the tremendous data and money involved, the scope and demand for quantitative finance is escalating like never before. Quantitative Finance is no more just about complex mathematics and stochastic models. With finance becoming more technical, data science, machine and deep learning and artificial intelligence are taking over the domain’s informative decision-making strategies. Thus, quantitative finance is being driven to new heights by the power of high processing computer algorithms that enable us to analyze enormous data and run model simulations within nanoseconds. To quote Rob Arnott, American entrepreneur and founder of Research Affiliates: “To a man with a hammer, everything looks like a nail. To a quant, anything that can’t be quantified is ignored. And historical data is our compass, even though we know that past performance is no guarantee of future results.”

Useful resources

Quantitative Finance
What is Quantitative Finance?
2020 Quants predict next decade in global finance

Related Posts

About the author

The article was written in July 2021 by Jayati WALIA (ESSEC Business School, Grande Ecole – Master in Management, 2019-2022).