# Tag Info

6

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 ...

6

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 - ... 6 It really, really, really depends on your parameters, i.e. r, \sigma, K, T, S_0. For example, here are some results from implementing the stopping criteria I explain in my answer here. These are the number of iterations requires in order for there to be an approximate 0.95 probability that the MC call price differs from the exact call price by ... 6 By definition, the payoff of a log-contract of maturity T writes$$ \phi(S_T) = \ln\left(\frac{S_T}{S_0}\right) $$Let \Pi_t denote the t-value of such a contingent claim. We are interested in the price at t=0, best known as the option premium. Theory tells us that the latter premium can be computed as$$ \Pi_0 = e^{-rT} E^{\mathbb{Q}} \left[ ...

5

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 ...

5

importance sampling is well known to be tricky. See the extensive discussion in Glasserman's book. I presume that you are simply meanshifting and multiply by the ratio of normal densities. For this sort of problem, I'd use a more stratified algorithm instead and force every path to end in the money. To do this I'd compute the uniform that goes to the ...

5

I wouldn't repeat the same algorithm on Excel, because if you make a mistake in your Python code, it's likely that you'll also make the same mistake in your Excel code. Quants usually test an implementation with an analytical formula (not always possible). You should start off with something easy by pricing an European option with your MC algorithm. You ...

5

American calls on a non-dividend paying stock are worth the same as European ones so there is no point to using least-squares.

5

I believe that the confusion arises because of the wrong treatment of NIG. The answer to the question you link is misleading, as it simulates under P which is not appropriate for option pricing. None of the NIG parameters under P carries over to Q in general, but especially the drift is the problem here. First use the mom gen function of NIG to find the ...

5

You should see this as a comment to @Kiwiakos answer which already hit the bull's eye. In the SE question you're referring to and to which I have answered, the idea was simply to provide you with a sound way of simulating returns out of a NIG distribution. It so happens that, for whatever your reason was, you decided to calibrate your NIG parameters based ...

4

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

4

You don't need to use the Sobol sequence to generate quasi-random numbers in MATLAB. We know the Heston model is represented by the bi-variate system of stochastic differential equations (SDE): \begin{align} & d{{S}_{t}}=rS_tdt+{\sqrt\upsilon_t} d{{W}_{1}}(t) \\ & d{{\upsilon}_{t}}=\kappa(\theta-\upsilon_t) ...

4

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 t + 1-\rho^2 t = t,$$ which is the desired variance. For the covariance you get $$Cov[W_t^1,W_t^2] ... 4 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 ... 4 Surely what is meant is that the 100 components are pairwise correlated but the 1000 draws are independent. 3 In inflation world, the deal payoff is always based on a certain lag convention. That is, the value I(T) always refers to a published index level several months ago or is interpolated based on those published index levels. For example, for a payoff on July 15, 2015, the indexed level referred is the published index level for May, 2015, based on the 2m ... 3 Yes, your solution is correct, given the implementation of McSimulation and the interface of SequenceStatistics. We should probably have defined SequenceStatistics as returning instances of Array... As you might have seen, trying to return std::vector<Real> from the path pricer wouldn't work; the result type needs to define arithmetic operations such ... 3 Sigh. I'm not sure that there's a best way to do multi-threaded MC in QuantLib. I'm afraid that you're underestimating the amount of development you'd need for option 2. You're not going to get away with some OpenMP code as you suggest, because calculations on different paths are not trivially parallel: the RNGs we have are not parallel, and even if you ... 3 You can calibrate the model by discretizing in time, and using a forward induction method as originally proposed by Jamishidian in 1991: F.Jamshidian, Forward Induction and Construction of Yield Curve Diffusion Models, J.Fixed Income 6, 62-74 (1991). Although he formulated this induction in the language of the binomial tree, the method is more general, and ... 3 Yes you can! Any SDE that has an analytic solution can be simulated exactly. The vasicek model has dynamics dr=a(b-r)dt+\sigma dW_t. By Ito's lemma,$$d\left(e^{at}r\right)=e^{at}\left(a(b-r)dt+\sigma dW_t\right) +a e^{at} r dt$$Simplifying,$$d\left(e^{at}r\right)=e^{at} ab +e^{at}\sigma dW_t$$Integrating,$$e^{aT} r_T=r_0+b(e^{aT}-1)+\sigma \int_0 ...

3

you just add in any auxiliary variables accumulated along the path that determine the pay-off to the regression variables. So path-dependence is not a problem. If you have previous decisions, you may need to do different regressions based on their possible values or make them into a continuous variables that can be used for regression.

3

A butterfly in general has a payoff of the form \begin{align*} (X_T-K_c)^+ + (K_p-X_T)^+-(X_T-K_{atm})^+-(K_{atm}-X_T)^+, \end{align*} where $X_T$ is the asset value at maturity $T$, while $K_c$, $K_p$, and $K_{atm}$ are strike levels.

3

I believe the question to be too vague to be a good interview question. If you want to do Mean Variance Optimization (MVO) it's hard to see the point of Monte Carlo simulation. One of the good thing of MVO is its analytic tractability. Clearly, the topic is not widely discussed as this Google Search has this question as the first result (I was in incognito ...

3

it certainly works best at the money. Why? I think it comes from the fact that Black's formula is approximately linear at the money. The approximation $$\frac{1}{\sqrt{2\pi}} \operatorname{SR} \sigma \sqrt{T} A,$$ with $A$ the annuity is remarkably good. One way of deducing these formulas is to do an asymptotic/Taylor expansion about $\sigma=0.$

3

The ADF test assumes the DGP $$\Delta y_t = \alpha +\beta t +\gamma y_t +\delta_1 \Delta y_{t-1}+\cdots +\delta_k \Delta y_{t-k}+\epsilon_t$$ The parameters are estimated using OLS on a sample of length $T$. You might impose $\alpha=0$ and/or $\beta=0$, this will give you different null hypotheses to test. But your test is always $\gamma=0$, and the ...

2

For a swap, we have a sequence of re-setting and payment dates. The # of forward rates corresponding to the # of payment dates. For example, let us assume that we have $n$ payment dates $t_1, \ldots, t_n$, where $0< t_1 < \cdots < t_n$. Then there are $n$ forward rates. During the simulation, for time steps prior to $t_1$, there exist $n$ ...

2

For non-normal asset price models you could look at the theory of Lévy-processes. If we assume that you work in the physical probability measure $P$ and that the random numbers that you have generated are daily log-returns, then you can do the following: Asset $i$ has starting price $S_0^i$ and for the future prices you can put  S_t^i = S_0^i ...

2

You don't say anything about the model or discretization so it is a little hard to judge. However, if you are using an exact discretization, the time step-size should be irrelevant. If you are using an approximate one, the more steps you use, the more accurate it should get. Possible sources of error: 1) random number generator is not good enough and ...

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