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

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

[复制链接]
发表于 2012-10-1 12:49:44 | 显示全部楼层 |阅读模式
dataSnoop(ttrTests)
dataSnoop()所属R语言包:ttrTests

                                         Two Tests for Data Snooping: RC and SPA
                                         两个测试数据探测:RC和SPA

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

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

Tests for data snooping bias by doing bootstrap resampling, then finding the best parameterization in the bootstrapped samples and performing one of two popular tests - White's Reality Check or Hansen's test for Superior Predictive Ability.  Can write a summary of results to a file as a LaTeX figure.
数据窥探的偏见做引导重采样,然后找到最佳的参数设置中的自举样品,并进行两种流行的测试 - 白色的现实支票或Hansen的高级预测能力测试的测试。可以写一个总结的结果作为胶乳数字到一个文件中。

Please note that Dr. Halbert White owns U.S. patents 6,088,676 and  5,893,069, pertaining to the RC option for the function dataSnoop().   These routines are licensed to the author for use solely for the purposes of non-commercial academic research and study. License rights as granted in the GPL are therefore limited to uses that are legal under national and international patent law. Future contributers, as defined in the GPL, assume full responsibility for their modifications and implementations.
请注意,哈尔伯特白博士拥有美国专利6088676和5893069,有关的的功能dataSnoop()的RC选项。这些的例程被授权作者专供非商业的学术研究和学习的目的。因此,在GPL许可权授予有限的用途,是根据国家法律和国际专利法。未来的贡献者,在GPL定义他们的修改和实施,承担全部责任。

If there is any doubt, please remove code that implements the reality check and enjoy the rest of the package.  There should be very minimal loss of functionality, if any, since a second data snooping test is included.
如果有任何疑问,请删除代码实现的现实检查和享受截断的包。应该有很小的损失的功能,如果没有,包括自第二数据侦听测试。


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


dataSnoop(x, ttr = "macd4", start = 0, nSteps = 0, stepSize = 0,
restrict=FALSE, burn = 0, short = FALSE, condition = NULL, silent = TRUE,
TC = 0.001, loud = TRUE, alpha = 0.025, crit = "sharpe" , begin = 1,
percent = 1, file = "", benchmark = "hold", bSamples = 100,
model = "stationaryBootstrap", userParams=4, test="SPA", latex="")



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

参数:x
A univariate series
一元系列


参数:ttr
The TTR to be used.  Can be a character string for built-in TTRs, or a user defined function whose output is a position series s(t). See 'defaults' for a list of built-in TTRs.
被使用的TTR。可以是一个字符串内置的纺织商登记方案,或用户定义的函数,其输出的位置是系列S(T)。内置的TTRS的列表,请参阅“默认”。


参数:start
Initial values for parameters
参数的初始值


参数:nSteps
How many parameter choices to use for each parameter
有许多参数选择使用的每个参数


参数:stepSize
The difference between successive choices of a parameter.
连续选择一个参数之间的差异。


参数:restrict
If restricted = TRUE, this will force the second parameter (and 4th, if applicable) to be strictly greater than the first (3rd, resp.) This is sensible if the pairs are moving average parameters.
如果限制= TRUE,这将迫使第二个参数(4,如果适用的话)要严格大于(3),分别为第一,这是明智的,如果对移动平均线的参数。


参数:burn
When computing the position function s(t), values for t < burn will be forced to 0, i.e. no position held during the 'burn' period
当计算的位置函数S(T),T <烧伤值将被强制为0,即没有位置期间举行的“烧钱”期


参数:short
Logical.  If false the position function s(t) will be forced to 0 when it would otherwise be -1, i.e. no short selling
逻辑。如果为false的位置函数s(t)将被强制为0时,将是-1,即不允许卖空


参数:condition
An extra opportunity to restrict the TTR so that position is forced to 0 under some condition.  Must be a binary string of the same length as the data 'x'.  See 'position' for more details.
限制TTR一个额外的机会,所以在一定条件下,该位置被强制为0。相同的长度的数据的“x”必须是一个二进制串。有关详细信息,请参阅“位置”。


参数:silent
Logical.  If TRUE, supresses output from subroutines
逻辑。如果为TRUE,supresses输出子程序


参数:TC
Percentage used to compute returns adjusted for trading costs.
使用百分比来计算调整交易成本的回报。


参数:loud
Logical.  If FALSE, supresses output from the main function(s)
逻辑。如果为FALSE,supresses的主要功能(输出)


参数:alpha
Confidence level for 1-sided hypothesis testing
单面假设检验的置信水平


