14

This is in fact a tricky matter. As you say one way is to calculate delta by an analytic formula, i.e. calculate the first derivative of the option pricing formula you are using with respect to the underlying's spot price. The second way is to do it numerically, i.e. change the spot price by a small value $dS$, calculate the value of the option and then ...


10

Not so fast! I think it is of the utmost importance to first examine whether the data points are real outliers, i.e. noise that is contaminating the data, or perhaps the most important pieces of the time series! For example when you look at US stock market data of the last 50 years and remove only the ten biggest moves because they are outliers you get a ...


8

Fastest method is a pre-generated lookup table with carefully selected in-memory structure so you don't get too many CPU cache misses (avoiding the memory latency). If you want an absolute speed, you also can go for a hardware specific implementation (GPU, FPGA).


8

The method described in Hallerbach (2004) always worked well for me. We derive an estimator for Black-Scholes-Merton implied volatility that, when compared to the familiar Corrado & Miller [JBaF, 1996] estimator, has substantially higher approximation accuracy and extends over a wider region of moneyness.


8

By definition the fair value of an option is given by an expectation value of the payoff, $\mathbf{E}\left[\textrm{payoff}(\textit{paths})\right]$. The probability distribution of the paths is the risk neutral measure. This is just an integral expression of the form you wrote. This applies to all option prices. Many options are, of course, special in the ...


6

Let's Be Rational uses exactly two iterations to give full machine accuracy for all inputs. It can be viewed as a three-stage analytical formula if you like. The code is free to download at www.jaeckel.org. Rgds, Peter


6

As far as PDEs (deterministic) are concerned we have the notion of a "strong solution" (directly solving the differential operator in the strong formulation of the problem) and the "weak solution" that deals with a weak formulation of the problem. For the strong formulation, finite differences are the way to go since they are the natural discretization of ...


6

I am not sure if I understood your question correctly but I will try to answer it anyway. If you have a standard normal random vector $z \sim N(\mathbb{0},I_n)$ (where $z,0 \in \mathbb{R}^{n\times1}$ and $I_n \in \mathbb{R}^{n\times n}$ is the identity matrix) and you want to transform it into a multivariate normal $x \sim N(\mu,\Sigma)$ you do it the ...


6

To keep things simple let's assume you have a perfect random number generator (i.e. I will discuss only the statistics not the numerics of the problem). I will also focus on the practical matter and gloss over some mathematical details. From a practical perspective "convergence" means that you will never get an exact answer from Monte-Carlo but ...


6

The question requires you to provide a method which uses uniform random variables and transforms them to generate realizations of the described asset values. To give a bit more general answer: this is solved by the inverse transform sampling method. The main idea is to obtain realizations of a random variable $x$ with any given distribution function $F(x)$, ...


6

Indeed, the FFT was a notable improvement in computational option pricing in 1999, but further investigation has shown that it can be easily optimized both in terms of speed and accuracy. For instance, this paper compares the traditional FFT with a strike optimized version of the Carr-Madam formula (CM-OPT), concluding that the CM-OPT is simultaneously ...


5

FDMs represent PDEs over a simple grid shape; the different implementations are just different recurrence relations to approximate the solutions to the PDE between boundary values (e.g., for options pricing, $T=[t_\mathrm{now},t_\mathrm{maturity}]$ and $S=[\mathrm{deep\_itm},\mathrm{deep\_otm}])$. FEM is a general name for a lot of different ...


5

When you decide if the performance improvement is worth it you can add these to the downside ow using single precision: the result of your basic B-S pricer will eventually need to be multiplied with a notional and maybe a discount factor; For a sufficiently large notional you will see different results than the one calculated using double precision. Is that ...


5

C is not used for any particular reason in numerical optimizations other than for legacy reasons. However, there are areas where C is preferred over C++ though even C is not the preferred language of choice. To mind comes programming FPGAs. Though VHDL and Verilog are by far the standards. But "behavioral synthesis" allows to utilize C or C relatives such as ...


5

There has been a huge amount of work on this. Generally a Fourier transform approach is used. First, be careful to use the form of the characteristic function that does not wind about zero in order to avoid having to count the normal of windings. Second, using contour shifts can make the integral much better behaved. eg integrate along the line with $0.5$...


