Python for Finance: Analyze Big Financial Data

(Elle) #1

Conclusions


This chapter deals with methods and techniques important to the application of Monte


Carlo simulation in finance. In particular, it shows how to generate (pseudo)random


numbers based on different distribution laws. It proceeds with the simulation of random


variables and stochastic processes, which is important in many financial areas. Two


application areas are discussed in some depth in this chapter: valuation of options with


European and American exercise and the estimation of risk measures like value-at-risk and


credit value adjustments.


The chapter illustrates that Python in combination with NumPy is well suited to


implementing even such computationally demanding tasks as the valuation of American


options by Monte Carlo simulation. This is mainly due to the fact that the majority of


functions and classes of NumPy are implemented in C, which leads to considerable speed


advantages in general over pure Python code. A further benefit is the compactness and


readability of the resulting code due to vectorized operations.

Free download pdf