交易中的机器学习:理论、模型、实践和算法交易 - 页 3043

 
Aleksey Nikolayev #:

使用 matstat 执行此类任务的主要问题在于,TS 的搜索是从大量变体中进行选择的。我们总能从大量变体中选择出非常漂亮的东西--我曾在这里举过一个简单的例子,通过将价格建模为 CB,您总能 "找到 "一周中适合交易的一个小时。而这只有 120 种变体可供选择。

matstat 并没有说被选中的 TS 一定不好,它只是说这样的结果可以(而不是必须)只是从 SB 中选择的结果。

我还是不明白,没有办法肯定地说,最后结果是否具有统计学意义?是否有统计学意义?

Aleksey Vyazmikin#:

启动时出错

1) 数据是否与示例中的相同?

2) 也许在新的 R 中,函数参数的名称发生了变化

?embed
 

其中一个方向可能不是寻找最佳参数,而是寻找最稳定的 TS 参数,即摒弃那些在不同历史时期结果具有可变性的变体。

一种方法是将结果稳定性指标纳入评估标准。

 

有一个很好的 贝叶斯优化软件包...

你可以进行多标准优化、对有噪声的函数进行优化等,这个软件包非常有趣。

我做了一个玩具例子,说明算法如何在一维向量中搜索最小值。

library(mlrMBO)

set.seed(123)
xx <- cumsum(rnorm(1000))
par(mar=c(2,2,2,2))
plot(xx,t="l")

fun = function(i){
  plot(xx,t="l",col=8)
  points(i,xx[i],col=4,lwd=4)
  return(xx[i])
}

obj.fun = makeSingleObjectiveFunction(name = "noisy_parable", 
                                      fn = fun,
                                      has.simple.signature = TRUE, 
                                      par.set = makeNumericParamSet("i", 1, 1, length(xx)),
                                      noisy = F)


ctrl = makeMBOControl(final.method = "best.true.y", final.evals = 10)
ctrl = setMBOControlInfill(ctrl, crit = crit.eqi)
ctrl = setMBOControlTermination(ctrl, iters = 40)

configureMlr(on.learner.warning = "quiet", show.learner.output = F)
res = mbo(obj.fun, control = ctrl, show.info = T)

points(res$x$i, xx[res$x$i] , col=2,lwd=5, pch=10)
Bayesian Optimization and Model-Based Optimization of Expensive Black-Box Functions
  • mlrmbo.mlr-org.com
Flexible and comprehensive R toolbox for model-based optimization (MBO), also known as Bayesian optimization. It implements the Efficient Global Optimization Algorithm and is designed for both single- and multi- objective optimization with mixed continuous, categorical and conditional parameters. The machine learning toolbox mlr provide dozens of regression learners to model the performance of the target algorithm with respect to the parameter settings. It provides many different infill criteria to guide the search process. Additional features include multi-point batch proposal, parallel execution as well as visualization and sophisticated logging mechanisms, which is especially useful for teaching and understanding of algorithm behavior. mlrMBO is implemented in a modular fashion, such that single components can be easily replaced or adapted by the user for specific use cases.
 
mytarmailS #:

我还是不明白,没有办法肯定地说 Fin. Res. 是否具有统计学意义。还是没有意义?

不要把与使用同一指标相关的两件事混为一谈:

1) 用该指标评估一个 TS 的结果。

2) 通过最大化该指标从大量选项中选择一个 TS。

在第一种情况下,指标值可能具有统计意义,但在第二种情况下,则不太可能。

 
mytarmailS #:

我还是不明白,没有办法肯定地说 Fin. Res. 是否具有统计学意义。还是没有意义?

1) 数据是否与示例中的相同?

2) 也许在新的 R 中,函数参数的名称发生了变化

1. 是

2.也许 - 启动 3.5.0 - 申请库 - 安装,再次出现错误。

installing the source package ‘inTrees’

trying URL 'https://mirrors.tuna.tsinghua.edu.cn/CRAN/src/contrib/inTrees_1.3.tar.gz'
Content type 'application/octet-stream' length 16771 bytes (16 KB)
downloaded 16 KB

ERROR: dependency 'arules' is not available for package 'inTrees'
* removing 'C:/Users/S_V_A/Documents/R/win-library/3.5/inTrees'
In R CMD INSTALL
Warning in install.packages :
  installation of package ‘inTrees’ had non-zero exit status
 
Aleksey Vyazmikin #:

1. 是

2.可能 - 打开 3.5.0 - 申请库 - 安装,再次出现错误。

查看该函数的参数

?embed

在该函数出现错误的版本中。

是我写的!

 
Aleksey Nikolayev #:

不要把涉及使用同一指标的两件事混为一谈:

1) 评估一个 TC 在该指标上的结果。

2) 通过最大限度地利用该指标,从大量选项中选择一个 TS。

在第一种情况下,指标值可以说明统计意义,但在第二种情况下,则很难说明统计意义。

简单地说,如果我用统计意义来评价一个技术服务,它就是好的、

如果我有 100 个 TS,我用同样的标准选择了最好的一个,它就不好吗?


我一定是误解了什么? 这也不可能是对的?

 
Andrey Dik #:

其中一个方向可能不是寻找最好的 TS 参数,而是寻找最稳定的 TS 参数,即摒弃那些在不同历史时期结果具有变异性的变体。

一种方法是将结果稳定性指标纳入评估标准。

您的稳定性评估变式是什么?我们最近一直在讨论两种方案。
 
mytarmailS #:

查看函数的参数

该函数出错的版本中的参数。

是我写的!

embed {stats}   R Documentation
Embedding a Time Series

Description

Embeds the time series x into a low-dimensional Euclidean space.

Usage

embed (x, dimension = 1)
Arguments

x       
a numeric vector, matrix, or time series.
dimension       
a scalar representing the embedding dimension.
Details

Each row of the resulting matrix consists of sequences x[t], x[t-1], ..., x[t-dimension+1], where t is the original index of x. If x is a matrix, i.e., x contains more than one variable, then x[t] consists of the tth observation on each variable.

Value

A matrix containing the embedded time series x.

Author(s)

A. Trapletti, B.D. Ripley

Examples

x <- 1:10
embed (x, 3)
[Package stats version 4.0.2 Index]
 
Aleksey Vyazmikin #:

没问题,应该能用。

你确定没有修改代码? 给我看看出现错误的代码。