Questions tagged [simulations]

Reproduction of the characteristics or the outcome of a phenomenon or process using math or programming. Here limited to events related with quantitative finance as defined in the help center.

Filter by
Sorted by
Tagged with
37 votes
5 answers
9k views

Strictly local martingales: what is the intuition behind them?

A process $X_t$ is a local martingale if there exists an increasing sequence of stopping times $\{\tau_k,k=1,2,...\}$, with $\tau_k \to \infty$ almost surely, such that each stopped process is a ...
Kiwiakos's user avatar
  • 4,337
33 votes
5 answers
65k views

How to simulate stock prices with a Geometric Brownian Motion?

I want to simulate stock price paths with different stochastic processes. I started with the famous geometric brownian motion. I simulated the values with the following formula: $$R_i=\frac{S_{i+1}-...
user1690846's user avatar
18 votes
6 answers
3k views

How to generate a random price series with a specified range and correlation with an actual price?

I want to generate a mock price series. I want it to be within a certain range and have a defined correlation with the original price series. If I choose, say, oil, I want as many time series which ...
Suminda Sirinath S. Dharmasena's user avatar
17 votes
3 answers
2k views

Simulating Returns

I'll start this off with a rather broad question: I am trying to simulate returns of a large number of assets within a portfolio of different classes - equity and fixed income in a first step, say 100 ...
Owe Jessen's user avatar
  • 1,144
16 votes
3 answers
3k views

How to account for transaction costs in a simulated market environment?

I am simulating a market for my trading system. I have no ask-bid prices in my dataset and use adjusted close for both buy and sell price. To account for this I plan to use a relative transaction cost....
Stian's user avatar
  • 265
14 votes
3 answers
2k views

Literature on generating synthetic time series for testing

I have some market data (daily time series) for bond prices and CDS indices and I would like to generate synthetic versions of these which are statistically "similar" for testing trading strategies. ...
mathman's user avatar
  • 241
14 votes
5 answers
1k views

Quantum Computing for Quantitative Finance

It's been a while that quantum computing is looked as the next step in computational science. I somewhat always tought we were decade aways from it's happening but it appears I was wrong: ibm-quantum-...
Lucas Morin's user avatar
13 votes
1 answer
385 views

Enhancing Monte-Carlo convergence (crude method)

I am currently doing a project involving Monte-Carlo method. I wonder if there is papers dealing with a "learning" refinement method to enhance the MC-convergence, example : Objective : estimate of $...
Beer4All's user avatar
  • 644
12 votes
2 answers
2k views

Distribution of Geometric Brownian Motion

Please let me know where I have been mistaken! Let the SDE satisfied by the GBM $S(t)$ be $$ \frac{dS(t)}{S(t)} = \mu dt + \sigma dW(t). $$ Then, the underlying BM $X(t)$ will satisfy $$ dX(t) = \...
bcf's user avatar
  • 2,798
11 votes
3 answers
4k views

How to simulate cointegrated prices

Is there any simple way to simulate cointegrated prices?
DAve's user avatar
  • 111
11 votes
2 answers
827 views

Is Walk Forward Analysis a good method to estimate the edge of a trading system?

Do you think Walk Forward Analysis is a good method to estimate the predictability or edge of a trading system? Are there similar methods to know (estimate) how much alpha can capture an algo (in the ...
Juan M. Almodóvar's user avatar
11 votes
3 answers
352 views

Are there any standard techniques for adding realistic synthetic microstructure noise to a price series?

This may seem like a strange question, but for my particular application we need to actually add synthetic microstructure noise to real time charts. The signal should still be representative of the ...
barrymac's user avatar
  • 241
10 votes
2 answers
8k views

When to use Monte Carlo simulation over analytical methods for options pricing?

I've been using Monte Carlo simulation (MC) for pricing vanilla options with non-lognormal underlyings returns. I'm tempted to start using MC as my primary option-valuating technique as I can get ...
Victor's user avatar
  • 1,200
10 votes
3 answers
771 views

How to test for and how to simulate price rise/fall asymmetry in the stock market

One of the stylized facts of financial time series seems to be a fundamental asymmetry between smooth upward movements over longer periods of time followed by abrupt declines over relatively shorter ...
vonjd's user avatar
  • 27.4k
9 votes
2 answers
6k views

Simulation of GBM

I have a question regarding the simulation of a GBM. I have found similar questions here but nothing which takes reference to my specific problem: Given a GBM of the form $dS(t) = \mu S(t) dt + \...
gu7z's user avatar
  • 275
9 votes
2 answers
2k views

Simulating from a multivariate clayton copula

I am recently into copulas for finance, I've read several examples of how to generate dependent random variables with most kind of copulas. The problem for me is that all the books describe the case ...
simzoor's user avatar
  • 383
9 votes
1 answer
2k views

Simulating conditional expectations

There is a multidimensional process X defined via its SDE (we can assume that its a diffusion type process), and lets define another process by $g_t = E[G(X_T)|X_t]$ for $t\leq T$. I would like to ...
Grzenio's user avatar
  • 421
9 votes
1 answer
1k views

Monte carlo portfolio risk simulation

My objective is to show the distribution of a portfolio's expected utilities via random sampling. The utility function has two random components. The first component is an expected return vector ...
Ram Ahluwalia's user avatar
9 votes
2 answers
1k views

CDS spread scenarios from historical market data

I'm searching for information on the best way to generate scenarios to be used in VaR or ES calculations, for CDS spreads. Given that we need significant historical data in order to achieve a decent ...
UmaN's user avatar
  • 523
8 votes
3 answers
5k views

Simulate correlated Geometric Brownian Motion in the R programming language

In response to this question: How to simulate correlated Geometric brownian motion for n assets? One of the responses provides an implementation in MATLAB: http://www.goddardconsulting.ca/matlab-...
Ryan J. Shrott's user avatar
8 votes
2 answers
841 views

Does GARCH derived variance explain the autocorrelation in a time series?

Given a time series $u_i$ of returns (where $i=1,\dotsc,t$), $\sigma_i$ is calculated from GARCH(1,1) as $$ \sigma_i^2=\omega+\alpha u_{i-1}^2 +\beta \sigma_{i-1}^2. $$ What is the mathematical ...
user12348's user avatar
  • 1,688
8 votes
1 answer
292 views

What tradeoff is there to using an accurate estimate with a large confidence interval?

I am working on calibrating a Heston model from simulated historical stock data. After obtaining an accurate estimate of the model parameters I found very large 95% confidence intervals for these ...
Beer4All's user avatar
  • 644
7 votes
1 answer
1k views

SDE simulation: P or Q?

Let's take a GBM under $P$: $dS=\mu dt+\sigma dW_{t}^{P}$ and then under $Q$ $dS=r dt+\sigma dW_{t}^{Q}$, where $dW_{t}^{Q} = dW_{t}^{P} + (\mu - r)/\sigma dt $ Now, let's say that I have ...
jso's user avatar
  • 101
7 votes
1 answer
3k views

How to simulate correlated assets for illustrating portfolio diversification?

I have seen multiple instances where people try to explain the diversification effects of having assets with a certain level of correlation, especially in the "most diversified portfolio" literature. ...
Belmont's user avatar
  • 401
7 votes
2 answers
691 views

How to reduce variance in a Cox-Ingersoll-Ross Monte Carlo simulation?

I am working out a numerical integral for option pricing in which I'm simulating an interest rate process using a Cox-Ingersoll-Ross process. Each step in my Monte Carlo generated path is a ...
Tal Fishman's user avatar
  • 13.4k
7 votes
0 answers
349 views

simulating from the CIR++

I am looking at the CIR++ model which is described in interest rate models by Brigo et al, and was wondering on how to actually simulate from this model. The model reads $$r_t=x_t+\phi(t),$$ where $...
A.Boh's user avatar
  • 353
6 votes
2 answers
3k views

When to use the real world drift and when the risk neutral one for a Monte-Carlo simulation?

Under what conditions should the drift be real world and when risk neutral when simulating Delta Hedging option pricing trading strategy any other? For 2. it should be risk neutral. For 1., it ...
user12348's user avatar
  • 1,688
6 votes
4 answers
7k views

Monte Carlo simulating Cox-Ingersoll-Ross process

The CIR process is given by the SDE $$ \mathrm dr_t = \theta(\mu-r_t)\mathrm dt + \sigma\sqrt{r_t}\mathrm dW_t $$ where $W_t$ is a Brownian motion. I am interested in finite-difference schemes of ...
SBF's user avatar
  • 2,613
6 votes
1 answer
936 views

How to simulate Levy processes

Hey how to simulate Levy processes? I have no problem with Wiener process and compound Poisson process, I also know how to simulate Variance Gamma process but I have no idea how to simulate for ...
Math122's user avatar
  • 443
6 votes
1 answer
4k views

Michaud's Resampled Efficient Frontier - Out of Sample Simulation Testing

I will be putting ALL my account points on bounty to whoever answers this question [if your answer is crap but it's the only answer, you're getting the 165 points]. You will have to wait 2 days or so ...
user avatar
6 votes
2 answers
1k views

Correct Monte Carlo simulation of local volatility models

I am using Monte Carlo simulation to evolve the following SDE over a grid of timepoints $0,t_1,...,t_N$. \begin{equation} dS(t)=\sigma(t, S(t))dw(t) \end{equation} Here $\sigma(t_i,S(t_i)), i=1,...,N$ ...
hs16022021's user avatar
6 votes
1 answer
8k views

How to simulate a Merton Jump Diffusion process?

I am talking about the Merton Jump Diffusion model, on this page, where they give the following formula: $$ dS_t = \mu S_t dt + \sigma S_t dW_t + (\eta-1) dq$$ where $W_t$ is a standard brownian ...
user1690846's user avatar
6 votes
0 answers
318 views

Delta-hedge experiment of American Put option

I am trying to run a delta-hedge experiment for an American Put option but there's a (systematic) hedge error which I cannot seem to understand or fix. My implementation is found in the bottom of this ...
Landscape's user avatar
  • 558
5 votes
1 answer
3k views

Monte Carlo - Multivariate Simulation of Returns

I am implementing a Monte Carlo simulation in R to generate multivariate correlated returns. In doing this I have used the Cholesky decomposition, applied to the covariance matrix. However, I saw that ...
alexandra's user avatar
5 votes
3 answers
4k views

Calibration of a GBM - what should dt be?

I have a time series of daily data that I want to calibrate GBM parameters $\mu$ and $\sigma$ to. Using the discretized solution $$ S_{t_{i+1}} = S_{t_i}\exp\left(\left(\mu - \frac{\sigma^2}{2}\...
bcf's user avatar
  • 2,798
5 votes
1 answer
431 views

Simulate (imaginary) asset prices using random numbers that follow a Frank Copula

I didn't understand how to simulate asset prices by using non normal random numbers. I am assuming that it would be incorrect to use the standard Geometric Brownian Motion, since it is based solely ...
Tom's user avatar
  • 51
5 votes
1 answer
2k views

How does the 2-factor Hull White model propagate the forward rates curve?

I've been trying to get a grasp on some of the basics of interest rate modeling, and am looking to simulate rates using the 2 factor Hull White model, which I am aware offers a more realistic model of ...
Eddie E.'s user avatar
  • 153
5 votes
2 answers
448 views

Why is it more accurate to simulate ln(S) rather than S?

Let's take a process $S$ that satisfies: \begin{equation} dS = \mu S dt + \sigma S dz \end{equation} with $dz$ a Wiener process, $\sigma$ the volatility of $S$, $\mu$ the expected return of $S$. From ...
Victor's user avatar
  • 519
5 votes
1 answer
247 views

Simulate double exponential process with correlated jumps?

So, I'm trying to simulate a correlated double exponential jump process for two assets, and I understand the pure exponential jump process ($\eta_1$ and $\eta_2$, the probability of an upward jump ...
Coolio2654's user avatar
5 votes
1 answer
869 views

Kelly Capital Growth Investment Strategy (Example in R)

In the paper Response to Paul A Samuelson letters and papers onthe Kelly Capital Growth Investment Strategy pages 5 and 6 Dr William T Ziemba, gives a praticle example on Kelly Growth. I’m trying to ...
RiskTech's user avatar
  • 206
5 votes
2 answers
608 views

Credit Valuation Adjustment Implementation

I am trying to help a friend with her thesis on Counterparty Credit Risk where she intends to have a somewhat lengthy treatment on Credit Valuation Adjustment (CVA). Specifically I am looking to help ...
Amit 's user avatar
  • 151
4 votes
1 answer
3k views

How are Brownian Bridges used in derivatives pricing in practice?

A similar question has already been asked in the past, unfortunately the 2nd question of the OP was never really addressed. Most references found on internet on Brownian Bridge and Monte-Carlo ...
Daneel Olivaw's user avatar
4 votes
1 answer
2k views

negative values in geometric brownian motion

A GBM (Geometric Brownian Motion) $ \frac{dx}{x} = \mu dt + \sigma dW $ solves to $x_t = x_o e^{(\mu - \sigma^2)t + \sigma W_t}$ From the solution, it is clear that $x_t$ cannot become negative. ...
dayum's user avatar
  • 343
4 votes
1 answer
1k views

Model reference price of Limit order book

first of all, the description of this Stackexchange forum says its for professionals or academics. I'm doing a lot of self studying and with that I was able to understand some white papers but still I'...
flxh's user avatar
  • 197
4 votes
1 answer
706 views

Extended CIR and discretization

Did someone know how to discretize this process efficiently : $dX(t) = \kappa [\theta(t)-X(t)]dt + \sigma \sqrt{X(t)}dW(t)$ I am looking for something more sophisticated than the trivial Euler ...
Gauss8's user avatar
  • 106
4 votes
2 answers
254 views

Random Brownian Simulation Startling Results

I was playing around in Excel the other day, simulating possible equity curve/P&L paths for a simple game I designed. The game is really trying to find an optimal risk managment strategy. I start ...
jessica's user avatar
  • 2,098
4 votes
1 answer
272 views

Simulating Iterated Brownian Motions

I was going through an interesting article (https://arxiv.org/pdf/1112.3776.pdf) while I was trying to read about subordinated processes. I wanted to simulate subordinated processes (in R or python) ...
Rishabh Kumar's user avatar
4 votes
1 answer
7k views

Shifted Log-Normal model

I am trying to understand how the shifted log-normal model works, in which we shift a log-normal model by a factor before the simulation so that interest rates don't turn negative during the ...
SaurabhD's user avatar
  • 301
4 votes
1 answer
590 views

How to model High/Low prices for Stocks with Monte Carlo

I'm using monte carlo simulation to model stock paths and measure risk, but I was wondering if there is a way to simulate the full bar/candle chart with open, high, low and close prices , as I'm only ...
user35032's user avatar
4 votes
1 answer
3k views

Valuing Total Return Swaps

In my quest for simulated data, I am trying to generate prices for Total Return Swaps by calculating the NPVs of the fixed and floating leg. My problem: Given the fixed leg, how do I set the spread on ...
Owe Jessen's user avatar
  • 1,144

1
2 3 4 5 6