Questions tagged [numerical-methods]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
5 votes
0 answers
131 views

SABR-LMM: best way to perform a MC simulation

I am working on a SABR-LMM model with the following system of SDEs under a numeraire $N$: $$ \begin{align} &\mathrm{d} F_i(t) = \sigma_i (t) (F_i(t) + s)^{\beta} \Big( \mu^f_i (t) \mathrm{d}t ...
user avatar
  • 51
1 vote
1 answer
96 views

Black Scholes PDE discretization

We can solve the Black Scholes PDE by numerical methods like Euler \begin{equation} \frac{\partial V}{\partial t} + rS\frac{\partial V}{\partial S}+\frac{1}{2} \sigma^2 S^2\frac{\partial^2 V}{\partial ...
user avatar
  • 37
1 vote
0 answers
67 views

Issues with calculating IV with options bar data

I am currently working with some options OHLC data (30 minute bars) from IBKR for a range of strike prices, maturities and for both calls/puts. For each bar, I am trying to back out the IV (crudely ...
user avatar
  • 53
1 vote
2 answers
194 views

Estimating conditional expectation using monte carlo and least squares regression

I'm looking to understand the problem of least squares monte carlo that is used in valuation of bermudan options, but from a simpler context. Say I have random variables $X$ and $Y$ which are uniform [...
user avatar
2 votes
0 answers
110 views

Numerical scheme for this HJB equation

Without dwelling on details on how to obtain the HJB equation for this problem, I would like to know if the scheme I wrote for solving it numerically is viable or did I miss something. I need to solve ...
user avatar
  • 118
7 votes
0 answers
276 views

Solving option market making problem

I am currently working on a paper for quoting option as a market maker from Bastien Baldacci , Philippe Bergault & Olivier Guéant Without dwelling on details on how to obtain the HJB equation for ...
user avatar
  • 118
1 vote
0 answers
72 views

Choice of grid for numerical integration

I have to compute an integral involving the characteristic function for pricing options in a model and it so happens that accurate approximation seems to be mostly about putting lots of points in ...
user avatar
  • 2,356
0 votes
0 answers
48 views

Expected value of stepwise function of Prospect Theory as improper integral

I am looking for a sufficiently precise solution algorithm to evaluate the following integral: $$\int_ {-\infty} ^ {\infty} {v(x)} {f(x)} dx$$ where $v(x)$ is the Prospect Theory value function and $f(...
user avatar
  • 178
2 votes
0 answers
86 views

Bermudan pricing in Black-Scholes

Is there an "analytical" method to price American options (approximated as daily Bermudans) in the Black-Scholes model using backward induction? $$V_T(S) = \max(K-S, 0)$$ $$V_{T-\Delta t}(S) ...
user avatar
-4 votes
1 answer
97 views

How to identify between Analytical, Numerical and ML Model based option pricing? [closed]

I am new to Quantitiative Finance. Coming from Computer Science domain, I wanted to clear the key distinguishing factor between analytical, numerical and ML based models for option pricing. As far as ...
user avatar
1 vote
1 answer
88 views

Method to retrieve implied density for a mixture of local volatility model

Given a mixture model of two local volatility models, the price for an option is given by: $$V(K,T) = p V_{loc1}(K,T) + (1-p) V_{loc2}(K,T)$$ where $V_{loc}(K,T)$ is the price of the option given a ...
user avatar
5 votes
1 answer
141 views

Importance sampling for Monte Carlo with local volatility in practice

I am given a diffusion with a local volatility to price barrier options: $$dX(t)=X(t)\mu dt+X(t)\sigma(t,X)dW_t$$ I want to use Importance Sampling to price barrier options "far" out of the ...
user avatar
1 vote
0 answers
53 views

Programming the Milstein method and computing the increments

In the wikipedia article on the Milstein method, the following python code to simulate a geometric Brownian motion is presented: ...
user avatar
  • 201
1 vote
1 answer
55 views

Fitting parameters given an inverse function. (Orosi, 2015)

In trying to replicate Orosi's (2015) 5-parameter implied volatility model, but I can't wrap my head around the parameter fitting procedure Orosi proposes. My main goal is to calibrate the model to my ...
user avatar
  • 35
5 votes
0 answers
120 views

Integrated Delta does not seem to be smooth (ATM, Heston)

I am interested in an integrated call option that removes the dependence on time, $$I(S)=\int_0^\infty C(S,t)\text{d}t.$$ Because the value of a call option is a smooth function, I expect this ...
user avatar
  • 13.7k
5 votes
1 answer
164 views

Likelihood ratio and pathwise sensitivity method for coupled SDEs

I have two coupled SDEs \begin{align*} dS_t=rS_tdt+V_tdW_t^{(1)},\\ dV_t=aV_tdt+b(V_t)dW_t^{(2)},\\ \end{align*} where $W_t^{(1)}$ and $W_t^{(2)}$ are independent Brownian motions, initial input data ...
user avatar
2 votes
2 answers
346 views

Quasi Monte Carlo and Brownian bridge (how to combine them)

I am trying to understand how quasi Monte Carlo (QMC) and the Brownian bridge (BB) can be combined to price an asset, but I am having a hard time understanding how. I am just considering a European ...
user avatar
3 votes
0 answers
236 views

Implementation of solvers for curve construction

I'd be really interested to hear people's experiences of implementing global solvers for curve construction, especially with regard to how robust the approach is in practice, numerical performance, ...
user avatar
  • 129
7 votes
1 answer
397 views

Hyperbolic and Elliptic PDEs in Quant Finance

Parabolic PDEs (e.g. heat equation) are closely linked to finance via the Feynman Kac Theorem. Do other types of PDEs appear in quant finance? Elliptic PDEs don't contain a time dimension (so perhaps ...
user avatar
  • 73
4 votes
4 answers
185 views

Asymptotics of Call Option as $S\to0$

Let $C(S)$ denote the (initial) value of a call option with underlying spot price $S$. I assume that the underlying has continuous sample paths (not necessarily a geometric Brownian motion though). As ...
user avatar
  • 656
1 vote
0 answers
63 views

Implicit Scheme for Cox-Ingersoll-Ross Model PDE

I am considering the PDE for the price of a bond $V(r,t)$ with maturity $T$ under the Cox-Ingersoll-Ross model, $$V_t+\frac12\sigma^2rV_{rr}+\nu(\theta-r)V_r-rV=0\quad r>0, t\in(0,1)$$ with ...
user avatar
4 votes
1 answer
116 views

Maximum norm stability for implicit Black-Scholes equation

I am trying to prove maximum norm stability for the following implicit approximation to the Black-Scholes equation $$\frac1{\Delta t}\left(U_j^{(n+1)}-U_j^{(n)}\right)+\frac{rS_j}{\Delta S}\left(U_{j+...
user avatar
0 votes
1 answer
835 views

C++ code Thomas algorithm for solving a pentadiagonal Ax=b [closed]

I am looking to solve $Ax=b$ for $x$ where $A$ is pentadiagonal square matrix (elements on the upper and lower diagonals can however equal to zero) and $x$, $b$ two vectors of the same size. The ...
user avatar
-1 votes
1 answer
67 views

Improving control variate for variance reduction

I have tried stock price as control variate for my monte carlo simulation, and I am trying to reduce the variance of my estimated price for European Put option. And the code look like this: ...
user avatar
  • 17
3 votes
0 answers
51 views

Verify mean-square convergence of the Euler-maruyama scheme numerically

I have a question about the order of convergence of the Euler-Maruyama scheme and how one verifes this numerically. I have read that the Euler-Maruyama scheme is mean-squared convergent of order 1/2 ...
user avatar
3 votes
1 answer
776 views

Anyone has detailed explanation on how to use epstein-zin preferences in asset pricing models

I'd be interested to know how Epstein-Zin preferences are used in, say, consumption-based asset pricing models. I'm looking for specific derivations (how you get the SDF) and possible numerical ...
user avatar
  • 2,356
1 vote
0 answers
38 views

Quick Discretization question for finite difference and finite element methods

Assume we have the discretization in space $x_1, x_2, ... , x_M$ and time $t_1, t_2, ... , t_N$ for a finite difference or finite element method for option pricing and we want to solve for the option ...
user avatar
1 vote
0 answers
54 views

boundary conditions in finite element method

In the appendix A of this paper, https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.227.5073&rep=rep1&type=pdf, a finite element method is demonstrated to price a straddle. The same ...
user avatar
0 votes
1 answer
88 views

Accuracy of Explicit Euler method (finite difference) decreases as Δx decreases, shouldn't it increase?

The price of a commodity can be described by the Schwartz mean reverting SDE $$dS = \alpha(\mu-\log S)Sdt + \sigma S dW, \qquad \begin{array}.W = \text{ Standard Brownian motion} \\ \alpha = \text{ ...
user avatar
2 votes
0 answers
211 views

Solve the Schwartz mean reverting PDE for option pricing using Euler explicit method (matlab)

Objective: Implement the Euler Explict Method for solving the PDE for option prices under the Schwartz mean reverting model. The price evolution of a commodity can be described by the Schwartz SDE $$...
user avatar
-1 votes
1 answer
56 views

Good ways to select best decision among N decisions, each with a profit/loss distribution? [closed]

I'm working on a problem where an asset owner (e.g., owner of a factory, power plant, etc.) can take a number of possible decisions (say 10). Each of those 10 decisions entails certain actions, but ...
user avatar
1 vote
0 answers
389 views

CIR model. Is there a closed-form solution or even a good proxy of analytical solution?

Is there a closed-form (analytical) solution for the Cox-Ingersoll-Ross SDE \begin{equation} dr_t=k_r(\theta_r-r_t)dt+\sigma_r\sqrt{r_t}dW_t\tag{1} \end{equation} ? Notice that $\{r_t\}$ is our ...
user avatar
1 vote
1 answer
511 views

How to compute returns from cumulative returns in Python? [closed]

If X is a $T\times N$ pandas DataFrame of multivariate asset returns, the cumulative returns can be computed in python as (1 + X).cumprod() - 1 How can I reverse this operation so that I go ...
user avatar
  • 2,815
1 vote
1 answer
112 views

How to simulate asset prices/returns that display market regimes?

Are there any techniques that can make a multivariate random number generating process for stock prices/returns, like geometric Brownian motion via Cholesky, also include the simulation of a finite ...
user avatar
  • 2,815
8 votes
2 answers
342 views

Improve Finite Difference Scheme

I understand how to derive and implement standard finite difference schemes. I wonder how to improve such a standard FD scheme? For example, when solving the standard Black-Scholes equation, the ...
user avatar
  • 656
1 vote
1 answer
301 views

How to find characteristic function in Fourier Cosine method (COS method) by Fang and Oosterlee

Fang and Oosterlee (2009) introduced Fourier-Cosine method (COS method) in their paper. The formula to price an option is approximately $$e^{-r\Delta t} \sum_{k=0}^{N-1}' Re\left\{ \phi\left( \frac{k\...
user avatar
  • 830
1 vote
1 answer
126 views

Overview of frequentist, likelihood and Bayesian approaches to finance problems

In quantitative finance tasks (asset pricing, portfolio optimization, option pricing, volatility forecasting, etc), there are frequentist, likelihoodist and Bayesian approaches or interpretations to ...
user avatar
  • 2,815
1 vote
2 answers
157 views

Are asset return means difficult to predict because they have no lower bound?

In finance, it is widely known that the volatility of asset returns ($\sigma$) are easier to predict than the expected value of asset returns ($\mu$) , otherwise known as the average return or mean. ...
user avatar
  • 2,815
1 vote
0 answers
69 views

Risk-Neutral covariance matrix of arbitrage-free Nelson Siegel

For my thesis on a Bayesian sampling routine for a modification on arbitrage-free Nelson-Siegel I came across an equation that involves a matrix exponential within an integral, i.e. $\int_{0}^{\Delta ...
user avatar
1 vote
0 answers
79 views

Longstaff Schwartz method (LSM): how to increase accuracy?

In the LSM method, I am currently (as they do in the paper) using weighted Laguerre polynomials as basis functions, about 3-5 of them. If I wish to increase the accuracy of my model, what should I do?...
user avatar
  • 11
1 vote
0 answers
109 views

How is it possible that the measurement uncertainty in Kalman Filter is less than 0?

In Euan Sinclair's Option Trading, Pricing and Volatility Strategies and Techniques, it mentions that the true value of the price can be estimated via Kalman Filter: $$S_\mathrm{new} = S + k (S_b − S)...
user avatar
  • 11
1 vote
1 answer
139 views

L2 Assumptions of the Longstaff Schwartz method

In page 121 of the original LS Paper they use the fact that the space of functions they are dealing with (payoffs of American options), belong to the $\mathcal L^2$ space. They use this assumption ...
user avatar
  • 641
3 votes
0 answers
97 views

Optimized search for yield-to-worst of a callable bond

Suppose that I need to find the yield-to-worst of a callable bond, and that the option is American (call any time). The bond may have step-up coupons and/or non-constant call price (oprion strike). ...
user avatar
1 vote
1 answer
365 views

QuantLib returns slightly different bondYield when backtested

I am just starting to get familiar with QuantLib (in particular, fixed rate bond pricing functions). I read a number of examples, from which I am able to calculate bond price and bond yield. The ...
user avatar
  • 113
4 votes
1 answer
316 views

In Carr-Madans option pricing method, why do they use FFT?

In the famous fourier option pricing method by Carr-Madan, (http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.348.4044&rep=rep1&type=pdf), the crucial formula is They evaluate this by ...
user avatar
  • 43
2 votes
1 answer
3k views

Simulation of Geometric Brownian Motion in R

Using R, I would like to simulate a sample path of a geometric Brownian motion using \begin{equation*} S(t) = S(0) \exp\left(\left(\mu - \frac{\sigma^{2}}{2}\right)t + \sigma B_{t}\right), \end{...
user avatar
3 votes
2 answers
225 views

Produce the random variable for an asset from a uniformly distributed random varible

I'm working on a quant interview question from the book called Quant Job Interview Questions And Answers (by Mark Joshi and other authors). I cannot understand the following question(not the answer, ...
user avatar
  • 587
1 vote
1 answer
80 views

Calibrate a model parameter with an error function

Suppose I want to find the implied volatility using an option model from market prices. Surely I can find the implied volatility for each strike price ($k$ different strike prices) for a given ...
user avatar
  • 1,346
3 votes
1 answer
89 views

When is a numerical solution the only way to obtain a solution to BS?

I am only now reading into Mathematical Finance, I understand the derivation of the BS equation with vanilla European options. On the next page of my book it starts to delve into obtaining exact ...
user avatar
1 vote
2 answers
182 views

Fastest way to calculate YTM from bond price

I would like to calculate YTM for every top of the book update on the 10-year note traded on Brokertec. There is no closed form solution so have to use a root finding method like Newton-Rhapson. It ...
user avatar
  • 169