Skip to main content
3 votes

Is there Multilevel Monte Carlo in QuantLib?

There's no multilevel MC in the library. I guess it could be implemented as a class similar to McSimulation (see this link) which puts together a number of ...
Luigi Ballabio's user avatar
3 votes
Accepted

Why do we use a simple average for pricing options in MonteCarlo?

I assume you are talking about taking a probability-weighted average instead of equal-weighted? There is no need for that because naturally a simulated stochastic process will end up more in the ...
KaiSqDist's user avatar
  • 1,419
2 votes

Monte Carlo based mean variance optimization

It seems the MC method is only used to namedrop theory in this case. Yes, you can simulate 10,000 sets of weights to form a cloud of ER to risk plots, but since you're going to solve it with ...
Alon Benach's user avatar
2 votes

Why do we adjust the drift in the geometric brownian motion

I assume you are talking about this: $dS_t = \mu S_t dt + \sigma S_t dW_t$ with the solution to the SDE above given as: $S_t = S_0 exp((\mu - \sigma^2/2)t + \sigma W_t)$ The drift is the $\mu$ term ...
KaiSqDist's user avatar
  • 1,419
2 votes

Pricing European Call Closed Form Spread Options in Python

Firstly, you can really use Margrabe's formula (as @Rylan said). It's exact solution, so there is good first test. You can use numerical integration (scipy methods for example) for test your Monte-...
K. Roman's user avatar
2 votes

Generating normally distributed random numbers using Sobol generator in QuantLib

As Dimitri said, the initialization of the RNG should be outside the loop. The dimension parameter is, roughly speaking, how many random numbers you need for one sample. If one of your trials consists ...
Luigi Ballabio's user avatar
2 votes

My Montecarlo Simulation is not working?

Even with 2000 simulations, you may not get the expected return and volatility as your estimated parameters. Try running your monte carlo with more simulation paths and this should close the ...
AlRacoon's user avatar
  • 6,632
2 votes

My Montecarlo Simulation is not working?

Your sigma seems to be incorrect, the sigma used should be annualized. Therefore, if you use your mean of standard deviation, you need to multiply it with $\sqrt{252}$. I do not think there is ...
KaiSqDist's user avatar
  • 1,419
1 vote

What day count convention for pricing

Every market and product has its own pricing conventions that participants are just expected to know. Would guess most vol markets are actual/365 for black-scholes day-count while most swap markets ...
river_rat's user avatar
  • 1,080
1 vote
Accepted

How to fix my Monte Carlo simulation?

The problem is that the Heston process describes variance as a mean-reverting process (towards theta). Therefore, if you specify variance as higher than 0.0398 (the theta level it reverts to), the ...
KaiSqDist's user avatar
  • 1,419
1 vote

Simulating the Term Structure of Interest Rates in the CIR model

A theoretically sound IR process always reflects today's yield curve. Compounding short rates does not sound reasonable, say today's short rate is 1% and the 1 month spot is 2%, you are way off ...
Arshdeep's user avatar
  • 2,451
1 vote

Sample Wiener process constrained to open (initial), high (max), low (min), close (final)

You can do this (within some small $\epsilon$) using the reflection principle. Let's take the simpler case, where you only want to constrain the maximum. Adding the minimum is a fairly simple ...
Brian B's user avatar
  • 14.9k
1 vote
Accepted

Present value of an FX Forward contract at each simulation and time point node of a Monte Carlo simulation

An answer has already been provided in this discussion: How to price the FX forward contract under stochastic interest rates? Here is a summary of the (backward) derivation of equation (1): $$ V_{t} = ...
Whitebeard13's user avatar
1 vote
Accepted

Average time it takes to test a strike?

The question is still quite unclear. Assuming you want to solve it mathematically you need to provide at least some assumptions regarding the underlying process/distribution. Assuming you want to ...
MrLCh's user avatar
  • 175
1 vote

Clustering of Maximum Drawdown Values in Monte Carlo Simulations (Jaekle & Tomasini example)

I do not know the book or that dataset (which, I think, is from package quantstrat?). But it seems that your pnl is daily profit/...
Enrico Schumann's user avatar
1 vote

Why do we adjust the drift in the geometric brownian motion

To (hopefully) provide some additional info to the existing answer: Following the notation of Lars Tyge Nielsen, stock prices $S_t$ at time t follow a lognormal distribution in the ...
AKdemy's user avatar
  • 9,014
1 vote

Use `LocalVolTermStructureHandle` in Python QuantLib

As of QuantLib 1.30, you can sample your local volatility over a grid and pass the results to the FixedLocalVolSurface class.
Luigi Ballabio's user avatar
1 vote
Accepted

Method for using Historical Simulation method on an Instrument priced using Monte Carlo

I have been able to get a hold of the man again and he clarified for me. Suppose you are running the Monte Carlo Simulation 10,000 times. You are not going to feasibly be able to re-price the asset ...
jonathan's user avatar
  • 133
1 vote

Method for using Historical Simulation method on an Instrument priced using Monte Carlo

I am not sure what you mean by your second point, but to my knowledge, computing historical Value at Risk on a derivative is a full valuation exercise where you use historical data to simulate changes ...
arida's user avatar
  • 11
1 vote
Accepted

Forward Black Implied Volatility For Within Risk Neutral European Option Pricing

The 'model free forward implied volatility' is pretty useless for your purposes. First of all, it doesn't say anything about the price of future IVs, which you need, and worse it's pretty much ...
Frido's user avatar
  • 1,906

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