Questions tagged [numerical-methods]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
129 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 ...
0
votes
0answers
26 views

How to approximate expectation and variance of an integral from a discrete Time series financial dataset?

I have discrete time series financial data, with time($u$), price($S$) and someVariable($q$) which looks something like this. ...
3
votes
1answer
146 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 ...
0
votes
0answers
30 views

How important is it that numerical methods can price for various strikes simultaneously?

I am reading a paper which presents a numerical method to price call options. Call this Method 1. The method can also price several call-options for a range of strikes simultaneously if you want it to,...
1
vote
1answer
108 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{...
1
vote
1answer
96 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....
2
votes
2answers
104 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
56 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
76 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
84 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
55 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
51 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!!) ...
2
votes
1answer
508 views

Brennan-Schwartz algorithm for pricing American options

I'm reading Pricing American Options using LU decomposition by Ikonen and Toivanen (IT). They reference The valuation of American put options by Brennan and Schwartz, and cast it as method that uses ...
1
vote
1answer
74 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
69 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 ...
1
vote
1answer
148 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
209 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 ...
14
votes
3answers
1k views

Effective Euro-USD (EURUSD) Exchange Rate Prior to Euro's Existence

Motivation: I am running a quantitative analysis that requires long-term, exchange rate data. Problem: Does anyone have methods for dealing with the EURUSD exchange rate prior to the Euro's existence?...
0
votes
0answers
51 views

Parameter estimation and calibration

I am not sure if I understand calibration correctly. Consider a CIR model, suppose I want to estimate the parameters $a,b,\sigma$, I can use a method such as this. However I understand that ...
0
votes
0answers
25 views

American look Back Option (put)

Hello everyone I'm having some trouble calculating the value of an american lookback put option using any other method but "similarity reductions", if you could kindly describe such method or provide ...
3
votes
1answer
352 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
93 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 "...
6
votes
5answers
370 views

Heston Model Integration Oscillations

Is there a way to reduce oscillations for the numerical integration when evaluating the Heston model. I am pricing a series of 5000 options scattered over the Heston model parameter space and I find ...
2
votes
0answers
114 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 ...
4
votes
2answers
338 views

Smoothing of the payoff function as a terminal condition for numerical option pricing

I am interested in using a 4th order finite difference method in (underlying asset) space to price a European call basket option. I have developed the solver and everything works as expected, except ...
1
vote
0answers
153 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
163 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
64 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
118 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
1answer
40 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 ...
1
vote
0answers
50 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: $$...
8
votes
5answers
3k views

Is there a good closed-form approximation for Black-Scholes implied volatility?

While the solution for IV can certainly be reached using numerical search methods, I wonder if a high precision closed-form approximation exists. For example, there is a very robust (precise within ...
2
votes
1answer
55 views

Integration in the context of modelling with the Meixner Process

I failed to evaluate the integral of $\frac{e^{ax}}{x\sinh(bx)}$ with respect to $x$ from negative infinite to positive infinite. What techniques can I use to evaluate the integrals of such kind for ...
2
votes
1answer
219 views

SABR PDE spot/forward upper boundary condition implementation

When running my Finite Difference code, I observe something odd. Although implementing a classical (non-reverting) SABR model, I initialized the variables such that it should be equal to Black-...
4
votes
1answer
267 views

Finite Difference method in Matlab for SABR volatility model fails to provide correct option values

Currently, I'm trying to implement a Finite Difference (FD) method in Matlab for my thesis (Quantitative Finance). I implemented the FD method for Black-Scholes already and got correct results. ...
1
vote
1answer
131 views

Finite Difference implicit scheme

I'm trying to solve the following PDE numerically using an implicit FD scheme: \begin{equation} \frac{\sigma_s^2}{2}\frac{\partial^2 V}{\partial S^2} + \rho \sigma_S \sigma_\alpha\frac{\partial^2 V}{\...
2
votes
1answer
135 views

Unable to obtain correct Finite Difference Results

A rather general question regarding a specific problem I am facing with my Matlab implementation of the implicit FD method for this PDE: \begin{equation} \frac{\sigma_s^2}{2}\frac{\partial^2 V}{\...
0
votes
0answers
50 views

Computation of an integral containing d ln x (Scale of Market Shocks)

I am trying to implement a Scale of Market Shocks method (SMS) which was presented in a 1999 working document by Olsen & Associates named Introducing a Scale of Market Shocks and later refined in ...
0
votes
1answer
58 views

How to simulate a path through its solution and conditional expectation / variance

Hi I want to simulate in Matlab the following stochastic integral: $ x(t) = x(s) e^{-a(t-s)} + \sigma \int_s^t e^{-a(t-u)} dW_1(u)$ with $E[x(t) \vert F_s] = x(s) e^{-a(t-s)}$ $Var[x(t) \vert ...
0
votes
0answers
29 views

Transform the payoff to be non-zero

Is there any way to transform the basic call option payoff $V(s,0) = \max(s-K,0)$ such that $g(V(s,0))\neq 0$ $\forall s $, where $g()$ is the transform function of the payoff. This is to use in a ...
2
votes
0answers
37 views

Transforming and minimisation of the BS PDE

I'm trying a novel numerical substitution/fitting method to solve the BS PDE, but the issue is that due to the large range of magnitude of prices $V(s,t)\in[10^{-20},10^1]$, when I try to minimise the ...
1
vote
1answer
69 views

4-point Trapezium rule for numerical integration

Background: This is in reference to Mark Joshi's concepts of mathematical finance ch.7 problem 11. Question: We have in the Black-Scholes model: $S_0 = 1, T = 1, \sigma = 0.1, r = 0$. A ...
0
votes
1answer
101 views

Correct way to compute RSI in a moving window

I am trying to compute the RSI using the ticker price. I have troubles at the time to implement the RSI when I want to compute it every 1 minute but using windows to compute the OHLC of 10 minutes. I ...
2
votes
0answers
79 views

Practical precision for Options Pricing

When pricing options, especially in the theoretical literature getting high precision, say up to 8 decimal places is always a competitive goal. Though realistically in a practical setting is such ...
10
votes
2answers
18k views

How to numerically obtain delta?

The delta in option pricing, also called the hedge ratio, is expressed as the sensitivity of the option price to the underlying price change. The analytical solution for the most common option ...
1
vote
1answer
6k views

estimate implied volatility using newton-raphson in python

I am trying to calculate the implied volatility using newton-raphson in python, but the value diverges instead of converge. What is wrong with the code? ...
1
vote
1answer
143 views

MATLAB exercise on an European call option with time-varying volatility

I have to solve the following exercise: compute and plot the value $V = V(S, t),\ t<T$, ($T=$ maturity) of an European CALL option (with arbitrary $t$, $T$, $K$ (strike price), $r$ (risk-free ...
1
vote
0answers
195 views

Adjoint Algorithmic Differentiation: swap pricing

I have tried to implement an AAD routine to price call options using the Black-Scholes formula, but my greeks are not quite agreeing with the expected ones, so I have decided to start with something a ...
0
votes
1answer
304 views

Euler discretisation error for stochastic volatility model

Given the following model$$dS_t=S_t(\mu dt+\sigma(t,S_t)dW_t)$$ Using Monte Carlo Pricing method, I want to determine the price of the option. However I have been encountered the following problems: ...
0
votes
1answer
242 views

How to calibrate an SDE's by finite difference equation?

I would like a general framework for the calibration of the unknown parameters in an arbitrary stochastic differential equation. I have a proposed method that seems reasonable in theory, but is ...