Description Usage Arguments Details Value Note Author(s) References See Also Examples
Density, distribution function, quantile function and random number generation of futures prices.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | ## S4 method for signature 'ANY,ANY,ANY,numeric'
dfutures(x, time = 0.1, ttm = 1, s0 = 50, delta0 = 0,
mu = 0.1, sigmaS = 0.3, kappa = 1, alpha = 0,
sigmaE = 0.5, rho = 0.75, r = 0.05, lambda = 0,
alphaT = NULL, measure = c("P", "Q"), ...)
## S4 method for signature 'ANY,ANY,ANY,schwartz2f'
dfutures(x, time = 0.1, ttm = 1, s0, r = 0.05,
lambda = 0, alphaT = NULL, measure = c("P", "Q"), ...)
## S4 method for signature 'ANY,ANY,ANY,schwartz2f.fit'
dfutures(x, time = 0.1, ttm = 1, s0, measure = c("P", "Q"), ...)
## S4 method for signature 'ANY,ANY,ANY,numeric'
pfutures(q, time = 0.1, ttm = 1, s0 = 50, delta0 = 0,
mu = 0.1, sigmaS = 0.3, kappa = 1, alpha = 0,
sigmaE = 0.5, rho = 0.75, r = 0.05, lambda = 0,
alphaT = NULL, measure = c("P", "Q"), ...)
## S4 method for signature 'ANY,ANY,ANY,schwartz2f'
pfutures(q, time = 0.1, ttm = 1, s0, r = 0.05,
lambda = 0, alphaT = NULL, measure = c("P", "Q"), ...)
## S4 method for signature 'ANY,ANY,ANY,schwartz2f.fit'
pfutures(q, time = 0.1, ttm = 1, s0, measure = c("P", "Q"), ...)
## S4 method for signature 'ANY,ANY,ANY,numeric'
qfutures(p, time = 0.1, ttm = 1, s0 = 50, delta0 = 0,
mu = 0.1, sigmaS = 0.3, kappa = 1, alpha = 0,
sigmaE = 0.5, rho = 0.75, r = 0.05, lambda = 0,
alphaT = NULL, measure = c("P", "Q"), ...)
## S4 method for signature 'ANY,ANY,ANY,schwartz2f'
qfutures(p, time = 0.1, ttm = 1, s0, r = 0.05,
lambda = 0, alphaT = NULL, measure = c("P", "Q"), ...)
## S4 method for signature 'ANY,ANY,ANY,schwartz2f.fit'
qfutures(p, time = 0.1, ttm = 1, s0, measure = c("P", "Q"), ...)
## S4 method for signature 'ANY,ANY,ANY,numeric'
rfutures(n, time = 0.1, ttm = 1, s0 = 50, delta0 = 0,
mu = 0.1, sigmaS = 0.3, kappa = 1, alpha = 0, sigmaE = 0.5,
rho = 0.75, r = 0.05, lambda = 0, alphaT = NULL, measure = c("P", "Q"))
## S4 method for signature 'ANY,ANY,ANY,schwartz2f'
rfutures(n, time = 0.1, ttm = 1, s0, r = 0.05,
lambda = 0, alphaT = NULL, measure = c("P", "Q"))
## S4 method for signature 'ANY,ANY,ANY,schwartz2f.fit'
rfutures(n, time = 0.1, ttm = 1, s0, measure = c("P", "Q"))
|
q, x |
vector of quantiles. |
p |
vector of probabilities. |
n |
number of observations. If |
time |
Time where the futures process is evaluated (relative to now). |
ttm |
Time to maturity (relative to now). |
s0 |
Either a |
delta0 |
Initial value of the convenience yield. |
mu |
Drift term of commodity spot price. |
sigmaS |
Diffusion parameter of the spot price process. |
kappa |
Speed of mean-reversion of the convenience yield process. |
alpha |
Mean-level of the convenience yield process. |
sigmaE |
Diffusion parameter of the convenience yield process. |
rho |
Correlation coefficient between the Brownian motion driving the spot price and the convenience yield process. |
lambda |
Market price of convenience yield risk (see Details). |
alphaT |
Mean-level of the convenience yield process with respect to the equivalent martingale measure (see Details). |
r |
Instantaneous risk-free interest rate. |
measure |
under which the functions are computed. āPā denotes the objective measure, āQā the risk-neutral measure (see Details). |
... |
Arguments to be passed to the functions
|
Futures prices depend on the spot-price and the convenience yield.
To get the real (i.e. the objective) distribution of futures prices at some date in the future the dynamics is considered under the objective measure P. The P-dynamics is
dS = (mu - delta) * S * dt + sigmaS * S * dW1,
d delta = kappa * (alpha - delta) * dt + sigmaE * dW2
dW1 * dW2 = rho dt,
where
W1, W2 are Brownian motions under the objective
measure, the measure P.
Options on futures are evaluated based on the risk-neutral dynamics of the spot-price and the convenience yield, i.e. under the measure Q. The Q-dynamics is
dS = (r - delta) * S * dt + sigmaS * S * dW1*
d delta = kappa * (alphaT - delta) * dt + sigmaE * dW2*,
where W1*, W2* are
Brownian motions with respect to Q.
alphaT = alpha -
lambda / kappa where lambda is the market price of
convenience-yield risk. The market price of convenience yield risk
can either be specified explicitly by lambda
or implicitly by
alphaT
. The relation is alphaT = alpha - lambda /
kappa
. See the package vignette.
Probabilities, densities, quantiles or samples of the log-normally
distributed futures prices as numeric
.
Note that futures and forward prices coincide as the interest rate is assumed to be constant in the Schwartz two-factor model.
Philipp Erb, David Luethi, Juri Hinz
The Stochastic Behavior of Commodity Prices: Implications for
Valuation and Hedging by Eduardo S. Schwartz
Journal of Finance
52, 1997, 923-973
Valuation of Commodity Futures and Options under Stochastic
Convenience Yields, Interest Rates, and Jump Diffusions in the Spot
by Jimmy E. Hilliard and Jorge Reis
Journal of Financial and
Quantitative Analysis 33, 1998, 61-86
pricefutures
,
d/p/qstate
,
r/simstate
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ## Create a "schwartz2f"-object
model <- schwartz2f()
## Probability
pfutures(q = 10 * 3:9, time = 0.5, ttm = 2, model, lambda = 0.01)
## Density
dfutures(x = c(20, 40, 100), time = 0.5, ttm = 2, model, lambda = 0.01)
## Quantile
qfutures(p = 0.1 * 2:5, time = 0.5, ttm = 10, model, lambda = 0.01)
## Sample
sim <- rfutures(n = 1000, time = 0.5, ttm = 5, model, lambda = 0.01)
hist(sim, prob = TRUE)
lines(seq(30, 300, length = 100),
dfutures(seq(30, 300, length = 100),
time = 0.5, ttm = 5, model, lambda = 0.01), col = "red")
## At time 0 the futures price is a deterministic function of s0 and
## delta0. Therefore 3 times the same value is obtained:
rfutures(3, time = 0, ttm = 1, model, lambda = 0)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.