nullModel(ttrTests)
nullModel()所属R语言包:ttrTests
Hypothesis test for efficacy of TTR
假设检验的有效性,TTR
译者:生物统计家园网 机器人LoveR
描述----------Description----------
One of the four main functions in the package. Creates a confidence interval for the observed excess return via bootstrap resampling. Can write summary of output to a file as a latex figure.
包中的4个主要功能之一。创建一个置信区间,通过引导重采样所观察到的超额收益。可乳胶数字输出到一个文件,写总结。
用法----------Usage----------
nullModel(x, model = "stationaryBootstrap", userParams = 4,
bSamples = 100, ttr = "macd4", params = 0, burn = 0, short = FALSE,
condition = NULL, silent = TRUE, loud = TRUE, alpha = 0.025,
crit = "return", TC = 0.001, benchmark = "hold", latex = "")
参数----------Arguments----------
参数:x
A univariate series
一元系列
参数:model
Passed to the function 'generateSample'
传递,以功能的generateSample的
参数:userParams
Passed to the function 'generateSample'
传递,以功能的generateSample的
参数:bSamples
How many bootstrapped samples to generate
有多少引导的样本,以产生
参数:ttr
Could be a character string for a built in TTR, or a user defined function. User defined functions must take a univarate series and a list/vector of inputs and must output a series with values 1,0,-1 only
可能是一个字符串TTR一个内置的或用户定义的函数。用户定义的函数必须采取univarate的系列和列表/输入向量的和必须输出一个系列的值1,0,-1
参数:params
Used to calculate the position based on the given TTR
用于计算基于在给定的的TTR的位置
参数: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, output from subroutines will be supressed.
逻辑。如果是TRUE,输出子程序将被抑制。
参数:loud
Logical. If FALSE, output from the main function will be supressed.
逻辑。如果为FALSE,输出的主要功能将被抑制。
参数:alpha
Confidence interval for 1-sided hypothesis test
单面假设检验的置信区间
参数: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,这是超额收益的“回报”,和“调整”,这是调整的交易成本的超额收益。
参数:TC
Percentage trading costs. Used to adjust return statistics.
占交易成本。用于调整回报率的统计。
参数: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,如果需要的话。
参数: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----------
<table summary="R valueblock"> <tr valign="top"><td> CR </td> <td> A vector of conditional returns of length 'bSamples'</td></tr> <tr valign="top"><td> AR </td> <td> CR, adjusted for trading costs</td></tr> <tr valign="top"><td> SR </td> <td> Sharp ratio for these returns using r_f = 0</td></tr> <tr valign="top"><td> Z </td> <td> Z-score for observed excess return, using mean and standard deviation of CR for a confidence interval</td></tr> <tr valign="top"><td> P </td> <td> P-value associated with observed Z-score</td></tr> </table>
<table summary="R valueblock"> <tr valign="top"> <TD> CR </ TD> <td>一个矢量的长度为“bSamples的条件回报”</ TD> </ TR> <tr valign="top"> <TD> AR </ TD> <TD> CR,交易成本作出调整</ TD> </ TR> <tr valign="top"> <TD> X> </ TD> <TD>为这些使用r_f回报的夏普比率= 0 </ TD> </ TR> <tr valign="top"> <TD> SR </ TD> <TD> Z-得分观察到的超额收益,均值和标准差的置信区间CR </ TD> </ TR> <tr valign="top"> <TD> Z </ TD> <TD> P-值与观测到的Z-得分</ TD> </ TR> </ TABLE>
注意----------Note----------
A significant P-value is enough to reject the null hypothesis that the TTR had results due solely to randomness in the data. However, there are several other null hypotheses to explain good results, chiefly the data snooping hypothesis, addressed using the function 'realityCheck'.
一个显着的P-值是足够的拒绝零假设,TTR的结果纯粹由于数据的随机性。但是,也有一些其他空假说来解释了良好的效果,主要是数据探测假设,解决使用功能的RealityCheck中。
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----------
William Brock, Josef Lakonishok, and Blake LeBaron. Simple technical trading rules and the stochastic properties of stock returns. The Journal of Finance, 47(5):1731-1764, 1992.
实例----------Examples----------
data(spData)
null <- nullModel(spData,bSamples=5)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|