Chapter 11. Mathematical Tools
The mathematicians are the priests of the modern world.
Bill Gaede
Since the arrival of the so-called Rocket Scientists on Wall Street in the 1980s and 1990s, finance has evolved into a discipline of applied mathematics. While early research papers in finance came with lots of text and few mathematical expressions and equations, current ones are mainly comprised of mathematical expressions and equations with some explanatory text around.
This chapter introduces some useful mathematical tools for finance, without providing a detailed background for each of them. There are many useful books available on this topic, so this chapter focuses on how to use the tools and techniques with Python. In particular, it covers:
- “Approximation”
-
Regression and interpolation are among the most often used numerical techniques in finance.
- “Convex Optimization”
-
A number of financial disciplines need tools for convex optimization (for instance, derivatives analytics when it comes to model calibration).
- “Integration”
-
In particular, the valuation of financial (derivative) assets often boils down to the evaluation of integrals.
- “Symbolic Computation”
-
Python provides with
SymPy
a powerful package for symbolic mathematics, for example, to solve (systems of) equations.
Approximation
To begin with, the usual imports:
In
[
1
]:
import
numpy
as
np
from
pylab
import
plt
,
mpl
In
[
2
]:
plt
.
style
.
use
(
'seaborn'
)
mpl
.
rcParams
[
'font.family'
]
=
'serif'
%
matplotlib
inline
Throughout ...
Get Python for Finance, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.