# Tag Info

24

Monte Carlo is most useful when you lack analytic tractability or when you have a highly multidimensional problem. For example, even using simple lognormal and poisson models, there exist path-dependent payoffs or multi-asset computations such that no analytic solution exists and such that any PDE finite difference solution would require 3 or more ...

16

We assume that the short interest rate $r_t$ follows the Hull-White model, that is, the short rate $r$ and the stock price $S$ satisfies a system of SDEs of the form \begin{align*} dr_t &= (\theta_t -a\, r_t)dt + \sigma_0 dW_t^1,\\ dS_t &= S_t\Big[r_t dt + \sigma \Big(\rho dW_t^1 + \sqrt{1-\rho^2} dW_t^2\Big)\Big], \end{align*} where $a$, $\sigma_0$, ...

15

You have the correct approach. (1) The simulation generates sampled portfolio values, $P_1,P_2, \dots, P_n$ at time $t=T$. VaR is specified as a left-tail percentile. Order the sample as $$P_{(1)} \leq P_{(2)} \leq \dots \leq P_{(n)}.$$ If you are considering $VaR_\alpha$ at the $100(1-\alpha) \%$ confidence level , then choose the smallest integer $k$ ...

10

You are typically interested in evaluating $E\left[ f(X_T)-f(\bar{X}_T^{(n)}) \right]$ (refered as the weak convergence) $X_t$ the solution of the sde : $dX_t^x=b(X_t^x)dt+\sigma(X_t^x)dW_t$ $\bar{X}_t^{(n)}=b(\underline{t},X_{\underline{t}}^{(n)})\cdot (t-\underline{t})+\sigma(\underline{t},X_{\underline{t}}^{(n)})\cdot (W_{\underline{t}}-W_t)$ is your ...

10

Okay just to wind things down here, I think an important clarification is needed if readers might come and seek to a similar solution. The Geometric Brownian Motion (GBM) is a model of asset prices dynamics which is usually given as follows: $$dS_t = \mu S_t dt + \sigma S_t dB_t$$ where $B_t$ is a standard brownian motion which has several important ...

9

You need to compute your greeks as finite differences, but the full procedure may be pretty tricky. I will use vega $\aleph$ as the example here. Let's begin by designating your Monte Carlo estimator as a function $V(\sigma,s,M)$ where $\sigma$ is the volatility as usual, $s$ is the seed to your random number generator, and $M$ is the sample count. To ...

8

I believe this is a nice paper for you to start with. Check out what references it cited and who cited it. Markov Chain Monte Carlo Analysis of Option Pricing Models "Use the Markov Chain Monte Carlo (MCMC) method to investigate a large class of continuous-time option pricing models. These include: constant-volatility, stochastic volatility, price jump-...

8

Tools from the field of stochastic optimization are best suited for these problems. In particular, attached is a paper on non-parametric density estimation for stochastic optimization that describes an algorithm if state variables can be associated with draws from the predictive distribution. Here's another approach by Kuhn. These are all one-period ...

8

In this scenario, the "joint dynamics" are trivially computed since the option value is a known deterministic function of stock price. For example, the mean of the option value for time $\tau$ is $$\mu_O = \int_0^\infty BSM( S_\tau ) p(S_\tau) dS_\tau$$ which is best computed using quadrature as available in standard numerical libraries like scipy. The ...

8

By definition the fair value of an option is given by an expectation value of the payoff, $\mathbf{E}\left[\textrm{payoff}(\textit{paths})\right]$. The probability distribution of the paths is the risk neutral measure. This is just an integral expression of the form you wrote. This applies to all option prices. Many options are, of course, special in the ...

8

