トレーディングにおける機械学習:理論、モデル、実践、アルゴトレーディング - ページ 3043

 
Aleksey Nikolayev #:

このようなタスクにmatstatを使用する際の主な問題は、TSの探索が多数の変種からの選択によって行われることである。単純な例として、価格をCBとしてモデル化することで、取引に適した1週間の1時間を常に「見つける」ことができることをここで示したことがある。そしてそれは、たった120のバリエーションから選ぶだけなのだ。

matstatは、選択されたTSが必ずしも悪いとは言っておらず、そのような結果はSBからの選択の結果である可能性がある(MUSTではない)と言っているだけである。

その結果が統計的に有意かどうかを確実に言う方法はない。TCかどうか?

Aleksey Vyazmikin#:

を起動するとエラーが出ます。

1) サンプルと同じデータですか?

2) 新しいRでは、関数の引数の名前が変わっているかもしれません。

?embed
 

その方向性のひとつは、ベストではなく、TSの最も安定したパラメータを探すことである。

一つの方法は、結果の安定性の指標を評価基準に含めることである。

 

ベイズ最適化に関する素晴らしいパッケージが ある。

多基準最適化、ノイズを含む関数の最適化、その他いろいろなことができる、とても面白いパッケージだ。

私は、アルゴリズムが1次元ベクトルの最小値をどのように探索するかのおもちゃの例を作った。

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 #:

統計的に有意かどうかを確実に言う方法はない。統計的に有意なのか、そうでないのか?

同じ指標の使用に関する2つのことを混ぜないでください:

1) 1つのTSの結果をこの指標で評価すること。

2) この指標を最大化することで、多数の選択肢から1つのTSを選択すること。

最初のケースでは、指標の値は統計的に有意である可能性があるが、2番目のケースでは、その可能性は低い。

 
mytarmailS #:

統計的に有意かどうかを確実に言う方法はない。or not?

1) データは例のものと同じか?

2) 新しいRでは、関数の引数の名前が変わったのかもしれない。

ったな。

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 #:

同じインジケーターを使う2つのことを混ぜてはいけない:

1)あるTCの結果をこの指標で評価すること。

2) この指標を最大化することによって、多数の選択肢から1つのTSを選択すること。

最初のケースでは、指標の値は統計的有意性を語ることができるが、2番目のケースでは、統計的有意性はほとんどない。

簡単に言えば、1つのTSを統計的有意性で評価すれば、それは良いということである、

100個のTSがあり、同じ基準で最も良いものを選んだら、それは悪いということですか?


私は何か誤解しているのだろうか? どちらが正しいというわけでもないのだろうか?

 
Andrey Dik #:

その方向性のひとつは、ベストではなく、TSの最も安定したパラメータを探すことかもしれない。

一つの方法は、結果の安定性の指標を評価基準に含めることである。

あなたの安定性評価のバリエーションは何ですか?私たちは最近、2つの選択肢について議論しています。
 
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 #:

大丈夫です、動くはずです。

本当にコードを変更したのですか? エラーが発生したコードを示してください。

理由: