Tag Info

Hot answers tagged

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


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

Yes, this technique is called moment matching variance reduction and it may indeed lead to a form of variance reduction. The first and second order moments correspond to the mean and the variance of the distribution. You can extend to higher order moments, which is of course more difficult to implement and creates some extra overhead. The mean can be adjust ...


5

There is Monte Carlo Simulation and there is Monte Carlo Simulation. If you are referring to a simple question like simulating dice or calculation of $\pi$ or even vanilla option price calculation, it is one thing and "concisely" available. I recommend get a gist of small examples from CS books and then get on with finance. But if you are referring ...


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


4

You have typo "vol^2", but it should be "vol". Its $$\sqrt{\sigma^2T}=\sigma\sqrt{T}$$


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


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

Your question is too general because Monte Carlo methods differ quite a bit. It's driven more by the problem you are trying to solve, significant result sets, etc, etc. You would either have to provide more details to what you're trying to solve or; try programming some Monte Carlo simulations yourself. My first experience with them was trying to solve ...


3

The error is, you are not storing the random numbers for the same path at the end: xbefore = x + c*tau + sigma*sqrt(tau)*randn() A = muA + sigmaA*randn(); xafter = xbefore + A; But then at end you set a different path here by creating a new random number: xT = log(S0)+(c+muA*lambda)*T+sqrt((sigma^2+(muA^2+sigmaA^2)*lambda)*T)*randn(); randn() ...


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

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


2

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


2

First, please make sure that when you resimulate sample paths, you are keeping your underlying random samples constant, as in this answer. For your delta, vega and rho there is some ambiguity in the definition of the greeks. Consider the simple case of delta in the presence of a skew $\sigma(K/S)$, and say that the underlying price right now is $S_0$. We ...


2

Since there is a closed form in the BS case for continuous barrier options, you probably won't find a huge amount of work on this since it's not needed. In the discrete case, I did a paper with Tang: http://ssrn.com/abstract=1441142 Pricing and Deltas of Discretely-Monitored Barrier Options Using Stratified Sampling on the Hitting-Times to the Barrier


2

I'd recommend M. Joshi and T. Leung "Using Monte Carlo simulation and importance sampling to rapidly obtain jump-diffusion prices of continuous barrier options". Though it assumes jump-diffusion process for the returns it is straightforward to obtain the scheme for a diffusion process. Also Paul Glasserman's [book][2] [2]: ...


2

I am a professor too and I did work with Siemens Corporate Technology which provides the quantitative technology for their copper and electricity trading (Siemens being one of the biggest players in this area in Europe). They are mainly using sophisticated neural networks. We also published a paper together, see my answer here: What types of neural networks ...


2

You should look at confidence interval. Normally, your confidence interval size is proportional to the standard deviation, looking something like: with probability $p$ your value will be in the interval: $$[\bar{S} - k*StdDev, \bar{S} + k*StdDev]$$ Then, getting back to your simulation, we can say that your time step is very big (1 year) and you simulate ...


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

This sounds correct, however step 2 is a little vague, so I will try to restate the steps here for you. The assets in your portfolio must be priced with respect to a set of risk factors (e.g. interest rate curve). Each scenario consists of a value for each of your risk factors. Given the value of your risk factors you can price your portfolio. You want ...


2

To keep things simple let's assume you have a perfect random number generator (i.e. I will discuss only the statistics not the numerics of the problem). I will also focus on the practical matter and gloss over some mathematical details. From a practical perspective "convergence" means that you will never get an exact answer from Monte-Carlo but ...


2

the output of an MC simulation depends on the random numbers used and if the distribution used is not too weird, after 10,000 runs you will get an answer that is distributed $$ \mu + \frac{\sigma}{\sqrt{n}} Z, $$ with $Z$ a standard normal. Here $n=10,000.$ With $\mu$ the quantity you want and $\sigma$ the standard deviation. So you won't get precisely the ...


2

You should write some kernel functions in CUDA (Nvidia language) for your matlab code. Arrayfun is quite restrictive and not appropriate. Look at this link http://fr.mathworks.com/help/distcomp/run-cuda-or-ptx-code-on-gpu.html for more details about matlab and parallel computing.


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


1

There are some restrictions to using arrayfun. You can read the restrictions here. Judging from the error, you cannot use indexes the way you are. You probably have to create separate GPU arrays for $ V_{t+1} $ and $V_t$. I suggest that you find similar examples in Matlab's website and try to replicate its functionality. Here is an article with ...


1

I though about this one more time: method of moments means that you do the following: calculate some statistics (i.e. the moments) on the sample express the moments of the distribution that you want to fit in terms of the parameters of this distribution solve the resulting system of equations. If you estimate $E[S^n]$ by averaging the ...


1

as you post 3 questions on this topic and after reading them: this is homerwork/study material- right? So for comparing Fast Fourier, MC and Panjer there are tons of publications out there. For the formulas for the momemts of $S$ look here or google "moments in the collective risk model". You should notice that: If you know the distribution of $N$ and $X$ ...


1

You can do the following: For each $i$ in $1$ to number of Mont-Carlo runs $K$ simulate the number of losses $N_i$ simulate $N_i$ many loss-sizes $X_{i,1},\ldots,X_{i,N_i}$ calculate $L_i = \sum_{j=1}^{N_i} X_{i,j}$ Doing this you get a sample of losses $L_1,\ldots,L_K$ and you can do all sorts of hisograms, density fits, VaR, ES calculations on it. ...



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