You have the right idea, but it seems you don't know $\mu$, so using it in your error check doesn't seem correct. Also, checking the result every 10,000 iterations may not be optimal for deciding when to stop. To be clear, let $E(X) = \mu$ and $Var(X) = \sigma$. We're invoking the CLT when we write $$P\left( \left|\frac{\bar{X}_n - \mu}{\sigma/\sqrt{n}}\... 8 Here is the general approach you can follow to generate two correlated random variables. Let's suppose, X and Y are two random variable, such that:$$X \sim N(\mu_1, \sigma_1^2)Y \sim N(\mu_2, \sigma_2^2)$$and$$cor(X,Y)=\rho$$Now consider: y=bx + e_i, where x (=\frac{X-\mu_1}{\sigma_1}) and y (=\frac{Y-\mu_2}{\sigma_2}) both follow ... 8 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 between the path time points. If that's the case then "naive" Monte Carlo simulation will have what is called "simulation bias". That's exactly because the ... 8 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's no guarantee that the generated sequences won't overlap. If you're willing to change the engine code so that you can pass the relevant parameters, a safer ... 7 You have the right intuition but the approach is not quite right. The issuer has the right to call back the bond at a pre-defined call price. So your decision criterion is "call when the value of the bond >= contractual call price". We are comparing prices in the decision rule, not the YTM of the callable bond with the coupon of the bond. Note that ... 7 Apart from numerical stability errors, Cholesky and PCA (without dim reduction) shall produce exactly the same distribution, they are two symmetric decomposition of the same covariance matrix and thus are equivalent for transforming a standard normal vector. Of course when doing different things with PCA components, such as in dim reduction or quasi Monte ... 7 LSM is very fiddly. The most important things in my view are 1) don't believe anyone who says that the choice of basis functions doesn't matter. 2) implement an upper bounder, eg Andersen--Broadie (2003) or Joshi-Tang (2014) so you can tell if your prices are good 3) do two passes, one to build the strategy, one to price, if they give very different ... 7 Quasi Random Numbers are more tricky than it might seem, using them as a black box like with PRNGs is risky. E.g. an unscrambled Sobol' sequence is uniform only asymptotically, while for realistic sample sizes there are subvolumes with significantly different densities. You often do not realize that because the convergence graph looks good anyway, it gives ... 7 In general these are the two basic approaches to QuantFinance: Sell side (market maker, risk neutral): You use risk-neutral probabilities ("\mathbb{Q}") e.g. in option pricing (to e.g. calculate your greeks and hedge your portfolio), so that you live on the spread. Buy side (market/risk taker): You use real-world probabilites ("\mathbb{P}") for e.g. ... 7 the problem is that the pay-off has discontinuous first derivative. Try a contract with pay-off that is twice differentiable and it will probably work. The problem is that all the value comes from the tiny number of paths within \Delta S of the strike, and these paths have huge value. This is a well-known problem. As the bump size goes to zero, the ... 7 the LIBOR market model the Heston model -- Euler and Milstein are actually bad for this and much more sophisticated methods are necessary local volatility models 7 First you need to correct the formula to:$$ W_t^2 = \rho W_t^1 + \sqrt{1-\rho^2} Z_t, $$where Z_t is a BM independent of W_t^1 If you calculate the variance and the covariance, then you see that it is true:$$ V[W_t^1] = t $$and$$ V[W_t^2] = \rho^2 V[W_t^1] + (1-\rho^2) V[Z_t] = \rho^2 t + (1-\rho^2) t = t, $$which is the desired variance. For the ... 7 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 estimate than using 100 of them. What matters is to investigate the variance of the estimator rather than looking at pointwise values it can take (*) To get a ... 7 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. There are many articles out there discussing this non trivial topic. @MarkJoshi can probably shed some more light, see this nice paper. You claim that your LSM ... 6 I'm guessing, and correct me if I'm wrong, you want to create a number of possible paths the stock price could follow with the local volatilty given by GARCH depending on the simulated history, or in pseudocode: N <- numberOfPaths T <- numberOfSteps for (i in 1:N) { newSeries <- pastPrices for (t in 1:T) { epsilon <- normrnd(0,1) ... 6 In quantitative finance, we sometimes find ourselves choosing a new stochastic model for what market variables are random, and how. For example, someone might decide that they like the SDE $$dS = \mu\ S\ dt + \left( \frac{S_0}{S} \right)^{\frac32} \sigma\ S\ dW$$ because they want to capture a leverage effect. Now, this SDE ... 6 Check this document out: link to pdf file Also, if you are concerned with actual performance of your code and want to implement efficient code then gsl libraries would be the first place look at: link. It's got everything you need. 6 The best I have seen so far is William Wheaton's work in this area. I don't know how much is described in his papers but he and Torto created a system that combined factor models for things like local and national price indexes with specific economics of commercial real estate ventures (such as balloon payments on construction milestones and the like). The ... 6 For such high-dimensional path problems you will want to use the Morokov technique (you can find the paper online), which takes QR samples for the "important" dimensions and then reverts to pseudorandom for the less important dimensions in an interest rate problem remarkably similar to yours. (Similar principles apply to using QR sequences in factor model ... 6 For completeness, let's restate that the discrete case goes like this:$$\Delta S_t = S_{t+\Delta t}- S_t = \mu S_t \Delta t + \sigma S_t \sqrt{\Delta t} Z_t  with $Z_t \sim \mathcal{N}(0,1)$ What you are doing in your case is to use the exact solution of the SDE to model the movement between two points of $S$. Essentially, you are doing the same thing ...

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