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

R语言 RTAQ包 tradesCleanup()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-28 22:39:04 | 显示全部楼层 |阅读模式
tradesCleanup(RTAQ)
tradesCleanup()所属R语言包:RTAQ

                                         Cleans trade data
                                         清除贸易数据

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

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

This is a wrapper function for cleaning the trade data of all stocks in "ticker" over the interval [from,to].  The result is saved in the folder datadestination. The function returns a vector indicating how many trades were removed at each cleaning step.
这是一个包装函数清洗所有股票的交易数据,在“股票”在区间[,]。结果被保存在该文件夹datadestination。该函数返回一个矢量多少交易,在每次清洗步骤中删除。

In case you supply the argument "rawtdata", the on-disk functionality is ignored and the function returns a list with the cleaned trades as xts object (see examples).
如果您提供的的参数“rawtdata”,在磁盘上的功能被忽略,并且该函数返回一个列表,清洗行业XTS对象(参见示例)。

The following cleaning functions are performed sequentially: noZeroPrices, selectExchange, salesCondition, mergeTradesSameTimestamp.
进行清洗功能依次是:noZeroPrices,selectExchange,salesCondition,mergeTradesSameTimestamp。

Since the function rmTradeOutliers also requires cleaned quote data as input, it is not incorporated here and there is a seperate wrapper called tradesCleanupFinal.
由于功能rmTradeOutliers也需要清洁的报价数据作为输入,它没有纳入在这里,有一个单独的封装称为tradesCleanupFinal。


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


tradesCleanup(from,to,datasource,datadestination,ticker,exchanges,



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

参数:from
character indicating first date to clean, e.g. "2008-01-30".
字符表示第一次约会的清洁,例如“2008-01-30”。


参数:to
character indicating last date to clean, e.g. "2008-01-31".
字符表示最后日期清洁,例如“2008-01-31”。


参数:datasource
character indicating the folder in which the original data is stored.
字符显示的文件夹中存储的原始数据。


参数:datadestination
character indicating the folder in which the cleaned data is stored.
字符,指示清理的数据存储的文件夹中。


参数:ticker
vector of tickers for which the data should be cleaned, e.g. ticker = c("AAPL","AIG")
矢量数据应清洗的代号,例如证券代码:C(“AAPL”,“AIG”)


参数:exchanges
vector of stock exchange symbols for all tickers in vector "ticker". It thus should have the same length as the vector ticker. Only data from one exchanges will be retained for each stock respectively, e.g. exchanges = c("Q","N") The possible exchange symbols are:   
矢量证券交易所符号为矢量“股票”引号中。因此,它应具有相同的长度作为矢量股票。每只股票分别只有从一个交易所的数据将被保留,例如:交流= C(“Q”,“N”)可能的交流符号是:

A: AMEX  
A:AMEX

N: NYSE  
N:纽约证券交易所

B: Boston  
B:波士顿

P: Arca  
P:阿卡

C: NSX  
C:NSX

T/Q: NASDAQ  
T / Q:NASDAQ

D: NASD ADF and TRF  
D:全国证券交易商协会自动进稿器和TRF

X: Philadelphia  
X:费城

I: ISE  
我:ISE

M: Chicago  
M:芝加哥

W: CBOE  
W:芝加哥期权交易所(CBOE)

Z: BATS  
Z:BATS


参数:tdataraw
xts object containing (ONE day and for ONE stock only) raw trade data. This argument is NULL by default. Enabling it means the arguments from, to, datasource and datadestination will be ignored. (only advisable for small chunks of data)
的XTS对象包含(一天只有一个股票)原料贸易数据。默认情况下,此参数为NULL。启用它的参数,数据源和将被忽略datadestination。 (唯一可取一小块一小块的数据)


参数:report
boolean and TRUE by default. In case it is true the function returns (also) a vector indicating how many trades remained after each cleaning step.
布尔值和默认为true。在情况下,它是真正的函数返回(也)的向量表示每个清洁步骤后,很多行业仍然。


参数:selection
argument to be passed on to the cleaning routine mergeTradesSameTimestamp. The default is "median".
参数被传递到日常清洁mergeTradesSameTimestamp。默认值是“中位数”。


参数:...
additional arguments.
其他参数。


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

For each day an xts object is saved into the folder of that date, containing the cleaned data. This procedure is performed for each stock in "ticker". The function returns a vector indicating how many trades remained after each cleaning step.
每一天的XTS对象保存到该日期的文件夹,包含清理的数据。执行此过程的每个股票在“股票”。该函数返回一个矢量,每个清洁步骤后,很多行业仍然。

In case you supply the argument "rawtdata", the on-disk functionality is ignored and the function returns a list with the cleaned trades as xts object (see examples).
如果您提供的的参数“rawtdata”,在磁盘上的功能被忽略,并且该函数返回一个列表,清洗行业XTS对象(参见示例)。


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


Jonathan Cornelissen and Kris Boudt



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

kernels in practice: Trades and quotes. Econometrics Journal 12, C1-C32.
Financial econometric analysis at ultra-high frequency: Data handling concerns. Computational Statistics & Data Analysis, 51, pages 2232-2245.


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


#Consider you have raw trade data for 1 stock for 1 day [想想你有原始交易数据为1股票1天]
data("sample_tdataraw");
head(sample_tdataraw);
dim(sample_tdataraw);
tdata_afterfirstcleaning = tradesCleanup(tdataraw=sample_tdataraw,exchanges="N");
tdata_afterfirstcleaning$report;
barplot(tdata_afterfirstcleaning$report);
dim(tdata_afterfirstcleaning$tdata);

#In case you have more data it is advised to use the on-disk functionality[如果你有更多的数据,建议使用磁盘上的功能]
#via "from","to","datasource",etc. arguments[通过“”,“”,“数据源”,等等。参数]

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-28 00:56 , Processed in 0.029466 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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