13

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


12

Except in highly unusual cases, financial PDEs lack analytic solutions. The mathematical tools used are Monte Carlo, plus the usual ones for solving PDEs on grids, almost always one of the following: Trees, for very simple cases Explicit finite differencing, for throwaway projects or very specific cases Implicit or Crank-Nicolson finite differencing for ...


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

I believe this is a nice paper for you to start with. Check out what references it cited and who cited it. Markov Chain Monte Carlo Analysis of Option Pricing Models "Use the Markov Chain Monte Carlo (MCMC) method to investigate a large class of continuous-time option pricing models. These include: constant-volatility, stochastic volatility, price jump-...


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

You may want to look into these two open source projects: QuantLib which is aimed at providing a comprehensive software framework for quantitative finance. This is written in C++. JQuantLib the 100% Java implementation based on the first project.


6

Check this document out: link to pdf file Also, if you are concerned with actual performance of your code and want to implement efficient code then gsl libraries would be the first place look at: link. It's got everything you need.


6

For such high-dimensional path problems you will want to use the Morokov technique (you can find the paper online), which takes QR samples for the "important" dimensions and then reverts to pseudorandom for the less important dimensions in an interest rate problem remarkably similar to yours. (Similar principles apply to using QR sequences in factor model ...


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

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

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)$, ...


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


4

Here are a few more papers about MCMC and alike methods for derivative pricing and co. : Blanchet-Scalliet, Patras - Counterparty risk valuation for CDS Jasra, Del Moral - Sequential Monte Carlo Methods for Option Pricing Frey, Schmidt - Filtering and Incomplete Information in Credit Risk Peters, Briers, Shevchenko, Doucet - Calibration and Filtering for ...


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

As far as I know, differential equations such as the Black-Scholes PDE are solved once analytically and then the result is used directly. If a given derivatives-pricing differential equation could not be solved analytically, it would probably be better to model it numerically using Monte Carlo methods than to derive a complicated PDE which must then be ...


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

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

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


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