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

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

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

                                        Daily futures prices
                                         每日期货价格

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

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

Futures prices, time to maturity, open interest, volume, underlying tickers, and last trade date of ten different commoditites: corn, wheat, soybean, soybean meal, soybean oil, lumber, live cattle, coffee, heating oil, copper.
期货价格,到期时间,持仓量,成交量,基本引号,以及10个不同的commoditites:玉米,小麦,大豆,豆粕,豆油,锯材,活牛,咖啡机,取暖油,铜的最后交易日。

There are, depending on the liquidity of the commodity, between 4 and 10 "clean" closest to maturity futures price series.
还有,根据对流动性的商品,在4和10之间最接近的干净至到期的期货价格序列。


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


data(futures)



格式----------Format----------

A list containing ten commodities as lists: &ldquo;corn&rdquo;, &ldquo;wheat&rdquo;, &ldquo;soybean&rdquo;, &ldquo;soybean.meal&rdquo;, &ldquo;soybean.oil&rdquo;, &ldquo;lumber&rdquo;, &ldquo;live.cattle&rdquo;, &ldquo;coffee&rdquo;, &ldquo;heating.oil&rdquo;, &ldquo;copper&rdquo;. <br>
列出一个列表,其中包含10商品:“玉米”,“小麦”,“大豆”中,“soybean.meal”中,“soybean.oil”,“木材”中,“live.cattle”,“咖啡“,”heating.oil“,”铜“。参考

Each list contains six dimnamed matrices:
每一个列表包含六个dimnamed的矩阵:




price Daily futures prices.
price每日期货价格。




ttm The time to maturity of the futures contracts
ttm的时间至到期日的期货合约




oi Open interest.
oi未平仓合约。




vol Volume.
vol卷。




underl.tickers Underlying tickers / contracts.
underl.tickers相关引号/合同。




last.trade.dt Last trade date as character in the ISO
last.trade.dt最后交易日为字符在ISO

The i-th column of each matrix contains data for the i-th closest to maturity contract. The i-th column name is the ticker of the i-th generic futures.
每个矩阵的第i列中包含的数据的第i个最接近到期合同。第i列名的第i个通用期货,股票。


Details

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

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


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


Philipp Erb, David Luethi, Juri Hinz



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

futuresplot, fit.schwartz2f.
futuresplot,fit.schwartz2f。


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



data(futures)

## Plot forward curves of lumber[号地的木材远期曲线]
futuresplot(futures$lumber, type = "forward.curve")

## Plot time to maturity of heating oil data[#图的时间来成熟的取暖油数据]
futuresplot(futures$heating.oil, type = "ttm")

## Make 'futures' weekly, take Wednesday data[#“期货”每周,周三数据]
futures.w <- rapply(futures, function(x)x[format(as.Date(rownames(x)), "%w") == 3,],
                    classes = "matrix", how = "list")

## Make 'futures' monthly, take the 28th day of the month[#使“期货”每月,28月的一天]
futures.m <- rapply(futures, function(x)x[format(as.Date(rownames(x)), "%d") == 28,],
                    classes = "matrix", how = "list")

## Plot weekly lumber and monthly soybean data[#图每周的木材,每月的大豆数据]
futuresplot(futures.w$lumber, type = "forward.curve", main = "Lumber")
futuresplot(futures.m$soybean, type = "forward.curve", main = "Soybean")

## Not run: [#不运行:]
## Convert to zoo-objects:[#转换到动物园的对象:]
require(zoo)
futures.zoo <- rapply(futures, function(x)zoo(x, as.Date(rownames(x))),
                      classes = "matrix", how = "list")

## ...and plot it nicely using plot.zoo:[#...并把它标绘,很好用plot.zoo:]
plot(futures.zoo$heating.oil$ttm)
plot(futures.zoo$wheat$vol)
plot(futures.zoo$copper$oi)

## End(Not run)[#(不执行)]

## Estimate soybean meal parameters (stop after 100 iterations).[#估计的豆粕参数(100次迭代后停止)。]
## ttm (time-to-maturity) is divided by 260 as it is in unit of days and[TTM(至到期日的时间)除以260,因为它以天为单位,]
## deltat = 1/52 because weekly price observations are used.[#则DeltaT = 1/52,因为每周价格观察。]
soybean.meal.fit <- fit.schwartz2f(data = futures.w$soybean.meal$price,
                                   ttm = futures.w$soybean.meal$ttm / 260,
                                   deltat = 1 / 52, r = 0.04,
                                   control = list(maxit = 100))
soybean.meal.fit

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-5-15 04:38 , Processed in 0.026410 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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