Tag Info

Hot answers tagged

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

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


4

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


4

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


3

EQ1 is uni-variate case. EQ2 is multivariate case, in which you have to use correlated $X_t$. His way of doing is making $Y_t$ independent so that you can simulate freely. He does so by finding PC on $\Delta$. Alternatively, you could generate correlated $X_t$ in your simulation. To benchmark your model / code, you should first test and reproduce a given ...


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

The Black-Scholes price of this option is approximately $14.8$. When I run a Monte Carlo simulation with $10000$ paths and "exact" time stepping, I get results very close to this value. You are simulating the terminal asset price with the first-order Euler approximation over multiple time steps: $$S(t+\Delta t)= S(t) + rS(t)\Delta t + \sigma ...


2

To my knowledge the real world drift plays a crucial role in risk management. The reason being that one is not interested in risk adjusted paths but in real-world scenarios that might actually occure. Still you should be aware that "the real world drift" is a somewhat controversial topic in quant circles. Nobody knows exactly how to get it. Mostly you end ...


2

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


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

Historical returns are not to be used 'untreated' for the calculation of option prices. The expectation that you will be using in Monte Carlo will take the form $$ C(K,T) = E^Q\{D(T)\ \max[0, S_T-K, 0]\} $$ where $T$ is the maturity, $K$ is the strike price, $S$ is the stock price and $D$ is the discount factor. But the expectation is taken under the 'risk ...


2

This depends on your method to generate the normal random numbers. The problem with normal cdf is that the direct inverse $\phi^{-1}(Z)$ is hard to solve for directly. There are some other methods to generate $N(\mu, \sigma^2)$ from $U(0,1)$. Two notable methods are: Box-Muller method Marsaglia polar method For most purposes you can use the above methods ...


2

I agree with @encor that it isn't an issue to include some logic to avoid errors. I imagine that most non-uniform random number generators already include that. I don't think I've used a pseudo-random number generator that's given a 0. I'm not an expert on the topic, but a common implementation (linear congruential generator) relies on modular arithmetic. ...


2

Indeed for computational purposes, best you can do is use a uniform distribution on another interval $[10^{-10},1-10^{-10}]$, or just discard all occurences of $Z=0,1$. Discarding $Z=0,1$ is justified, since for continuous distributions $P(Z=0)=P(Z=1)=0$.


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

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

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

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

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

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


1

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


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


1

You can use: Antithetic variates and; Control variates. Both are variance reduction techniques which will allow you to use fewer paths/simulations. Usually antithetic variates are very efficient on their own. Combining both can be a bit tricky. You could start by simulating the value of a plain vanilla call. Then include antithetic variates and/or ...


1

You are generating a price series, in time steps $p_{dt},p_{2dt},p_{3dt},...$. I assume? So if you do $\text{Median}\{p_{dt},p_{2dt},p_{3dt},..\}$ then you will get a value biased towards $0$ (for the parameters you gave, and the sample size you have). If you want to look at the distributional characteristics of the price, then you have to do so per each ...



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