Questions tagged [simulations]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
45 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
547 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
63 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
64 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
67 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
131 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
64 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
85 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
126 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
37 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
72 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
39 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
54 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 ...
1
vote
1answer
146 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
32 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
77 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
100 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
39 views
1
vote
0answers
35 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
36 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
139 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
357 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
73 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
122 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
53 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
107 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
680 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
165 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
378 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
39 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
121 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
199 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
161 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 ...
1
vote
0answers
22 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
135 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
32 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
143 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 ...
0
votes
0answers
65 views

Matlab: Simulation of Random Walk

I want to simulate a random walk in Matlab: I've found this code but it doesn't work. I have an error with the function S.simByEuler. Someone can explain me how to solve the error? ...
2
votes
2answers
380 views

Modeling Slippage without Order Book data

I am building a portfolio simulator and finding ways to make it more 'realistic'. For example, giving the option to reinvest dividends, include capital gain taxes, commission/fees (fixed for now) etc. ...
1
vote
2answers
456 views

Do basket options have a closed form valuation formula?

Suppose I'm simulating a European call option on a basket consisting of N stocks with slightly varying volatilities but all other parameters remain the same. From the perspective of an estimate, it ...
-2
votes
1answer
707 views

How to simulate Poisson and Compound Poisson process

someone knows, maybe websites / blogs where I can find tips (preferably ready codes) to simulate the trajectory of processes? So far I only need the Poisson process and the compound Poisson process ...
0
votes
0answers
77 views

Block Bootstrapping for synthetic data

I am trying Block Bootstrapping for synthetic data generation. For example in http://www.blackarbs.com/blog/synthetic-data-generation-part-1-block-bootstrapping the author @blackarbsceo use data from ...
1
vote
1answer
64 views

Do stationary prices need to be differenced for VaR?

I have a time series of electricity futures prices that I have shown to be stationary via the Augmented Dickey Fuller test (alpha = 0.05). Does that mean that, in calculating their individual values-...
1
vote
3answers
289 views

Simulating covariance matrices with nonzero correlation

How would you simulate a covariance matrix of 1,000 stocks where each pair has nonzero correlation? I have literally no idea how to start with this. Any suggestions?
2
votes
1answer
405 views

simulate volatility surface

Assuming I have a stochastic volatility model for an asset, if I wanted to use it for pricing I would proceed in the following way: Use Euler discretization to simulate a sample path of the price and ...
2
votes
1answer
73 views

Multivariate MC: what am I doing wrong?

I am trying to generate multivariate MC results presented in this paper A Simple Generalisation of Kirk’s Approximation for Multi-Asset Spread Options by the Lie-Trotter Operator Splitting Method, by ...
0
votes
1answer
437 views

Correct way to calculate interest rate volatility for risk calculations

I'm trying to include interest rate derivatives in some Value at Risk calculations and am having trouble getting trustworthy values. My current approach is to look at the appropriate risk factor for ...

1
2 3 4 5