Skip to main content

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.

86 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
7 votes
0 answers
358 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
0 answers
340 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
  • 548
4 votes
0 answers
226 views

How to simulate stock price with support and resistance level

I couldn't find good resources on how to simulate a stock price data sequence including some basic effects. The basis might be a Brownian motion model; but in real stock prices, there are additional ...
alex's user avatar
  • 41
4 votes
0 answers
128 views

Long-term proportion of convex and concave strategies in artificial financial markets

In their classic paper "Dynamic Strategies for Asset Allocation" Perold and Sharpe state: "That convex and concave strategies are mirror images of one another tells us that the more demand there ...
vonjd's user avatar
  • 27.5k
4 votes
0 answers
140 views

How does one simulate intraday strategies which don't end up flat at the close?

I ran into this trying to simulate trading interlisted names between the NYSE and the TSX. Depending on my strategy parametrization it would sometimes end up with a significant short or long dollar ...
Alicia Myskina's user avatar
3 votes
1 answer
171 views

Understanding the calibration of High-frequency trading in a limit order book

I am trying understand and replicate this thesis, which is based on, High-frequency trading in a limit order book by (Avellaneda and Stoikov, 2008) and Optimal market making, by Olivier Gueant, 2017, ...
ayamathss1's user avatar
3 votes
0 answers
156 views

Pathwise sensitivities of American options - Derivative of the American payoff function

How can I compute the derivative of the payoff function for an American put option? In the paper "Smoking adjoints: fast Monte Carlo Greeks" by Giles and Glasserman (2006) they compare two ...
Landscape's user avatar
  • 548
3 votes
0 answers
138 views

Continuation value in Longstaff-Schwartz: Why the expected value?

