Questions tagged [simulations]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
43 views

Milstein Discretization of Heston Model

Given the following representation of the Heston Model: $$d\left(\begin{array}{l}S_{t} \\ V_{t}\end{array}\right)=\left(\begin{array}{c}\mu S_{t} \\ \nu-\varrho V_{t}\end{array}\right) d t+\left(\...
user avatar
0 votes
0 answers
18 views

Stress scenarios for Down In Put (DIP)

I am preparing stress scenarios for long Down In Puts (e.g -10%,-15% drop in underlying equity price). I assume that the maximum delta hedge is 300% for DIPs with barrier levels within 0%-5% ...
user avatar
4 votes
1 answer
229 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) ...
user avatar
2 votes
1 answer
158 views

Cholesky decomposition reduces volatility of simulated Wiener Process / Brownian Motions

I am trying to simulate $n$ correlated geometric brownian motions (GBM) given a specified correlation matrix $\Sigma$ by following this procedure which uses Cholesky decomposition. However, when I ...
user avatar
  • 339
1 vote
1 answer
153 views

Euler Discretization python code

Write the Euler discretization of the 1-dimensional stochastic equation $dXt = b (t, X_t) \space dt + \sigma (t, X_t) \space dW_t$ For this part I would say all right because it is a purely ...
user avatar
0 votes
0 answers
78 views

Inconsistency between simulation and the probability of a "stock" hitting take profit before stop loss

Let's assume a stock at time $t$ is worth $X(t)$. If the returns of $X(t)$ are i.i.d. and normally distributed,the probability of $X(t)$ hitting a value $H>X(t)$ before $L<X(t)$ is $\frac{H-X(t)}...
user avatar
0 votes
0 answers
32 views

Generate payoff matrix of multiple BSM assets

I have some troubles generating a random one-step BSM market model that is arbitrage-free. Concretely, the BSM market model in one time step is just a payoff matrix of $N$ assets and $K$ events, so ...
user avatar
  • 63
0 votes
1 answer
82 views

What are common ways to realistically simulate the stock market using historical market data?

I am currently using the FinRL library to try to automate Trading using Reinforcement Learning. However, I wanted to understand how FinRL simulates the stock market using historical data. I read here ...
user avatar
2 votes
1 answer
75 views

Simulating Correlation (but sample correlation is always too low)

I am trying to simulate correlation in order to price a correlation swap (via Monte-Carlo). For simplicity, let's assume we have 2 assets, and everything is correlated with $\rho$, and there is no ...
user avatar
  • 1,132
0 votes
1 answer
83 views

Why we introduce correlations between Wiener processes? [closed]

Wiener processes are used to model various assets, and I wonder why we are introducing correlations between the Wiener processes and what is the interpretation? Because when the correlations between ...
user avatar
  • 65
1 vote
1 answer
175 views

Simulating the Value-at-Risk with $t$ distributed returns

I want to understand how the value at risk and the simulating the VaR with simple Monte Carlo method. But I want just a confirmation and are welcome any comments, since I don't have the full picture ...
user avatar
0 votes
0 answers
94 views

Simulating sum of squared brownian motions process

I'm trying to simulate the following stochastic process: \begin{equation} R_t = \sum_{i=1}^nB_{i,t}^2 \end{equation} which has the following dynamics: \begin{equation} \begin{aligned} dR_t = \sum_{...
user avatar
0 votes
0 answers
61 views

Simple Poisson monte carlo question

I have what I think is a simple Monte Carlo question that I need some help with. I am building a credit model that requires repetitive draws from a Poisson distribution, where these Poisson ...
user avatar
0 votes
2 answers
86 views

seek clarification about PFE

I'm a software developer want to know a little about quant basics. My undserstanding of PFE is that a PFE of a trade at a future time point is commonly defined by taking the average of the highest (or ...
user avatar
  • 213
1 vote
0 answers
81 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) ...
user avatar
2 votes
1 answer
145 views

Interpolation of $\mu(t,X(t))dt+\sigma(t,X(t))dW(t)$

Let's assume that we have SDE $$dX(t)=\mu(t,X(t))dt+\sigma(t,X(t))dW(t)$$ and we simulate it on a time grid which contains points $t_k$ and $t_{k+1}$. How can we then calculate value of $X$ at time $...
user avatar
  • 65
