# 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.

259 questions
Filter by
Sorted by
Tagged with
33 views

### How can we simulate daily return based on multi-factor model?

This is an interesting question for simulation. The question is a bit lengthy but I'm trying my best to make it super clear here. Now I have some multi-factor model, say some US barra risk model from ...
105 views

54 views

### Valuation via decomposition or via simulation of the underlying?

My question might be very straight forward but I have seen both approaches being followed in practice so I am curious to see if there are arguments in favor or against each one. I am explaining my ...
298 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 ...
33 views

### VEC model on log prices, for random simulation?

In the context of pair trading, I’m trying to regress a VEC model on cointegrated pairs (and also a GARCH model on the residual of that VEC model).I would like to generate random réalisations of each ...
53 views

### Does Backtrader and QuantConnect collect any data?

Building an API that integrates with backtrader and QuantConnect to run some backtests. I'm passing in machine generated data and I just want to make sure I'm not sending them too much stuff. so what ...
109 views

### Fatigue with Historic Backtesting - Alternatives?

It seems to me like historic backtesting is the best of bad options out there for me to test my systematic strategies - even ones that are more macro-level trend spotting. I can't test enough ...
130 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 ...
123 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}^{...
43 views

### Estimating Returns with the Non-Central t-distribution

The Boost C++ Libraries provide a set of statistical distributions in their Math Toolkit library. The best candidate I can find among those available that will capture skew and kurtosis typically ...
1 vote
107 views

### Longstaff-Schwarz LS Monte Carlo - which approach is correct? [closed]

I'm trying to understand Least-Square Monte Carlo approach for pricing american options. I'm familiar with Tsitsiklis and van Roy (2001) approach where we are going backwards with: $V_T = h(S_T)$, ...
1 vote
137 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 ...
66 views

### Heston Process: Accept-Reject Sampling to Alleviate the Problem of Negative Variances

I've read even in recent papers, and on page 21 of the book "The Volatility Surface" by Jim Gatheral (2006), all the debate over whether to reflect or truncate negative variances whilst ...
202 views

### Choosing a time step in Monte Carlo simulation of forward rates in LIBOR Market Model

Lets talk about the Monte Carlo simulation of forward rates in Euler discretization scheme under the $T_N$-forward measure, a so called terminal measure. Suppose that we have a number of time steps ...
1 vote
37 views

### Inflation in wealth forecast [closed]

I am building a model to simulate people's wealth in the next years. Say Mr X has a portfolio with an expected return of 3% (annual). From this I can simulate the return of his portfolio in the next ...
245 views

### Optimize interest rate swap calculations in Monte Carlo Simulation

I’m running a simulation in which I want to calculate the NPV of 100 swaps over 1000 (or even much more) different interest rate curves. It looks like Quantlib is not really fast in performing these ...
1 vote
225 views

431 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 ...
108 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 ...
1 vote
184 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 ...
1 vote
358 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 ... 180 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_{...
124 views

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 ...
1 vote
110 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) ...
156 views

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 $... 1 vote 1 answer 487 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 ... -1 votes 2 answers 427 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 ... 0 votes 1 answer 92 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 ... 0 votes 0 answers 204 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<.... 407 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
577 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 ...
1 vote
277 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 ...
419 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 ...
170 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 ...
1 vote
101 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 ...
210 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 ...
59 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 ...
871 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 ...
208 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 ...
178 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
98 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 ...
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 ...