Skip to main content
11 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 ...
StackG's user avatar
  • 3,036
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 ...
Kevin's user avatar
  • 16k
9 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 ...
Yian Pap's user avatar
  • 521
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 ...
Quantuple's user avatar
  • 14.7k
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 ...
Theodore's user avatar
  • 1,172
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 ...
polarbear's 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 $...
Kevin's user avatar
  • 16k
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, ...
StackG's user avatar
  • 3,036
6 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 ...
Pleb's user avatar
  • 4,286
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 $[...
lehalle's user avatar
  • 12.2k
6 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\...
Kevin's user avatar
  • 16k
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 ...
Mark Joshi's user avatar
  • 6,973
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 ...
Serg's user avatar
  • 1,022
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 ...
user24039's 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 ...
Quantuple's user avatar
  • 14.7k
5 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 ...
phdstudent's user avatar
  • 8,381
5 votes

Python libraries for Monte Carlo simulations?

Try Quantlib https://www.quantlib.org, it comes with everything you need.
user34031's user avatar
  • 143
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^...
simzoor's user avatar
  • 383
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 ...
Kermittfrog's user avatar
  • 6,663
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 ...
Forgottenscience's 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 ...
oliversm's user avatar
  • 1,389
5 votes
Accepted

Optimize interest rate swap calculations in Monte Carlo Simulation

Yes, it's possible. You can create the 100 swaps and their engines beforehand and only change the curves. If you're using the same discount curve for all swaps, you can even create just one engine ...
Luigi Ballabio's user avatar
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 ...
Kiwiakos's user avatar
  • 4,337
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$ ...
AlRacoon's user avatar
  • 6,612
4 votes

How to model High/Low prices for Stocks with Monte Carlo

Some time ago I wrote an Octave C++ function to do just what you want and blogged about it on my blog. The link to the relevant post is https://dekalogblog.blogspot.com/2011/08/creation-of-synthetic-...
babelproofreader's user avatar
4 votes

Shifted Log-Normal model

Let us assume we are interested in some (forward) rate $F_t=F(t,T)$ which we assume is log-normally distributed: $$\text{d}F_t=\sigma F_t\text{d}W_t$$ However, we observe market rates can in practice ...
Daneel Olivaw's user avatar
4 votes
Accepted

Monte Carlo simulations in Python using quasi random standard normal numbers using sobol sequences gives erroneous values

It is happening because you're using the same (psuedo/quasi) random numbers for each time step. in your code here: ...
will's user avatar
  • 2,571
4 votes

Difference between cross-validation, backtesting, historical simulation, Monte Carlo simulation, bootstrap replication?

As with many things, particularly in machine learning and AI, I think you will find that these processes do not have a unique, logically or mathematically defined description. More so I would say that ...
Attack68's user avatar
  • 10.5k

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