Professional Documents
Culture Documents
1 2 3 4 5 6 7
1 2 3 4 5 6 7
Monte Carlo
Advice
Examples: Real-
Permits greater
time risk
“realism” in adding
management;
features
nested MC methods
Hardware – e.g.,
high-performance Software – e.g.,
processors in optimized code
parallel
Disadvantage of
“off-the-shelf” MC
products
Monte Carlo
Examples
1 2 3 4 5 6 7
“Normal” SDE:
“Log-Normal” SDE:
1 2 3 4 5 6 7
Vasicek
Analysis
The Vasicek distribution describes the probability density function for the
fraction of defaulted loans within an infinitely diversified portfolio. Simple but
restrictive assumptions specify a single default probability (PD) common to each
loan and a single correlation parameter linking the behavior of all loans.
Variance test: the numerical integration and Monte Carlo simulation are two
viable methods to compute the variance of this Vasicek distribution - very
important for understanding the risk of the loan portfolio!
Code
Improvement
1 2 3 4 5 6 7
Change: Reduces
Execution Time from
117 to 28 – Big Saving!
Change: Reduces
Execution Time from
28 to 8.4 – Big Saving!
End Result is 15x Speed Improvement by Altering the Monte Carlo Inner Loop
1 2 3 4 5 6 7
Apache Spark
Implementation
A map job, takes a set of data and converts it into another set of data,
where individual elements are broken down into key/value pairs.
A reduce job takes the output from a map as input and merges together
these values to form a possibly smaller set of values.
1 2 3 4 5 6 7
Q&A