Pricing.PV.PricingParameters¶
Classes
PricingParameters(n: int, l: int, m: int, ...) |
Class that contains the numerical parameters to be passed to the american pricer |
-
class
Pricing.PV.PricingParameters.PricingParameters(n: int, l: int, m: int, p: int, first_guess_method: <module 'Pricing.PV.FirstGuessMethod' from '/home/docs/checkouts/readthedocs.org/user_builds/americanpricer/checkouts/latest/Lib/Pricing/PV/FirstGuessMethod.py'>, iteration_type: <module 'Pricing.PV.IterationType' from '/home/docs/checkouts/readthedocs.org/user_builds/americanpricer/checkouts/latest/Lib/Pricing/PV/IterationType.py'>)[source]¶ Class that contains the numerical parameters to be passed to the american pricer
Parameters: n : int
Number of points in the time-discretization of the boundary.
l : int
Number of points for Gauss-Legendre quadrature for 1D integration inside an iteration of fixed-point algorithm.
m : int
Number of iterations in the fixed point algorithm.
p : int
Number of points for Gauss-Legendre quadrature for 1D integration for the final price when the boundary is computed.
first_guess_method :
FirstGuessMethodThe algorithm used to choose a first guess of the exercice boundary.
Values can be :member:`~PV.Pricing.FirstGuessMethod.Trivial` or :member:`~PV.Pricing.FirstGuessMethod.Smart`.
- Trivial uses a flat-firest guess corresponding to K * Max(1,r/q)
- Smart uses a solver in order to have a good first guess (slows down the pricing time, so use if you want
a more precise result)
iteration_type :
IterationTypeThe iterative algorithm that is used in order to solve the fixed point problem \(f(B)=B\)
Can be “Richardson”, “Partial_Newton_Jacobi” or “Newton_Jacobi” to solve the fixed point problem f(B) = B
- Richardson uses a naive fixed-point iteration
- Newton_Jacobi mixes Richardson iterations with the Jacobi-Newton way to solve \(g(B) = 0\) where
\(g(B) = f(B) - B\) * Partial_Newton_Jacobi is like Newton_Jacobi but the derivative expression is approximated by putting at 0 smaller terms (faster than Newton_Jacobi)
Attributes
first_guess_methoditeration_typelmnp