트레이딩의 머신러닝: 이론, 모델, 실전 및 알고리즘 트레이딩 - 페이지 1932

 
mytarmailS :

패키지가 필요하지 않습니다. 어디에 쓰여져 있나요???

입력 행렬의 무한 항목 >>>

아마도 inf 가있을 것입니다

데이터로 무언가를 엉망으로 만들었습니다. 들어보세요. 기본 구문을 파악한 다음 모델을 훈련하는 것이 모두 동일한 가치가 있습니까?

모델을 훈련하기 전에 이것을 데이터로 가져오십시오.

X <- as.matrix(X)
X[is.na(X)] <- 0
X[is.infinite(X)] <- 100

X - 예측 변수가 있는 행렬

막심 드미트리예프스키 :

조회수 5,000회, 에일 빌리지

글쎄, 당신은 길 잃은 도시를 끝낼 수 있었습니까? )

 
mytarmailS :

모델을 훈련하기 전에 이것을 데이터로 가져오십시오.

X - 예측 변수가 있는 행렬

글쎄, 당신은 길 잃은 도시를 끝낼 수 있었습니까? )

아니, 아무도 도와주지 않아, 단지 짜증나게 할 뿐이야

 
다항식 또는 조화 근사에서 적어도 어떻게 든 이해하는 사람은 응답 하십시오 !!!
 
mytarmailS :

패키지가 필요하지 않습니다. 어디에 쓰여져 있나요???

입력 행렬의 무한 항목 >>>

아마도 inf 가있을 것입니다

데이터로 무언가를 엉망으로 만들었습니다. 들어보세요. 기본 구문을 파악한 다음 모델을 훈련하는 것이 모두 동일한 가치가 있습니까?

내가 망친 것은 내가 종가 가 있는 칼럼을 주었다는 것이다

way <- "F:\\FX\\Открытие Брокер_Demo\\Musor\\000\\Save_OHLC.csv"    # ваш путь

dt <- read.csv(file = way,header = T,sep = ";" ) # читаем файл

clos <- dt$Close # цеНу закрытия в отдельную переменную