1 vote
1 answer
265 views

Simulating Correlated Stock Returns in Python (SciPy)

I'm looking to generate stock returns with inter-stock correlation in Python. However, the output is not behaving properly and may have accidental temporal correlation causing issues. This code is ...
user avatar
  • 1,541
-1 votes
2 answers
152 views

Why can’t delta’s be used to price double no touch options?

Here is the link to a MATLAB one touch option pricing calculator I used:OT I tried several inputs and I noticed that the one touch option price is approximately twice the delta of an equivalent ...
user avatar
0 votes
1 answer
79 views

Efficient method for expanding 1 sim routine to the number of simulations? Brownian Bridge used with multiple underlying assets in a MC simulation,

I believe this is a (fairly) simple question for those familiar with quantitative finance and MC/QMC methods of pricing complex options. Or potentially its just a simple Python loop vectorization ...
user avatar
  • 165
0 votes
0 answers
82 views

How can I simulate the barrier option call model in Python?

We have a barrier call option of European type with strike price $K>0$ and a barrier value $0 < b< S_0$, where $S_0$ is the starting price.According to the contract, the times $0<t_1<....
user avatar
2 votes
1 answer
267 views

backtesting guide for research

I am a master student in finance and I am working on my portfolio management thesis. Within my thesis I will have to backtest a portfolio strategy for a balanced portfolio. I am looking for a guide/ ...
user avatar
1 vote
2 answers
209 views

Validation of XVA models

Hey what is the validation of XVA models (CVA, FVA etc)? As we know XVA calculation is rather complex problem (simulation, Valuation, aggregation) so what steps should be taken to check if the model ...
user avatar
  • 13
1 vote
1 answer
124 views

How to simulate correlated stock prices (not returns)

