Skip to main content
13 votes
Accepted

Least Squares Monte Carlo

To compute the price of an American option or a callable instrument in general, at each potential exercise date, one is required to compare its continuation value (discounted risk-neutral expectation ...
Quantuple's user avatar
  • 14.7k
10 votes
Accepted

How to simulate Levy processes

You have many different options. Firstly, you know the characteristic function for the log stock price and, using inversion, you can recover the (inverse) distribution and density function and ...
Kevin's user avatar
  • 16.2k
9 votes
Accepted

How are Brownian Bridges used in derivatives pricing in practice?

Yes, the term Brownian Bridge seems to be used loosely. I assume you are talking about continuously monitored barriers by the way, since you mention the probability of the barrier being crossed in ...
Yian Pap's user avatar
  • 521
8 votes
Accepted

rate of convergence for Monte Carlo

The estimation error is a random variable and not a simple scalar. As such, when performing one-shot assessments, you could always end up observing that using $6400$ paths provides a "better" price ...
Quantuple's user avatar
  • 14.7k
8 votes

Least Square Monte Carlo - american Call Option

If implemented properly, least-squares Monte Carlo as originally suggested by Longstaff-Schwartz should allow you to identify sub-optimal exercise dates and a lower bound of the true option price. ...
Quantuple's user avatar
  • 14.7k
8 votes
Accepted

Multithreading Monte-Carlo pricing in QuantLib for a single product

Yes, it can work. However, keep in mind that: you'll be safer if you don't share any objects between threads; see my answer here, in particular the last point; even if you use different seeds, there'...
Luigi Ballabio's user avatar
8 votes
Accepted

Why are Interest Rate Swaps not valued using Monte Carlo Simulations?

Forward rates are determined from current spot rates bootstrapped from traded instruments. The reason is that if the forwards were different from the ones inferred from the spot rates, there would be ...
David Duarte's user avatar
  • 5,835
8 votes

Limitations of Monte Carlo simulations in finance

The properties of standard Monte-Carlo are not determined solely by the underlying process. You need to include the instrument $f$ you want to price in your analysis as well. One measure for accuracy ...
g g's user avatar
  • 2,023
7 votes
Accepted

Calibration by monte carlo, should I fix my seed?

It is not cheating. It allows you to make your results (e.g. prices, calibrated parameters) 'reproducible' which is good. However, fixing the seed can hide convergence issues. When the variance of ...
Quantuple's user avatar
  • 14.7k
7 votes

Limitations of Monte Carlo simulations in finance

When I was first tasked with implementing VaR using MC in the 1990s, I knew little about MC, and there were no good books. The draft manuscript of Reuven Y. Rubinstein, Dirk P. Kroese. Simulation and ...
Dimitri Vulis's user avatar
7 votes
Accepted

Understanding Monte Carlo to solve option price with local volatility

I'm going to go through a coded example to show how you might attempt this, using the python port of the QuantLib library. It will all seem a little mechanical, but hopefully it is instructive. There ...
StackG's user avatar
  • 3,056
7 votes
Accepted

Problem with pricing a call option using the Monte Carlo Vasicek model

To make sure that I understand the problem: you are trying to price a call option expiring at time 0.5, which will exercise into a unit notional zero-coupon bond with a maturity of 1.0 at a strike (...
mmencke's user avatar
  • 845
6 votes
Accepted

How to perform Monte-Carlo simulations to price Asian options?

Instead of simulating the spot price, simulate its logarithm since the latter can be simulated exactly for any time step. \begin{equation} \ln S_{t + \Delta t} = \ln S_t + \left( r - \frac{1}{2} \...
LocalVolatility's user avatar
6 votes
Accepted

Pricing a double barrier option using Monte Carlo (C++ & Python code included)

Here are at least three mistakes in your code: p += s0 * exp(...) should be p *= exp(...). Your volatility and rates are per ...
LocalVolatility's user avatar
6 votes

Local Volatility with Monte Carlo Simulation

Let the risk-neutral dynamics under your LV model be given by $$ \frac{d S_t }{S_t } = \mu_t dt + \sigma(t,S_t) dW_t $$ Let's drop the drift contribution (not relevant here) and apply Itô's lemma to ...
Quantuple's user avatar
  • 14.7k
6 votes

Risk Neutral and Real World Valuations using Monte Carlo

You probably wonder whether $\mathbb{E}^\mathbb{P}[P_T\mid\mathcal{F}_t]= \mathbb{E}^\mathbb{Q}[P_T\mid\mathcal{F}_t]$. Note the $T$ as index, i.e. the future unknown payoff and not the current price $...
Kevin's user avatar
  • 16.2k
5 votes

How to generate simulated stock price from historical data using R?

This approach is rather crude. It only takes the mean and volatility of the historical returns and assumes a very simple model. I'm not sure if you have much experience with Time Series, but your ...
user24039's user avatar
5 votes

Do we need to derive the PDE for the option price when applying Least Squares Monte Carlo?

You do not need the PDE to implement the LSM algorithm. The $T$ maturity American call price on time $t$ is $$v_t = \max_{\tau} E_t\left[e^{-\int_t^\tau r(u) du} (S_\tau - K)^+\right]$$ where the max ...
Antoine Conze's user avatar
5 votes

Multithreading Monte-Carlo pricing in QuantLib for a single product

Adding to Luigi's answer, second point: The issue of overlapping Mersenne Twister sequences can be addressed with dynamically created Mersenne Twister Generators, cf. http://www.math.sci.hiroshima-u....
Peter Caspers's user avatar
5 votes
Accepted

Why is there a difference in American option prices when comparing pricing methods (Python)?

I've never dealt with Python, so I am just trying to understand what's going on, visually/logically. Overall it looks fine, apart from the fact that LS suggest to only use the in-the-money paths for ...
Yian Pap's user avatar
  • 521
5 votes
Accepted

Monte Carlo - Multivariate Simulation of Returns

You should apply it to the covariance matrix and from that compute the correlation matrix. Here's an example correlating 3 random normal variables. Let: $$ \bf Y \sim \mathcal N(0, \Sigma) $$ where ...
phdstudent's user avatar
  • 8,561
5 votes

Numerical simulation of Heston model

There are two mistakes in the code: 1) In the line vt[t] = np.abs(vt[t-1] + kappa*(theta-np.abs(vt[t-1]))*dt + xi*np.sqrt(np.abs(vt[t-1]))*W_v[t]) you forgot ...
Cantaro's user avatar
  • 51
5 votes

Python libraries for Monte Carlo simulations?

Try Quantlib https://www.quantlib.org, it comes with everything you need.
user34031's user avatar
  • 143
5 votes
Accepted

What is actually going on in Monte-Carlo simulation for Mortgage backed securities?

In my understanding, the mortgage prepayment option, at any point in time, is a function of the value of the mortgage from that point in time forward. This value, in turn, is a function of the future ...
Kermittfrog's user avatar
  • 7,035
5 votes

Reliable random number generation for Monte Carlo

You have misunderstood the statement in Matsumotos original paper. The original Mersenne twister guarantees, over its period of $2^{19937}-1$ (a number which I am sure you will agree is larger than ...
Forgottenscience's user avatar
5 votes

Correct Monte Carlo simulation of local volatility models

[I think] the problem is with the SDE, rather than the numerical scheme At a glance, and as I commented, I think the issue you are coming up against stems more from the underlying SDE rather than the ...
oliversm's user avatar
  • 1,399
5 votes

Monte Carlo approximation of call option on the maximum of two assets

I image you want to calculate the following payoff: $$\pi_T = \max\left[ \max(S_T^1, S_T^2) - K, 0 \right]$$ If dynamics are expressed with the following dynamic (from your code, it should be the case)...
Yoda And Friends's user avatar
5 votes
Accepted

Montecarlo pricing

Commonly, you do not use 'pure' matrix algebra when formulating a Monte Carlo valuation setup. If your options are of the European type, and you truly want to price all options in one go, you could go ...
Kermittfrog's user avatar
  • 7,035
5 votes
Accepted

Optimize interest rate swap calculations in Monte Carlo Simulation

Yes, it's possible. You can create the 100 swaps and their engines beforehand and only change the curves. If you're using the same discount curve for all swaps, you can even create just one engine ...
Luigi Ballabio's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible