17 votes

Strictly local martingales: what is the intuition behind them?

I think to understand the martingale/local martingale distinction, it helps to bring in a third class of processes, the uniformly integrable martingale. I would argue that the local martingale and ...
user avatar
  • 1,780
12 votes

Do basket options have a closed form valuation formula?

I'm not completely certain from your question, but I'm going to assume you have a basket of $n$ stocks with prices $S_0(t)$ to $S_n(t)$, and you want to price an option with payoff at $C(\tau)$ at ...
user avatar
  • 2,856
10 votes
Accepted

How to simulate Levy processes

You have many different options. Firstly, you know the characteristic function for the log stock price and, using inversion, you can recover the (inverse) distribution and density function and ...
user avatar
  • 13.9k
8 votes
Accepted

How are Brownian Bridges used in derivatives pricing in practice?

Yes, the term Brownian Bridge seems to be used loosely. I assume you are talking about continuously monitored barriers by the way, since you mention the probability of the barrier being crossed in ...
user avatar
  • 511
6 votes

Pricing a log-contract using Monte Carlo

By definition, the payoff of a log-contract of maturity $T$ writes $$ \phi(S_T) = \ln\left(\frac{S_T}{S_0}\right) $$ Let $\Pi_t$ denote the $t$-value of such a contingent claim. We are interested in ...
user avatar
  • 14k
6 votes

Simulating trading strategies

Is there a place online where you can simulate strategies programmatically? Your best choice is most likely a service such as Quantopian or QuantConnect. Quantopian provides equity and futures data ...
user avatar
  • 1,132
6 votes
Accepted

negative values in geometric brownian motion

I agree with wrong formula in simulation, but think i understand the question. Here's my take on it: The reason SDE may seem to allow a negative value of x is because dW can be a large negative ...
user avatar
  • 111
6 votes

Risk Neutral and Real World Valuations using Monte Carlo

You probably wonder whether $\mathbb{E}^\mathbb{P}[P_T\mid\mathcal{F}_t]= \mathbb{E}^\mathbb{Q}[P_T\mid\mathcal{F}_t]$. Note the $T$ as index, i.e. the future unknown payoff and not the current price $...
user avatar
  • 13.9k
6 votes
Accepted

Risk Neutral and Real World Valuations using Monte Carlo

Just to add to the answer by @Kevin : There are at least two things going on here. First of all let $\{Q_i \}$ denote a set of equivalent probability measures, which includes your $P$ and $Q$ above. ...
user avatar
6 votes
Accepted

Simulating covariance matrices with nonzero correlation

What does 'simulate a covariance matrix' mean? If the question means, generate an arbitrary correlation matrix for 1000 stocks, then we can choose any symmetric matrix with all 1s down the diagonal, ...
user avatar
  • 2,856
6 votes

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

That is a tricky question because interpolation seems to be ok if you need one point $\tau$ between $t_k$ and $t_{k+1}$ but it is not. The difficulty arise a direct way if you want two points inside $[...
user avatar
  • 10.6k
5 votes

Quantum Computing for Quantitative Finance

Try Quantum for Quants, which has contributions from people working actively in quantum computing, and some small scale examples solved on the D-Wave Systems Quantum Annealer. The picture below is ...
user avatar
5 votes

Exploding Libor Rates in Libor Market Model

this is a well-known problem. One solution is to make volatility zero when rates exceed a certain high level. It's less problematic than it looks because any cash-flows generated will be divided by ...
user avatar
  • 6,763
5 votes
Accepted

Model reference price of Limit order book

This reference price is also sometimes called intrinsic price. One of the simplest ways to improve it in regards to the mid-price (assuming you have the depth data) is the following: define a ...
user avatar
  • 962
5 votes

How to generate simulated stock price from historical data using R?

This approach is rather crude. It only takes the mean and volatility of the historical returns and assumes a very simple model. I'm not sure if you have much experience with Time Series, but your ...
user avatar
5 votes

Terminal Variance in the Heston Model

From the equations of the model it is clear that $v_t$ is the instantaneous variance of the log-returns, not the terminal annualised variance of the log-asset price. Put differently, you are you ...
user avatar
  • 14k
5 votes

Python libraries for Monte Carlo simulations?

Try Quantlib https://www.quantlib.org, it comes with everything you need.
user avatar
  • 103
5 votes
Accepted

Simulating from a multivariate clayton copula

Since I think this is of interest for other people, I will post the approach I found: First, let $C_n(u_1,\ldots,u_n)$ be a $n$ - dimensional Clayton copula with generator function $F$ and inverse $F^...
user avatar
  • 363
5 votes
Accepted

What is actually going on in Monte-Carlo simulation for Mortgage backed securities?

In my understanding, the mortgage prepayment option, at any point in time, is a function of the value of the mortgage from that point in time forward. This value, in turn, is a function of the future ...
user avatar
  • 5,853
5 votes

Reliable random number generation for Monte Carlo

You have misunderstood the statement in Matsumotos original paper. The original Mersenne twister guarantees, over its period of $2^{19937}-1$ (a number which I am sure you will agree is larger than ...
user avatar
5 votes

Correct Monte Carlo simulation of local volatility models

[I think] the problem is with the SDE, rather than the numerical scheme At a glance, and as I commented, I think the issue you are coming up against stems more from the underlying SDE rather than the ...
user avatar
  • 1,359
5 votes
Accepted

backtesting guide for research

This was too long for a comment, so I'm writing it as an answer. I have provided some interesting literature that will give you insight into the common pitfalls of backtesting algorithmic trading ...
user avatar
  • 3,753
5 votes
Accepted

Why we introduce correlations between Wiener processes?

Suppose we model two stocks by \begin{align*} \text{d}S_1 &= \mu_1S_1\text{d}t+\sigma_1S_1\text{d}W_1 \\ \text{d}S_2 &=\mu_2S_2\text{d}t+\sigma_2 S_2\text{d}W_2 \end{align*} where $\text{d}W_1\...
user avatar
  • 13.9k
4 votes
Accepted

Historic Value at Risk - Ratios vs. Differences

As a short summary and adaption of the question: You better redefine $\hat{r}_i= \frac{S_{i-1}}{S_1}-1$ and $\hat{S}_i = (1+\hat{r}_i)S_0$. The above definition of $\hat{S}_i$ yields a sample of ...
user avatar
  • 13.3k
4 votes

Getting the next price of a GBM with reversion

The formula is given in your link. For the real world probability without jump: $$x_t = x_{t-1} e^{-\eta \Delta t} + \hat{x}(1-e^{-\eta \Delta t}) +\sigma \sqrt{\frac{1-e^{- 2 \eta \Delta t}}{2 \...
user avatar
  • 1,169
4 votes

how to derive critical values for augmented Dickey–Fuller test (ADF) using Monte Carlo method?

The ADF test assumes the DGP $$ \Delta y_t = \alpha +\beta t +\gamma y_t +\delta_1 \Delta y_{t-1}+\cdots +\delta_k \Delta y_{t-k}+\epsilon_t $$ The parameters are estimated using OLS on a sample of ...
user avatar
  • 4,227
4 votes

Simulating a path of bond yields by Monte Carlo (Python)

I do not know Python but this is what I would do in Excel (I am assuming you are familiar with Excel and can then translate the steps into Python: Pick a time series of Bond Yields which has $n$ ...
user avatar
  • 5,325
4 votes
Accepted

Monte Carlo - Multivariate Simulation of Returns

You should apply it to the covariance matrix and from that compute the correlation matrix. Here's an example correlating 3 random normal variables. Let: $$ \bf Y \sim \mathcal N(0, \Sigma) $$ where ...
user avatar
  • 6,820

Only top scored, non community-wiki answers of a minimum length are eligible