Suppose we have two stocks following GBMs. Drift and volatility are calculated based on historical data. Furthermore the stocks are assumed to be correlated (i.e. they move together, if stock 1 goes ...
user avatar
  • 53
0 votes
2 answers
137 views

Filtered Historical Simulation VaR for swaps

I am trying to understand how to calculate FHS VaR for a portofolio of vanilla swaps. I think I understand the main ideas behind FHS VaR and how to implement it for other assets such as equities. I ...
user avatar
  • 25
0 votes
1 answer
101 views

GBM drift when simulating correlation betwenn GBM with Cholesky Decomposition

I am currently trying to simulate correlated GBM paths and I found the Cholesky Composition for it. From my understanding, the Cholesky Decomposition can be used to create correlated random variables ...
user avatar
  • 11
1 vote
0 answers
66 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 ...
user avatar
  • 11
0 votes
1 answer
100 views

Distribution of Geometric Brownian Motion drawdowns from realizations of multivariate Normal and Laplace distributions

I am trying to simulate the distribution of Geometric Brownian Motion drawdowns from samples of multivariate Normal and Laplace distributions under the same covariance structure. Drawdowns are defined ...
user avatar
0 votes
1 answer
52 views

Testing severity of VaR by changing portfolio component weights

Let's assume that I have a portfolio with two components:$$\omega_i = 0.3$$ $$\omega_j = 0.7$$ I also have two P&L vectors, $v_i$ and $v_j$ each containing 1000 P&Ls. I would like to play ...
user avatar
  • 1,708
6 votes
1 answer
658 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 ...
user avatar
  • 423
2 votes
1 answer
107 views

How to test the difference between samples of sharpe ratios

I am testing the performance difference between 2 portfolio strategies. I use Monte Carlo simulation in R to generate $N$ simulations of portfolio returns for each strategy. I then compute the Sharpe ...
user avatar
0 votes
1 answer
89 views

VAR of Long & Short European Call Options

I have over 1000 simulated stock prices for an option that is expiring in 3 months. I have calculated the EU call option payoff of 1000 simulated prices and now I have 1000 simulated payoffs of call. ...
user avatar
  • 1
1 vote
1 answer
81 views

R - Plotting a 3-dimensional sample path in yuima?

Apologies if this is not the appropriate place to post this - this my very first contribution to Quantitative Finance Stack Exchange. I was hoping someone could help me with the following issue. I am ...
user avatar
  • 13
3 votes
2 answers
270 views

EPE for interest rate swap

Hey how to calculate Expected positive exposure in the case of interest rate swap? Assume that I simulate $M$ interest rate paths for time grid $0=t_0\le t_1 \le ... \le t_N = T.$ What is the ...
user avatar
  • 423
0 votes
2 answers
71 views

Creating a set of histories that satisfies certain statistics

I'm looking at a download of BlackRock's capital market assumptions, which gives a bunch of statistics, such as expected and quartiles for asset classes' returns for different timeframes, volatilities ...
user avatar
1 vote
0 answers
102 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 ...
user avatar
0 votes
0 answers
538 views

Probability Distribution at each Simulation Period using Geometric Brownian Motion

I am using the equation $S_t = S_0e^{(\mu-\frac{\sigma^2}{2})t+\sigma\epsilon\sqrt{t}} $ to simulate a financial metric at each $t$, where $t=1$ and $T=5$. Stated in plain English, I am trying to ...
user avatar
  • 75
0 votes
1 answer
123 views

Estimating VaR of bond due to changes in the US yield curve

I am attempting estimate the 99% 10-day VaR of an investment grade bond due to changes in the US yield curve. The data provided is the daily prices of the bond over time. In addition I have the Daily ...
user avatar
1 vote
0 answers
72 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 \\ ...
user avatar
  • 423
0 votes
0 answers
38 views

Do simulated values for IV need to be linked to the simulated series of underlying prices when used together in a Monte Carlo Simulation?

I've been using thousands of simulated stock price series generated with mean and standard deviation of daily returns and Geometric Brownian Motion, and then running these simulated price series ...
user avatar
1 vote
0 answers
81 views

Milstein Scheme for Jump-Diffusion models

Hey in this report (Approximation of Jump Diffusions in Finance and Economics by Bruti-Liberati and Platen) is described the Milstein formula (3.5) for simulation SDE with jump component. How it is ...
user avatar
  • 423
2 votes
1 answer
301 views

Euler Scheme for Jump-Diffusion models

Jump-diffusion models (as Merton) have following SDE: $$dS_t=\mu S_tdt+\sigma S_t dW_t+S_tdJ_t$$ where $$J_t=\sum_{i=1}^{N_t}(\xi_i - 1)$$ $\xi_i$ - i.i.dn $N_t$ - Poisson process Do we in Euler ...
user avatar
  • 423
1 vote
1 answer
104 views

Simulation of Gamma process (distribution of increments)

The gamma process is a Levy process $X$, where $X_t$ has gamma distribution with parameters $at,b>0$ and density $$f\left(x\right)=\frac{b^{at}}{\Gamma\left(at\right)}x^{at-1}e^{-bx}$$ I want to ...
user avatar
  • 423
0 votes
1 answer
171 views

Simulating several paths of stock prices with Heston Model in R

I am working with a Heston model discretization through truncation, given by the following code: ...
user avatar
1 vote
0 answers
40 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 ...
user avatar
  • 11
3 votes
0 answers
52 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 ...
user avatar
  • 141
1 vote
1 answer
215 views

Simulation of Geometric Brownian Motion

I generate 10000 random binomial paths for a stock whose price is from S(0) = 10 out to S(t) where t = 1 year. Assume geometric Brownian motion for the stock price with a drift of 15% per year and a ...
user avatar
6 votes
2 answers
575 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$ ...
user avatar
0 votes
0 answers
80 views

Resources for Bayesian methods

I will be joining a risk management firm in a few months, and I was wondering if some of you could help we with resources on certain methods. Some of the things that I would be called upon to work on ...
user avatar
  • 1
1 vote
1 answer
274 views

Simulating exponential Vasicek/Ornstein-Uhlenbeck

I am trying to simulate commodity prices using the exponential Vasicek/Ornstein-Uhlenbeck model from Schwartz 1997 p. 926 Equation (1). I am using the closed form solution from Vega 2018 p. 5 Equation ...
user avatar
  • 21
0 votes
0 answers
96 views

Real Option Valuation using simulation: real world vs risk neutral measure

I am trying to value a real option in the form of a software investment using a simulation. The software investment yields to daily revenues $R_t$ and costs $C_t$. Here are the formulas for these: $$...
user avatar
  • 1

1
2 3 4 5