参数:crit
The criterion used to evaluate the performance.  Supported values are "sharpe" for the sharpe ratio (risk free rate assumed zero) which is consistent with Hansen's SPA, "return" which is the excess return, and "adjust" which is excess return adjusted for trading costs.
使用的标准来评价的性能。支持的值是“夏普”夏普比率(假设无风险利率为零),这是汉森的SPA,这是超额收益的“回报”,和“调整”,这是调整的交易成本的超额收益。


参数:begin
The starting index of the data.  The function assumes that the user wants a subset of the data, where the default subset is the entire data
的起始索引的数据。假定用户想要的数据的一个子集,其中默认的子集是整个数据的功能


参数:percent
How much of the original data to use (default 100
使用多少的原始数据(默认为100


参数:file
The full writable path string for a file to which output will be appended.  Ideal for reviewing results.
全写的路径字符串的文件的输出将被追加。理想的审查结果。


参数:benchmark
When computing 'excess' returns, all functions in this package subtract the conditional returns based on a given "ttr" from the "benchmark" returns.  Two different TTRs can be compared this way if desired.
当计算“过剩的回报,在此包中的所有功能根据给定的”TTR“的”标杆“回报减去有条件的回报。这样可以比较两种不同的TTRS,如果需要的话。


参数:bSamples
Number of bootstrapped samples to analyze
的自举样品分析数量


参数:model
Currently built in choices are "bootstrap" and "stationaryBootstrap". Also accepts a user defined function whose output is a series of  the same length as the input data.
目前,建于选择“引导”和“stationaryBootstrap”。同时接受一个用户定义的函数,它的输出是一系列的作为输入数据的相同的长度。


参数:userParams
Will be passed to the function 'model', in the case that 'model' is a user defined function.  Hence, a user defined function should take  two parameters, the data and a list of other needed inputs. If "stationaryBootstrap" is used, userParams is the average block length from a geometric distribution, i.e. (1/lambda).
将通过“模式”的功能,在“模式”是一个用户定义的函数的情况下。因此,用户定义的函数有两个参数,数据和其他需要投入的列表。 userParams如果“stationaryBootstrap”被使用时,是从几何分布,即(1/lambda)的平均块长度。


参数:test
Supports "RC" which is White's Reality Check, or "SPA", which is Hansen's test for Superior Predictive Ability
支持“RC”,这是白色的现实检查,或“SPA”,这是汉森高级预测能力的测试


参数:latex
Full path name for a writable file.  The laTeX code that generates a figure with a summary of the output will be appended to file.
可写的文件的完整路径名。 LaTeX的代码生成一个摘要输出的数字将被追加到文件中。


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

Returns the observed value for V-hat-N or T-SPA, the bootstrapped values of V-hat-N,b or T*-SPA, and P-value or values from the given test.
返回V-帽N或T-SPA,V-帽N,b或T *-SPA的自举值的观测值,和P-值或从给定的测试值。


注意----------Note----------

See papers for details on the 'V' values an 'T' values
查看文件细节上的V值T值

If p-value is significant, then the null hypothesis that good performance is due to data snooping is rejected.  However, this does not preclude any other null hypothesis that might explain good results.
如果p值是显着的,然后被拒绝零假设,性能良好,是由于数据探测。然而,这并不排除任何其他的零假设,即可能解释了良好的效果。

EXTREMELY IMPORTANT NOTE: The functions in this package evaluate past  performance only.  No warranty is made that the results of these tests should,  or even can, be used to inform business decisions or make predictions of  future events.  
非常重要的注意:这个包中的功能评估过去的表现。这些测试的结果,甚至是可以被用来通知商业决策或做出对未来事件的预测,作出任何保证。

The author does not make any claim that any results will predict future  performance.  No such prediction is made, directly or implied, by the outputs of  these function, and any attempt to use these function for such prediction is done  solely at the risk of the end user.
作者并没有提出任何申索任何结果,预测未来的表现。没有这样的预测,直接或暗示,这些函数的输出,和使用这些功能,这样的预测的任何企图仅在最终用户的风险。


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



David St John




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

Ryan Sullivan, Allan Timmermann, and Halbert White. Data snooping, technical trading rule performance, and the bootstrap. The Journal of Finance, 54(5):1647-1691, 1999.
Peter R. Hansen.  A Test for Superior Predictive Ability.  Jounal of Business and Economic Statistics, 2005.

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



data(spData)
rc <- dataSnoop(spData,bSamples=3,test="RC")
spa <- dataSnoop(spData,bSamples=3,test="SPA")


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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-28 23:32 , Processed in 0.042028 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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