Questions tagged [numerical-methods]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
3
votes
0answers
56 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, ...
6
votes
1answer
172 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 ...
4
votes
4answers
161 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 ...
1
vote
0answers
36 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 ...
4
votes
1answer
93 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+...
0
votes
1answer
249 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 ...
-1
votes
1answer
54 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: ...
3
votes
0answers
28 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 ...
3
votes
1answer
314 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 ...
1
vote
0answers
32 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 ...
1
vote
0answers
35 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 ...
0
votes
1answer
74 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{ ...
2
votes
0answers
150 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 $$...
-1
votes
1answer
54 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 ...
1
vote
0answers
176 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 ...
1
vote
1answer
144 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 ...
1
vote
1answer
80 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 ...
0
votes
0answers
16 views

Is it easier to estimate the mean of volume/dollar bar returns than time bars?

Financial data, by default, is sampled using constant intervals of time, i.e. we collect the prices of assets every day, and then take the log-differences of prices to compute daily returns. These are ...
8
votes
2answers
174 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 ...
1
vote
1answer
189 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\...
1
vote
1answer
86 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 ...
1
vote
2answers
119 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. ...
1
vote
0answers
59 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 ...
1
vote
0answers
53 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?...
1
vote
0answers
64 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)...
1
vote
1answer
108 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 ...
3
votes
0answers
68 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). ...
1
vote
1answer
243 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 ...
4
votes
1answer
196 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 ...
1
vote
1answer
2k 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{...
2
votes
2answers
148 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, ...
1
vote
1answer
66 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 ...
3
votes
1answer
83 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 ...
1
vote
2answers
119 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 ...
1
vote
0answers
88 views

Numerical Solutions to PDEs with Financial Applications

I am reading a paper by Richard White, Opengamma named Numerical Solutions to PDEs with Financial Applications. There is an implementation codes as stated in paper hosted at https://opengamma.com/...
1
vote
1answer
60 views

Sensitivity Approximation - Crank Nicolson

I am looking into a new method of calculating sensitivities starting off with a proof of concept with Black Scholes PDE. Suppose I want to calculate Rho and take the derivative of the PDE (heresy!!) ...
1
vote
1answer
90 views

What are the industry standards and rules of thumb when it comes to numerical methods?

So, as far as I know, we have 3 main numerical methods. Monte Carlo, PDE-methods (FDM), and numerical integration methods (Fourier transforms and so on). How do these methods generally compare to ...
1
vote
0answers
73 views

How good is a “good accuracy” in pricing?

Say you want to test various numerical algorithms for purposes of pricing. How close do you need to be to some benchmark value (the "actual" price) for your accuracy to be good? Say I am trying to ...
3
votes
1answer
193 views

Simulation scheme for SABR beside the standard Euler discretization

QUESTION: Beside Euler Scheme, is there another more robust (and preferably easy to implement) way to simulate asset path with SABR dynamics? Simulation that will withstand even for high volatilities....
3
votes
1answer
744 views

Least Squares Monte Carlo

Could you explain to me in words (no formulas) the concept of the Least Squares Monte Carlo method to price an American style option?
3
votes
1answer
306 views

How to determine the order of convergence of the Euler-Maruyama method?

To make this simple let us consider the Geometric Brownian Motions. My questions: 1. How can I show that the Euler-Maruyama Method is convergent using GBM? 2. How can I determine the order of ...
3
votes
1answer
734 views

Implied volatility in Monte Carlo models

Suppose I want to get the implied volatility for a given option, whose process does not generate a closed-form formula. In that framework, how is the IV calculated, given the fact that bisection ...
2
votes
1answer
106 views

Finite difference methods for (continuously) strike-resettable American options

For simplicity, let us consider an American call/put with a continuously resettable strike price. Current time is $t=0$, maturity is at $t=T$, and the initial strike is $K_0$. We consider a "...
5
votes
1answer
289 views

Architecture of a global pricing library with immutable payoffs

By global pricing library I mean a library handling equity, rate etc, hybrid products having several models (BS, LV, SV, LSV) having several numerical methods (analytic formula, MC, PDE FD/FE) I ...
1
vote
0answers
162 views

What is the best source to get 10 milliseconds time-series data for numerical computation?

I am working with 4th order Runge-Kutta method to compute a second order differential equation. For the best accuracy, I need a 10 milliseconds ohlcv time-series data. I know that I can build it ...
3
votes
0answers
293 views

Is there a more efficient data structure to implement binomial trees than 2d array?

I'm just curious what is the "industry standard" for implementing a binomial tree (if "standards" exist in this case). For simplicity, let's just talk about the simplest trees with recombining nodes. ...
1
vote
1answer
75 views

In search of nice (approx) function forms of the volatility of cumulative simple returns

Let's consider a period $t\in[0,T]$, and let the simple return over year $t$ ($1\le t\le T$) be $r_t$. Assume $r_t$ are iid normal. The cumualative simple return over the whole period $[0,T]$ is $$R_T=...
1
vote
2answers
125 views

Paper recommendation with examples

Could you please advise me some papers/working documents with applications mainly focused on Fixed Income/Financial Engineering (Numerical Methods) as the one in the link below? Preferably on Matlab, ...
1
vote
0answers
64 views

Optimal allocation problem by finite differences

I am attempting to apply implicit finite difference to solve Merton's problem of optimal portfolio allocation for constant parameters. The equation to solve is the Hamilton-Jacobi-Bellman equation: $$...
1
vote
1answer
45 views

How many decimals of accuracy can I expect from FDM and MC (both valuation and risk)

I have implemented some Monte Carlo and FDM code. I can then get greeks by bumping. I am comparing to to exact formulas of price + greeks, and am wondering how many decimals of accuracy I can expect ...