找回密码
 注册
查看: 273|回复: 0

R语言 schwartz97包 filter-futures()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-29 22:53:12 | 显示全部楼层 |阅读模式
filter-futures(schwartz97)
filter-futures()所属R语言包:schwartz97

                                        Schwartz two-factor Model: Filter futures data
                                         施瓦茨双因素模型筛选期货数据

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

Filter a series of futures prices to obtain state variables.
筛选期货价格获得了一系列状态变量。


用法----------Usage----------



## S4 method for signature 'ANY,ANY,numeric'
filter.schwartz2f(data, ttm, 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,
                  deltat = 1/260, meas.sd = rep(1e-3, ncol(data)),
                  P0 = 0.5 * diag(c(log(s0), abs(delta0))))

## S4 method for signature 'ANY,ANY,schwartz2f'
filter.schwartz2f(data, ttm, s0,
                  r = 0.05, lambda = 0, alphaT = NULL, deltat = 1/260,
                  meas.sd = rep(1e-3, ncol(data)),
                  P0 = 0.1 * diag(2))

## S4 method for signature 'ANY,ANY,schwartz2f.fit'
filter.schwartz2f(data, ttm, s0)




参数----------Arguments----------

参数:data
A matrix with futures prices.
矩阵与期货价格。


参数:ttm
A matrix with the corresponding time to maturity (see Details).
一个矩阵,相应的到期时间(见详情)。


参数:s0
Either a numeric representing the initial value of the commodity spot price or an object inheriting from class schwartz2f.
一个numeric代表的大宗商品现货价格的初始值或对象继承类schwartz2f。


参数:delta0
Initial value of the convenience yield.
便利收益的初始值。


参数:mu
enters the drift of the 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.
之间的相关系数的布朗运动驱动的现货价格和便利收益的过程。


参数:r
Instantaneous risk-free interest rate.
瞬时无风险利率。


参数:lambda
Market price of convenience yield risk.
便利收益风险的市场价格。


参数:alphaT
Mean-level of the convenience yield process with respect to the equivalent martingale measure.
平均水平的便利收益过程中的等价鞅测度。


参数:deltat
Time increment.
时间增量。


参数:meas.sd
The standard deviation of the measurement equation (see Details section of fit.schwartz2f).
的标准偏差的测量方程(详细部分fit.schwartz2f)。


参数:P0
Variance of the state variables s0 and P0.
的状态变量s0和P0的差异。


Details

详细信息----------Details----------

The elements of data and ttm have the following interpretation: data[i,j] denotes the futures price whose time to maturity was ttm[i,j] when it was observed. The unit of ttm is defined by deltat.
的元素data和ttm有如下解释:data[i,j]表示,期货价格的时间,到期日为ttm[i,j],当它被观察到。被定义为ttmdeltat单位。

deltat is the time between observation data[i,j] and data[i + 1,j]. It is assumed to be constant, i.e., that data is a regular time-series.
deltat是观察data[i,j]和data[i + 1,j]之间的时间。它被假定为是恒定的,即,data是一个固定的时间系列。


值----------Value----------

A list with components:
组件列表:

state
state

</td><td align="left"> A matrix with
</ TD> <TD ALIGN="LEFT">一个矩阵

colnames
colnames

are


&ldquo;S&rdquo;
“S”的

and


&ldquo;delta&rdquo;
“Delta”

giving the the expected spot price and the
给预期现货价格和

convenience yield.
便利收益。

fkf.obj
fkf.obj

</td><td align="left"> The filter output from the package
</ TD> <TD ALIGN="LEFT">滤波器输出的包

fkf
fkf

. Note that the log of the commodity spot
。需要注意的是log的大宗商品现货

price is filtered.
价格过滤。


(作者)----------Author(s)----------


Philipp Erb, David Luethi, Juri Hinz



参考文献----------References----------

Valuation and Hedging by Eduardo S. Schwartz <br> Journal of Finance 52, 1997, 923-973

参见----------See Also----------

fit.schwartz2f, pricefutures.
fit.schwartz2f,pricefutures。


实例----------Examples----------



data(futures)

## Estimate parameters for coffee data (stop after 20 iterations)[#参数估计的咖啡数据(20次迭代后停止)]
fit.obj <- fit.schwartz2f(futures$coffee$price, futures$coffee$ttm / 260,
                          deltat = 1 / 260, control = list(maxit = 20))

## Filter the futures data to get the spot price and the convenience yield.[#过滤期货的数据才能拿到现货价格和便利收益。]
filtered <- filter.schwartz2f(futures$coffee$price, futures$coffee$ttm / 260, fit.obj)

## ...and plot it.[#...绘制。]
par(mfrow = c(2, 1))
plot(filtered$state[,1], ylab = "Spot price", type = "l")
lines(futures$coffee$price[,1], col = "red") # Closest to maturity futures[最近至到期日期货]
plot(filtered$state[,2], ylab = "Convenience yield", type = "l")
abline(h = 0)


转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2025-5-15 00:00 , Processed in 0.026672 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表