View source: R/finding_parameters.R
finding_parameters | R Documentation |
The finding_parameters function calculate calculate time and price step sizes.
finding_parameters(initial_price, vol, I, multiplier_price, dt_simulate = 1/250)
initial_price |
numeric value, initial price of the asset. |
vol |
numeric value, volatility of the model, vol > 0. |
I |
numeric value, number of steps in the stock price. |
multiplier_price |
numeric value, a number multiplied by the initial_price to get an approximation to infinity. |
dt_simulate |
numeric value, time step size using in simulations. |
Explicit finite difference algorithm is not stable, it means we have an limitation on size of asset step size (which is not problematic)
and on size of time step size (which is problematic). This function calculate good parameters to the asset and step size for stability of explicit
finite difference algorithm.
dt_simulate argument is needed for a sake of interpolation. We want existing a natural k which meets:
dt = dt_simulate/k , where dt is step size from finite difference algorithm. If dt is very small is no needed to have this property.
A numeric vector, respectively price step size and time step size.
finding_parameters(100, 0.3, 600, 5) finding_parameters(100, 0.5, 1000, 6, 1/500)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.