Description Usage Arguments Value Warning Examples
Function to estimate the volatility, σ, and drift, μ. See
vignette("Distance-to-default", package = "DtD")
for details. All
vectors with length greater than one needs to have the same length. The
Nelder-Mead method from optim
is used when
method = "mle"
. Either time
or dt
should be passed.
1 2 3 4 5 6 7 8 9 10 11 12 |
S |
numeric vector with observed stock prices. |
D |
numeric vector or scalar with debt due in |
T. |
numeric vector or scalar with time to maturity. |
r |
numeric vector or scalar with risk free rates. |
time |
numeric vector with the observation times. |
dt |
numeric scalar with time increments between observations. |
vol_start |
numeric scalar with starting value for σ. |
method |
string to specify which estimation method to use. |
tol |
numeric scalar with tolerance to |
eps |
numeric scalar with convergence threshold. |
A list with the following components
ests |
estimates of σ, and drift, μ. |
n_iter |
number of iterations when |
success |
logical for whether the estimation method converged. |
Choosing tol >= eps
or roughly equal may make the method alternate
between two solutions for some data sets.
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.