get.ind <- function(x,n= 5 ){
자료를 첨부하고 있으니 도움 부탁드립니다.
Документация по MQL5: Константы, перечисления и структуры / Константы индикаторов / Ценовые константы
Документация по MQL5: Константы, перечисления и структуры / Константы индикаторов / Ценовые константы
  • www.mql5.com
Технические индикаторы требуют для своих расчетов указания значений цен и/или значений объемов, на которых они будут считаться. Существуют 7 предопределенных идентификаторов перечисления ENUM_APPLIED_PRICE, для указания нужной ценовой базы расчетов. Если технический индикатор для своих расчетов использует ценовые данные, тип которых задается...
파일:
Save_OHLC.zip  5363 kb
 
알렉세이 비아즈미킨 :

내가 망친 것은 내가 종가 가 있는 칼럼을 주었다는 것이다

그것은 내가 뭔가를 망쳤다는 것을 의미합니다 ((내가 지시한 명령을 입력하십시오

 
mytarmailS :

그것은 내가 뭔가를 망쳤다는 것을 의미합니다 ((내가 지시한 명령을 입력하십시오

Error in x2set(Xsub, n_neighbors, metric, nn_method = nn_sub, n_trees,  : 
  Non-finite entries in the input matrix

하지만 잘못된 위치에 넣은 것은 아닐까?

 get .target <- function(x, change){
  zz <- TTR::ZigZag(x,change = change,percent = F)
  zz <- c(diff(zz), 0 ) ; zz[zz>= 0 ] <- 1 ; zz[zz< 0 ] <- - 1
   return (zz)
}

X <- as .matrix(X)
X[ is .na(X)] <- 0
X[ is .infinite(X)] <- 100

X <- get .ind(clos)
Y <- as .factor( get .target(clos,change = 0.001 ))


library(uwot)

0.001 이란 무엇입니까 - 의미론적 부하란 무엇입니까?

 
알렉세이 비아즈미킨 :

하지만 잘못된 위치에 넣은 것은 아닐까?

네, 없습니다))

생성되기 전에 "X"를 조작하고 싶습니다.

 X <- get .ind(clos)
X <- as .matrix(X)
X[ is .na(X)] <- 0

이렇게 해


알렉세이 비아즈미킨 :

0.001 이란 무엇입니까 - 의미론적 부하란 무엇입니까?

무릎의 크기 ZZ는 카운트에 따라 포인트 또는 뭔가 있습니다. 표지판


무엇인지 모르는 경우 다음을 참조하십시오.

get.target <- function(x, change){
  zz <- TTR::ZigZag (x,change = change,percent = F)
  zz <- c(diff(zz), 0 ) ; zz[zz>= 0 ] <- 1 ; zz[zz< 0 ] <- - 1
   return (zz)
}

이것이 TTR 패키지의 ZZ임을 알 수 있습니다.

콘솔에 쓰기

?TTR::ZigZag

증명서를 받다

igZag {TTR}     R Documentation
Zig Zag
Description
Zig Zag higlights trends by removing price changes smaller than change and interpolating lines between the extreme points.

Usage
ZigZag(HL, change = 10 , percent = TRUE, retrace = FALSE,
  lastExtreme = TRUE)
Arguments
HL      
Object that is coercible to xts or matrix and contains either a High-Low price series, or a Close price series.

change  
Minimum price movement, either in dollars or percent (see percent).

percent 
Use percentage or dollar change?

retrace 
Is change a retracement of the previous move, or an absolute change from peak to trough?

lastExtreme     
If the extreme price is the same over multiple periods, should the extreme price be the first or last observation?

Details
The Zig Zag is non-predictive. The purpose of the Zig Zag is filter noise and make chart patterns clearer. It's more a visual tool than an indicator.

Value
A object of the same class as HL or a vector ( if try.xts fails) containing the Zig Zag indicator.

Warning
The last value of the ZigZag indicator is unstable (i.e. unknown) until the turning point actually occurs. Therefore this indicator isn't well-suited for use for systematic trading strategies.

Note
If High-Low prices are given, the function calculates the max/min using the high/low prices. Otherwise the function calculates the max/min of the single series.

Author(s)
Joshua Ulrich

References
The following site(s) were used to code/document this indicator:
http://www.fmlabs.com/reference/ default .htm?url=ZigZag.htm
https://www.linnsoft.com/techind/zig-zag-indicator-zig-zzo
https://www.linnsoft.com/techind/zig-zag-oscillator-indicator-zzo
http://www.metastock.com/Customer/Resources/TAAZ/ #127
http://www.stockcharts.com/school/doku.php?id=chart_school:technical_indicators:zigzag
Examples

## Get Data and Indicator ##
data(ttrc)
zz <- ZigZag( ttrc[,c("High", "Low")], change= 20 )
 
mytarmailS :

네, 없습니다))

생성되기 전에 "X"를 조작하고 싶습니다.

이렇게 해


카운트에 따라 무릎 ZZ의 크기는 포인트 또는 뭔가 있습니다. 표지판


무엇인지 모르는 경우 다음을 참조하십시오.

이것이 TTR 패키지의 ZZ임을 알 수 있습니다.

콘솔에 쓰기

증명서를 받다

그래 거기까지 더 바스락거렸고 이렇게 됐어

> X <- as .matrix(X)

> X[ is .na(X)] <- 0

> X[ is .infinite(X)] <- 100

> library(uwot)

> train.idx <- 100 : 8000

> test.idx <- 8001 : 10000

> UM <- umap(X = X[train.idx,],
+            y = Y[train.idx], 
+            approx_pow = TRUE, 
+            n_components = 3 , 
+            ret_mode .... [TRUNCATED] 

> predict.train <- umap_transform(X = X[train.idx,], 
+                                 model = UM, n_threads = 4 L, 
+                                 .... [TRUNCATED] 
11 : 08 : 52 Read 7901 rows and found 31 numeric columns
11 : 08 : 52 Applying training data column filtering/scaling
11 : 08 : 52 Processing block 1 of 1
11 : 08 : 52 Writing NN index file to temp file C:\Users\S_V_A\AppData\Local\Temp\RtmpK0sSR3\file28f467fe2995
11 : 08 : 52 Searching Annoy index using 4 threads, search_k = 1500
11 : 08 : 52 Commencing smooth kNN distance calibration using 4 threads
11 : 08 : 52 Initializing by weighted average of neighbor coordinates using 4 threads
11 : 08 : 52 Commencing optimization for 167 epochs, with 118515 positive edges
0 %   10    20    30    40    50    60    70    80    90    100 %
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
11 : 08 : 54 Finished

> predict.test <- umap_transform(X = X[test.idx,], 
+                                model = UM, n_threads = 4 L, 
+                                ver .... [TRUNCATED] 
11 : 08 : 54 Read 2000 rows and found 31 numeric columns
11 : 08 : 54 Applying training data column filtering/scaling
11 : 08 : 54 Processing block 1 of 1
11 : 08 : 54 Writing NN index file to temp file C:\Users\S_V_A\AppData\Local\Temp\RtmpK0sSR3\file28f45e3376d9
11 : 08 : 54 Searching Annoy index using 4 threads, search_k = 1500
11 : 08 : 55 Commencing smooth kNN distance calibration using 4 threads
11 : 08 : 55 Initializing by weighted average of neighbor coordinates using 4 threads
11 : 08 : 55 Commencing optimization for 167 epochs, with 30000 positive edges
0 %   10    20    30    40    50    60    70    80    90    100 %
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
11 : 08 : 55 Finished

> library(car)
Загрузка требуемого пакета: carData

> scatter3d(x = predict.train[, 1 ], 
+           y = predict.train[, 2 ], 
+           z = predict.train[, 3 ],
+           groups = Y[train.idx],
+        .... [TRUNCATED] 
Загрузка требуемого пакета: rgl
Загрузка требуемого пакета: mgcv

가격 변경 단계가 1인 경우 0.001을 예를 들어 100으로 변경해야 합니까?

100으로 변경됨

 11 : 15 : 15 Read 2000 rows and found 31 numeric columns
11 : 15 : 15 Applying training data column filtering/scaling
11 : 15 : 15 Processing block 1 of 1
11 : 15 : 15 Writing NN index file to temp file C:\Users\S_V_A\AppData\Local\Temp\RtmpK0sSR3\file28f417876e23
11 : 15 : 15 Searching Annoy index using 4 threads, search_k = 1500
11 : 15 : 15 Commencing smooth kNN distance calibration using 4 threads
11 : 15 : 15 Initializing by weighted average of neighbor coordinates using 4 threads
11 : 15 : 15 Commencing optimization for 167 epochs, with 30000 positive edges
0 %   10    20    30    40    50    60    70    80    90    100 %
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
11 : 15 : 16 Finished

> library(car)

> scatter3d(x = predict.train[, 1 ], 
+           y = predict.train[, 2 ], 
+           z = predict.train[, 3 ],
+           groups = Y[train.idx],
+        .... [TRUNCATED] 
> 
 
알렉세이 비아즈미킨 :

그래 거기까지 더 바스락거렸고 이렇게 됐어

가격 변경 단계가 1인 경우 0.001을 예를 들어 100으로 변경해야 합니까?


변경 매개변수로 놀아보기

last200clos <- tail(clos, 200 )
plot(last200clos,t= "l" )
zz <- TTR::ZigZag(HL = last200clos , percent = F,change = 50 )
lines(zz,col= 2 ,lwd= 2 )
 
mytarmailS :


변경 매개변수로 놀아보기

나는 과거 결과에서 이 사진을 얻었습니다 - 4개의 명확한 클러스터

이전에 결과를 평가하기 위한 몇 가지 디지털 값에 대해 이야기했습니다. 어떤 수치를 보려고 제안합니까?