Finance has always been an industry that stays up-to-date on the latest advances, from deep learning and quantum computing to the blockchain and beyond. This is why programming for finance has come to be so crucial.
Financial analysts and finance professionals long ago started adopting programming as an important part of their toolkit, as this affords many opportunities to reduce work, automate important procedures, and seek out an edge.
But what is programming for finance, and how does it work? Today, this will be our focus. We’ll start with a broad overview of programming languages before turning to a more detailed discussion of which languages you should consider learning.
An Introduction to Programming Languages
Programming skills are more and more in demand in financial institutions, financial services companies, and the banking industry. Before we get into specifics, let’s first talk a little bit about what programming languages are and why they matter.
A programming language is essentially a textual interface for sending instructions to a computer. Computers don’t understand natural-language commands like “build an app” or “analyze the end-of-day stock prices for ACME Corp.” Instead, they must be given a step-by-step sequence of actions to take in order to accomplish a particular goal.
While it is perhaps true that the rise of large language models like ChatGPT has called the accuracy of this claim into question, it remains broadly true for most of the work that quants and financial analysts do.
Once you’ve written your sequence of actions in a programming language, like Python or Java, a compiler will break it down into machine language, i.e., “1”s and “0”s. While it is technically possible to program directly in this language, it’s exceedingly difficult, which is why computer scientists built programming languages in the first place.
You may have encountered the distinction between “high-level” and “low-level” programming languages, and this refers to how far away from machine language it is. Assembly, for example, is so low level that it hovers almost directly over the actual silicon chips that form a computer’s brain, while a language like Python is so high level that it can almost be read like English.
There are many differences between high-level and low-level programming languages. High-level languages tend to have a much simpler syntax, for example, and automatically handle tasks like memory management and garbage collection that low-level languages leave to developers.
Naturally, there are trade-offs involved. A high-level language might be very hard to optimize for high-frequency trading applications, while a low-level language might involve so few simplifying abstractions that the codebase is exceedingly difficult to maintain.
It’s also worth covering the difference between “front-end” and “back-end” development. As its name implies, the front-end work goes out front and will consist of things like a program’s web interface or the dashboard it offers to computational finance experts for making charts.
Similarly, back-end development tends to be hidden away from end users. It concerns how data structures are managed and updated, how they’re stored in databases, how an application’s API is defined and served up, etc.
A full-stack engineer is generally someone who knows how to work across both front-end and back-end technology stacks.
Common Features of Programming Languages
Let’s talk a little about some general properties of modern programming languages that are worth understanding regardless of which language you use.
First, you’ll generally be doing your development inside of a “framework,” which is basically an interface that makes it easier to write code. You could write your code in a simple text editor, but good frameworks offer things like syntax highlighting, various security features, and debugging tools, which make the job much easier.
Second, there are more abstract “design patterns,” which are common ways of accomplishing tasks that embody best practices, make code easier to maintain, increase portability, etc.
Third, it’s worth mentioning the concept of “dependency.” A dependency is exactly what it sounds like — it’s when one application or piece of code requires another to run. Suppose a data scientist does some simple data processing in Pandas as part of a project. Pandas has now become a dependency, which means that if there are major changes to Pandas down the line, it could introduce problems. All of this belongs to a subfield known as “dependency management,” and though it’s beyond the scope of this piece, it’s a term you should know.
Finally, to cap off this section, we want to briefly mention Github. Github is a version-control system that is extremely popular for software development and software engineering. Essentially, it allows you to save your project at a particular stage of development. If you build a natural-language processing algorithm that works on financial news and then somehow break it, you can roll back to the last working version and try again. You can also share your progress with other developers, who can “fork” your project and introduce their own upgrades.
Object-Oriented Programming (OOP) for Financial Engineering
The final topic we’ll cover is object-oriented programming, and it’s important enough to get its own section.
As you’re wrapping your head around software engineering, there are lots of ways to categorize programming languages — how they handle data types, for instance. But whether they’re object-oriented or not is one of the most important. In the next section we’re going to talk about Python, Javascript, Java, C++, and Visual Basic for Applications (VBA), and every single one of them is an object-oriented programming language.
In fact, I’d go further and say that as you explore software development in the finance industry, there is little chance you’ll see anything other than an object-oriented programming language (unless you happen to wander into a legacy codebase written in old-school Cobol).
In essence, object-oriented programming is built around objects (as opposed to functions or procedures). In Python, for example, everything from strings to arrays is an object, meaning that they are tagged with useful metadata and have methods you can use to manipulate them.
There are a number of advantages to this philosophy. OOP enables polymorphism, for example, which refers to the ability of certain languages to have functions that can accept and operate on different data types at different points in their runtime. This may sound awfully fancy, but the basic point is that users will see a consistent interface even as the data they’re interacting with changes, reducing the cognitive load required for them to understand what’s going on.
Which Programming Languages Should an Aspiring Quant Know About?
Now that we have covered the fundamentals, let’s discuss the handful of popular programming languages that are most often used in places like investment banks.
Python
The big one you should be aware of is Python. Python is a general-purpose open-source programming language useful for everything from basic scripting work to advanced artificial intelligence applications. Its basic syntax, ease of use, and thriving ecosystem make it an ideal tool for a wide variety of programming tasks, including finance.
We should dwell for a moment on the Python ecosystem because it’s important. There are many situations in which you’ll need to write bespoke code to get a particular job done, but it’s often possible to use a library someone else has written in order to ship faster. Just about every language has external libraries of this kind, but Python is simply extraordinary in the range of such libraries on offer.
There are Python libraries for derivatives pricing, options pricing, and thousands of other things. You will often need to evaluate these libraries to make sure they’re high-quality enough for your situation, but that’s almost always going to take less time than writing them from scratch yourself.
Javascript
Javascript is another language you should be aware of. Though it’s better known as a language for front-end web development, it’s general-purpose, like Python, and can therefore be used to build anything from simple visualization dashboards to full-bore algorithmic trading platforms. And, also like Python, it has an ecosystem of ancillary tools and libraries you can utilize, including ones aimed squarely at financial analysis.
Java
Java is an object-oriented programming language that was introduced in the 1990s by James Gosling. Today, it powers billions of devices, and the Java Virtual Machine on which it runs is available from many places, including Oracle.
Java programming has a steeper learning curve than either Python or Javascript, but it is nevertheless an enormously powerful tool. Java developers can write code for simple financial apps as well as more advanced use cases, like Monte Carlo methods and Monte Carlo simulations.
Visual Basic for Applications
Visual Basic for Applications (VBA) is developed and maintained by Microsoft. Unlike any of the other programming languages we’ve discussed, VBA functions inside of Microsoft products like Excel and is not available by itself. Nevertheless, if you know how much of the financial industry runs on spreadsheets, you know it is still something that should be on your radar.
Structured Query Language
Finally, as a bonus, we’ll discuss the Structured Query Language (SQL). SQL isn’t a proper programming language the way Java is, its sole function is to structure queries so as to get useful information from a database. Using commands like “SELECT,” you can access tables, perform filtering operations, and even do rudimentary financial analysis, as in the (made-up) example below:
SELECT AVG(returns)
FROM some_table_of_financial_information
WHERE year=2023
How Is Programming Used in Financial Data Analysis?
Financial analysis used to use a tool like Excel spreadsheets for this kind of work (and many still do). With the rise of data science, however, it’s become more common for data analytics to be done with tools like Jupyter Notebooks and Python scripts.
This has also been necessitated by the rise of big data, where there might be so much information that a spreadsheet is very slow to load or otherwise unwieldy. Modern data analysts are wont to do their data analytics with tools that are up to handling the load, such as PySpark.
Is Programming Useful in Financial Modeling?
Hedge funds, experts in the banking industry, and quantitative finance professionals usually do their work based on financial models. It would be hard to overstate how important financial models are in finance. Volatility models factor into risk management strategies, capital asset pricing models are used in event studies, and models show up in equity analysis, to name a few examples.
Not all of this is done with a programming language, but almost all of it can be, which means you can bring in all the other tools that programming offers, from machine learning algorithms to version control to automation.
It’s hard for us to outright guarantee that programming will be useful if you’re asked to do financial modeling work, but there’s a very good chance that it will be.
FAQs About Programming for Finance
Now that we’ve made it through the dense material above, let’s spend our remaining time answering some common high-level questions about programming for finance.
How Can I Learn More About Programming for Finance?
There are many ways to learn about programming for finance. To begin with, there are thousands of articles and tutorials covering topics like ARCH-based volatility modeling. You can pick up knowledge by reading through code, such as the Java library for working with the Black-Scholes equation.
If books are more your speed, there are a few publishing houses that specialize in technical content. The best-known is O’Reilly Media, but there is also Manning Publications, Pakt, and others.
If you’re interested in being one of the finance professionals who can also call themselves programmers, you might consider attending a bootcamp. There are general-purpose bootcamps aimed at data science and software engineering and at least a few oriented specifically at finance, such as the University of Denver Fintech Bootcamp.
What Programming Language Is Used in Finance?
There are many coding languages used in programming for finance, with some of the more popular being Python, Javascript, and Java.
In truth, however, if you’re looking to do something like create a crypto trading system you can probably do that in any general-purpose programming language.
Does Finance Use C++ Programming?
One programming language we haven’t discussed yet, but which warrants a mention, is C++. Like Python, C++ is object-oriented, which means the C++ code offers things like C++ classes that make it easy to encapsulate functionality and build more streamlined applications.
C++ developers can also avail themselves of the standard template library, which contains many different data structures, algorithms, etc., for solving common tasks. If you recall the section on design patterns from earlier, this has a similar purpose.
A great resource for learning to use C++ programming in finance is Daniel Hanson’s “Modern C++ for Finance,” from O’Reilly Media.
How Are Blockchain and Fintech Applications Being Used in Finance?
No article on programming for finance would be complete without a section on blockchain and fintech. It seems like every week some hot new startup releases a novel layer-1 blockchain oriented around a particular use case, and financial professionals should be at least vaguely aware of this space.
First, it’s worth distinguishing between “fintech” and “blockchain.” Fintech is short for “financial technology” and can refer to lending platforms, trading systems, and similar offerings. Blockchain is a kind of fintech, but they’re not the same thing.
There are now many blockchains, but the purpose of the original Bitcoin blockchain was to provide a means by which two or more parties could exchange value in a pseudonymous, censorship-resistant way. All such transactions were stored on an immutable, distributed public ledger; when combined with public-key cryptography, this ensured their validity while obviating the risk of double-spending.
Blockchain and fintech more generally are fast-evolving spaces that are of great (and growing) interest to the financial industry.
Getting Into Programming for Finance
As important as programming has become for finance, it’ll likely only become more important in the future. From algorithmic trading systems to volatility analysis and beyond, programming makes it much easier to build apps and software oriented toward solving financial problems.
But your systems are only as good as your data, and that’s where Tiingo comes in. We’re a world-class provider of financial data that can help you build bleeding-edge systems utilizing the most up-to-date information. Check out our APIs, and sign up for an account today!
Leave a Reply