Questions tagged [simulations]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
22 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<....
0
votes
0answers
19 views

Counterparty Exposure calculation [closed]

Hey I have some questions about Exposure calculation. I know that this process is based on Monte Carlo methods. Which models are currently the most popular for simulating interest rates, equities, FX ...
2
votes
1answer
153 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/ ...
1
vote
2answers
75 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 ...
0
votes
1answer
52 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 ...
0
votes
2answers
90 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 ...
0
votes
1answer
42 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 ...
0
votes
0answers
30 views

Simulation of a controlled process

My model is the following : Mid price $dS_{t} = b(t,S_{t}) dt + \sigma (t,S_{t})dW(t)$ with $W_{t}$ a brownian motion Ask and buy side spread $\delta^{+}, \delta^{-}$ Inventory $dQ_{t} = dN_{+}(t) - ...
1
vote
0answers
59 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 ...
0
votes
1answer
79 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 ...
0
votes
1answer
47 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 ...
6
votes
1answer
575 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 ...
2
votes
1answer
70 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 ...
0
votes
1answer
65 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. ...
1
vote
1answer
69 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 ...
3
votes
2answers
164 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 ...
0
votes
2answers
65 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 ...
1
vote
0answers
93 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 ...
0
votes
0answers
315 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 ...
0
votes
0answers
45 views

How to calculate Vega using Dupire and MonteCarlo engine with Autograd?

I have implemented a Monte Carlo pricer engine which includes the volatility local model based on Dupire formula. For now I can value several (european) options which I used to validate the model, but ...
0
votes
1answer
87 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 ...
1
vote
0answers
42 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 \\ ...
0
votes
0answers
32 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 ...
1
vote
0answers
56 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 ...
2
votes
1answer
182 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 ...
0
votes
0answers
35 views

Estimating midpoint or realized spread from trade by trade data without order book data

I am looking to estimate the realized spread defined as $$ \text{realized spread} = 2D_k(ln(P_k) - ln(M_{k+5})) $$ Where $D_k$ is 1 for buy transactions and -1 for sell transactions. $P_k$ is the ...
1
vote
1answer
79 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 ...
0
votes
1answer
105 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: ...
0
votes
0answers
42 views
1
vote
0answers
36 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 ...
3
votes
0answers
37 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 ...
1
vote
1answer
149 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 ...
5
votes
2answers
404 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$ ...
0
votes
0answers
75 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 ...
1
vote
1answer
145 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 ...
0
votes
0answers
65 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: $$...
1
vote
1answer
136 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 ...
0
votes
0answers
54 views

Modeling electricity prices ($/kWh) for Simulation

I want to run a Simulation in Matlab that involves the running costs of an electronic device which consists of the power consumption of this said device. The simulation should run for the next 1-5 ...
1
vote
1answer
841 views

Geometric Brownian Motion simulation in Python: strange results

I am trying to simulate Geometric Brownian Motion in Python, however the results that I get seem very strange and in my opinion they can't be correct. My goal is to simulate each day of 1 year. ...
1
vote
2answers
168 views

Jump diffusion simulation

I want to simulate a geometric Brownian motion and we assume that the volatility of the stock can take just two values $\sigma_1=0.2$ and $\sigma_2=0.8$. We also assume that the jumps up from lower ...
2
votes
0answers
459 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 ...
0
votes
0answers
45 views

Simulating two correlated time series using GBM [duplicate]

My situation is the following: I have two time series TS1 and TS2, whereas TS1 is a stock price. According to literature, TS2 is positively correlated to TS1. Furthermore, since TS1 is a stock price, ...
0
votes
2answers
128 views

Reliable random number generation for Monte Carlo

Monte Carlo methods typically require us to construct very large vectors of numbers. In doing so it is often of great importance that the generated random numbers are independent. My question here, as ...
1
vote
1answer
251 views

Does my Python code correctly simulate realizations of a CIR process?

I've written the following function which should simulate realizations of a CIR process: ...
1
vote
2answers
174 views

Simulating artificial asset prices: Random walk vs Brownian motion?

How well can each simulate the real-life behavior of stock prices, and what considerations or (dis-)advantages must we be aware of when deciding to use each: Random walk with drift Random walk ...
2
votes
0answers
26 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 ...
1
vote
0answers
142 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? ...
0
votes
0answers
43 views

Simulation of price ratios

How to go about simulations of variables like price-to-book or dividend yield? Basically I would like to do a simulation based testing of an investing strategy (other than historical simulation). It’s ...
1
vote
0answers
33 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: ...
2
votes
1answer
146 views

Continuous Percentage Profit and Loss calculation

I need to calculate a profit and loss for an equity timeseries. The position size (column D in the below table) is not binary (not moving from zero position to a position and then back to zero ...

1
2 3 4 5