In the paper by Longstaff and Schwartz on American option pricing, the continuation value at time $t_k$ is given by: \begin{align} F(\omega;t_k) = \mathbb{E}_Q\Big[\sum_{j=k+1}^Kexp\Big(-\int_{t_k}^{...
arni's user avatar
  • 581
3 votes
0 answers
73 views

Numerical approximation of SPDE

I've already posted this question on MSE, but I'm not quite sure if it's the right community so I'm posting it here as well. Background I want to approximate an SPDE of adensity process $V_t$. The ...
Leoncino's user avatar
  • 161
3 votes
0 answers
2k views

Simulating correlated Geometric Brownian Motion in Python

I want to simulate two correlated Geometric Brownian Motion processes in Python. I found an implementation from Matlab (https://www.goddardconsulting.ca/matlab-monte-carlo-assetpaths-corr.html) and ...
Willart's user avatar
  • 73
3 votes
0 answers
235 views

Simulating volatility process in the Heston model using the relation between the CIR Process and Ornstein–Uhlenbeck processes

I am trying to simulate the volatility process in the Heston model using the relation between the CIR Process and Ornstein–Uhlenbeck processes. In fact, giving $\mathbf{X}$ a $n$-dimensional vector ...
user144209's user avatar
3 votes
0 answers
102 views

Equity Options - "How do I build a forward simulation model with regards to shocks in spot pricing and IV?"

I am trying to build a "What-If" Portfolio, consisting of a total of 20 options, across different tenors, strikes (delta), but on the same security. Simply put, the objective is for me to test the ...
james's user avatar
  • 31
3 votes
0 answers
110 views

Electricity Prices: Change of measure in practice

I'm working on a model of electricity prices. I have empirical data $X(t)$ and managed to find a reasonable fit given by a Levy process $\hat{X}(t)$. I understand in theory what a risk-neutral ...
Paula's user avatar
  • 151
3 votes
0 answers
52 views

Regularity requirement for convergence of Euler scheme for stochastic integral?

Let $S_t$ be follow Black Scholes, then I am interesting in simulating the process $\int ^t _0 e^{-rt}1_{\{S_t\leq K\}}dS_t$ which is like a naive hedge of a European put, which does not work in ...
Lost1's user avatar
  • 1,023
3 votes
0 answers
4k views

Models for simulating FX movements

My goal is to develop a model to simulate long term FX movements. (I am not sure if long term makes any difference, but if it does I am more interested in long term fx movements) These Monte Carlo ...
Nicholas An's user avatar
3 votes
0 answers
69 views

Credit spreads vs default events dependence

Reading this note it strikes me that credit spreads and defaults seem not to be commonly modeled jointly (e.g. more or less directly in structural models), but at best with some kind of "ex post" ...
Quartz's user avatar
  • 1,553
2 votes
0 answers
147 views

Simulate Spot Process with Forward Variance (Bergomi)

I am reading Bergomi's book (Stochastic Volatility Modeling), and in section 8.7 The two-factor model (page 326), the following dynamics are given: \begin{align} dS_t &= \sqrt{\xi_t^t}\,S_t\,...
Phil-ZXX's user avatar
  • 1,042
2 votes
0 answers
45 views

Models that can improve FHS (with possible residuals manipulation)

The Filtered Historical Simulation (FHS) is a tough benchmark. By: choosing among the most complicated ARMA-GARCH variants with automatic model and lag selection, manipulating standardized residuals ...
Lisa Ann's user avatar
  • 2,133
2 votes
0 answers
169 views

Jump Diffusion Model - Volatility and Mean of Jumps

I am trying to understand the concept of jump diffusion model. So far what I've understood is that by adding a Jump parameter to a GBM (Geometric Brownian Motion) we can generate a Jump diffusion ...
Furqan Hashim's user avatar
2 votes
0 answers
69 views

Negative theta in Log-linear stochastic volatility model

I was asked to simulate the following geometric Brownian motion to get paths for the SPX stock price. the process follows a Log-Linear stochastic volatility. $dS_t = \mu S_tdt+e^VS_tdW_1 $ where ...
Amy Zhang's user avatar
2 votes
0 answers
2k views

Longstaff-Schwartz, special american option simulation using Python (numpy package)

I got a put option, which can be exercised 3 times, all at different times, which are each month of a year $$t_1 = \frac{1}{12}, t_2 = \frac{2}{12} ... t_{12} = 1$$. Respectively, if exercised at $$...
Makina's user avatar
  • 273
2 votes
0 answers
295 views

Multivariate Hawkes Process Simulation

I am trying to implement Ogata's thinning algorithm to simulate multivariate Hawkes Processes in Python (the algorithm can be found here: https://www.math.fsu.edu/~ychen/research/Thinning%20algorithm....
jraffaud's user avatar
2 votes
0 answers
187 views

Generating Correlated Quasi Random Numbers

Hi I am trying to generate correlated quasi random numbers using a sobol sequence in matlab. My Problem is the Following: Using "standard" random numbers it is easy to generate the 6 correlated random ...
Vanity's user avatar
  • 165
2 votes
0 answers
58 views

Simulating Asset Prices by Independently Simulating Supply and Demand

If I have an asset, whose supply is generally mean-reverting and whose demand is generally cyclical, could I somehow simulate / project the supply and demand levels across multiple discrete time ...
Alex Ockenden's user avatar
2 votes
0 answers
220 views

Simulating t-distributed returns by calibrating degrees of freedom $\nu$ from variance or kurtosis

A slight twist (I hope) on the familiar problem of simulating log returns from a t-distribution. My two questions concern calibration to sample data. First, one can infer the degrees of freedom, $\nu$...
LukeG's user avatar
  • 21
1 vote
0 answers
39 views

Scaled VaR: approximation vs reality

Previous question: Understanding VaR rescaling After understanding the usual VaR scaling formula $$\text{VaR}_{T,\alpha}=\sqrt{T}\text{VaR}_{1,\alpha}$$ I wanted to know by how much it deviates from ...
augustoperez's user avatar
1 vote
0 answers
35 views

Option Price keeps decreasing as the time-steps increase

I have been writing a code in Python, trying to find a European Benchmark of the Gatheral Double-Mean Reverting model (since there is no available benchmark values online), using the Euler scheme. For ...
TilManG4's user avatar
1 vote
0 answers
74 views

Reserves using Thiele differential equation

I am trying to solve the Thiele differential equations $$ \frac{d}{dt}V^1(t)=r(t)V^1(t)-b^1(t)-\mu_{12}(t)(V^2(t)-V^1(t))-\mu_{10}(t)(V^1(t)) \\ \frac{d}{dt}V^2(t)=r(t)V^2(t)-\mu_{21}(t)(V^1(t)-V^2(t))...
idlatva's user avatar
  • 11
1 vote
1 answer
187 views

GARCH process simulation in R

I'm trying to learn how to simulate the GARCH(1,1) for option pricing using Monte Carlo. I need to learn how to code the equations for the stock log returns and the variance process. I'm trying to ...
StochasticNewby's user avatar
1 vote
0 answers
264 views

CEV model effective simulation

I want to simulate the following CEV process : $$ dM_t = \sigma_t M_t^{\eta} dW_t $$ Using Euler discretization to $M_t$, if at a given time $t$, $M_t$ takes a negative value then $M_{t+1} = M_t + \...
H K Y's user avatar
  • 11
1 vote
0 answers
112 views

Simulating the same stock price with different methods/distributions

I would like to ask if we could simulate stock price paths with different methods/techniques. What I mean is : say we have a specific stock price hence we can extract historical mean and standard ...
wanna_be_quant's user avatar
1 vote
0 answers
118 views

Backtesting - treatment of holidays for global (i.e. multi-market) portfolios

Assume a daily trading strategy where each day we rebalance our portfolio weights: Situation A: all constituents of our portfolio are from the same market (e.g. a portfolio of S&P 500 stocks) ...
Metod Jazbec's user avatar
1 vote
0 answers
104 views

How to get Risk-Neutral Drift for Trading Volume from Time Series

I am trying to price an option with Monte-Carlo simulation, where the payoff depends on some constants and a time-series (trading volume) which I model to follow a GBM. Now if I understood it ...
Merwin's user avatar
  • 21
1 vote
0 answers
120 views

Valuing American Options using Tilley algorithm

Hey I want to implement Tilley's algorithm (Valuing American Options in a Path Simulation Model by JA Tilley, 1993) to price american options. Where can I find implementation of this method in any ...
Johhn White's user avatar
1 vote
0 answers
219 views

Milstein scheme for Heston model - rate of convergence

Heston model is described by following SDE \begin{equation} \begin{aligned} dS_t &= \mu S_t dt + \sqrt{\nu_t} S_t dW^S_t \\ d\nu_t &= \kappa(\theta - \nu_t) dt + \xi \sqrt{\nu_t} dW^{\nu}_t \\ ...
Math122's user avatar
  • 443
1 vote
0 answers
59 views

Gaussian Copulas: My Marginal Distribution Includes Negatives but My Copula is Non-Negative?

Attempting Copula in R for Stock Returns, Bond Returns, and Inflation Rates. This is my first attempt with Copulas but I have looked many places and cannot determine what I'm doing wrong. My Marginal ...
wilmalt's user avatar
  • 11
1 vote
1 answer
384 views

Simulating correlated Geometric Brownian Motion with lag

I know that it is possible to simulate two correlated GBM in e.g. Matlab (Generating Correlated Asset Paths in MATLAB) based on cholesky decomposition. However, they take as input the correlation ...
Willart's user avatar
  • 73
1 vote
0 answers
777 views

Source on multivariate correlated geometric Brownian motion returns, not prices

Can anyone provide a source that formulates how to generate multivariate geometric Brownian motion returns using the Cholesky method with target correlation matrix, instead of correlated GBM prices? ...
develarist's user avatar
  • 3,000
1 vote
0 answers
39 views

Combining multiple securities' Net Asset Value time-series into one total NAV series

I have a number of individual securities that each have a Net Asset Value (NAV) time-series. For example: ...
Stacey's user avatar
  • 183
1 vote
0 answers
79 views

Anyone got references where we can find examples of codes for agent-based simulations of financial markets?

I'm looking for references with codes for trying out simple agent-based simulations for modeling financial markets. I mostly worked with MATLAB and R, but I know a bit of python and I am learning C++ ...
Stéphane's user avatar
  • 2,476
1 vote
0 answers
101 views

CVA for a portfolio of long and short options

I am looking to estimate the CVA/DVA for a portfolio of options. For simplicity sake, let's assume there are two FX options in the portfolio, one long and one short. Both options have the same ...
user078913's user avatar
1 vote
0 answers
39 views

ES using historic simulation

Why is the data obtained from 91-100 days all eliminated from the calculation of the 1-day 95% ES? My interpretation is because the first day to calculate the 95% ES should be the 90th day? But I can'...
Betty's user avatar
  • 171
1 vote
0 answers
35 views

Why do simulation schemes have difficulty in pricing options with low spots?

If you apply a simulation Scheme (log-Euler discretization, Euler discretization and even more advanced ones) on for instance SABR and other models, then they price a call option (where we can easy ...
Sanjay's user avatar
  • 1,667
1 vote
0 answers
149 views

Pricing call option on bond under CIR model by simulating noncentral chi square distribution

In the original paper of CIR model, there is a pricing formula about call option on bond $$ \begin{array}{l}{C(r, t, T ; s, K)} \\ {=P(r, t, s) \chi^{2}\left(2 r^{*}[\phi+\psi+B(T, s)] ; \frac{4 \...
Tak wa Ng's user avatar
1 vote
0 answers
42 views

Why no prepayment fee for the reverse mortgage?

I am currently studying the costs (to lender) of adding certain additional options to the reverse mortgage, including the option of prepayment. Would there be any scenarios of housing price/mortgage ...
John's user avatar
  • 349
1 vote
0 answers
24 views

Simulating Taxed Equity Return Series (U.S.)

I'm looking to learn how to correctly simulate taxes on dividends and capital gains on simulated return series for U.S. Equities with dividend reinvestment. I understand I will have to keep track of ...
rhaskett's user avatar
  • 1,641
1 vote
0 answers
136 views

Monte Carlo Simulation of correlated returns based on different frequencies

I am simulating through Monte Carlo, multivariate correlated returns of different products composing an Oil&Gas portfolio. The historical prices (from which I computed the log-returns) of the ...
alexandra's user avatar
1 vote
0 answers
53 views

Bootstrapping to Judge the Fit of a Sampled Return Distribution

Consider the following: I have sampled yearly stock returns from a specified distribution. What I want to do is compare how well my sampled distribution fits the empirical distribution of yearly ...
user33475's user avatar
  • 147
1 vote
0 answers
292 views

Open Source library for calculating exposures?

I would like to know an open source quantitative library/ies that can calculate exposures out of the box (I have investigated a bit on OpenGamma/Strata libraries with no luck and the website of ...
gencho's user avatar
  • 23
1 vote
0 answers
185 views

Simulating asset returns: (Academia) state of the art

I want to run some simulation studies of (linear) factor models and for that reasons I am wondering about the features such a simulation should contain - every suggestion is welcome, I'll do my best ...
Stefan Voigt's user avatar
  • 1,456