5

The issue is that you do not plot one sample path but for each time point $t$, you simply plot one possible realisation of the random variable $S_t(\omega)$. Thus, you don't get a connected path. (Just as a minor, you would need brackets in the exponential in your for loop, i.e. X_analytic[i] <- X_analytic[1]*exp((mu - 0.5*sigma^2)*time[i] + sigma*Z[i-1]...


4

who told you that ? I am used to create new trade systems in C++ to make the customers requirements feasible. CERN used C++ to prove higgs boson particle. I see people using C to program embedded like microwaves or fridges :D but it is just my opnion, I would like to hear others.


4

Working on trigonometric polynomial decomposition, the first step is to take a big look at Fourier transformation. It is very powerfull, well documented and probably well implemented on your favorite language. It will give you the decomposition of your time series. You can remove highest frequencies, which correspond to noise, to have a good estimation.


4

The word cubature is just a replacement for quadrature in the infinite dimensional setting, such as the Wiener space as in the answer from @TheBridge. The term is used in the context of integrating functionals of stochastic processes $$ E[F(X)] $$ where X is random variable valued in a functional space such as a the solution of a SDE or simply the Brownian ...


4

There are some other references: Li and Lee (2009) [download] An adaptive successive over-relaxation method for computing the Black–Scholes implied volatility Stefanica and Radoicic (2017) An Explicit Implied Volatility Formula Related discussions on the implied volatility inversion: How can the implied volatility be calculated? What is an efficient ...


4

There is a qualitative shift in the shape of the density. When V is small it is monotone decaying. When V is large it looks more like a Gaussian. Another reason he uses two schemes is that he wants match two moments of the density. When V is small, the moment matching equations for the quadratic Gaussian are unsolvable. When V is large they are unsolvable ...


4

the output of an MC simulation depends on the random numbers used and if the distribution used is not too weird, after 10,000 runs you will get an answer that is distributed $$ \mu + \frac{\sigma}{\sqrt{n}} Z, $$ with $Z$ a standard normal. Here $n=10,000.$ With $\mu$ the quantity you want and $\sigma$ the standard deviation. So you won't get precisely the ...


4

I'd use FFT or similar rather than direct integration. Here is an old paper with Heston example: Option pricing using fractional FFT


4

To test your programming skills, try QuantLib. Can you do interest-rate modelling with QuantLib? Can you debug the 10-level C++ template? Do you know how to use day count? Do you know how to use business calendar? Do you know how to link a forward curve with a LIBOR market index? Do you know how to calibrate a model? If you could, you have proven yourself a ...


4

Ikonen and Toivanen don't say that the LCP is solved exactly, they simply say that the modified back-substitution is a valid algorithm to solve the LCP. A numerical error may arise around the location of optimal exercise, since it does not fall directly on the finite difference grid. I think that however, the error is of the same order as the discretization ...


4

To compute the price of an American option or a callable instrument in general, at each potential exercise date, one is required to compare its continuation value (discounted risk-neutral expectation of what the option would pay off if it was not exercised) to the relevant exercise value/early redemption price. By construction, lattice and finite difference ...


4

1> Analytical - Black Scholes formula for Vanilla European options, Digitals. These valuations are just an "interpolation" of traded options. We interpolate the implied volatility from the traded points on the implied volatility surface. There is no modeling assumption involved here. Market uses this formula for implementing the "interpolation". Scope for ...


4

I would start by saying that yes, this is an acceptable precision. However, the reason you are not getting the same result is because, by default, QuantLib has accuracy=1.0e-8 and maxEvaluations=100. You can set these parameters like this: bond.bondYield(bond_price, dayCount, ql.Simple, ql.Quarterly, ql.Date(), 1.0e-16, 100) This will get you much closer....


3

The Papageorgiou paper is presumably referring specifically to quasi-random sequences used in path generation. Researchers had noticed that, in high dimensions, QR sequences tend to have good space coverage for the first couple of dimensions: but terrible coverage for the latter dimensions: (Plots here are points 101-200 from a 32-dimensional QR sequence)...


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