Machine learning in trading: theory, models, practice and algo-trading - page 2969

 
Maxim Dmitrievsky #:
I started writing code in Python right away, without almost learning it. Then a couple of basic libraries were needed and that was it.

Well, that's fine, it was designed that way....

But why these passive-aggressive attacks on R all the time? It's the best language for its tasks, that's what it was created for,

Python is a general language with a pretence of being easy to learn...


The main thing is not that, but to make beautiful deals with the help of algorithms.


 
mytarmailS #:

because that's not what it's for.

Why doesn't anyone write websites in C++?

Each language has its own task, that's why there are so many of them.

I just chose what was more familiar, more similar to mql, and what was less familiar (not familiar) was called jerky. And you should have studied...

you probably just don't know enough about it...C++ backend is in high demand and it's almost the most expensive jobs.

 
Maxim Kuznetsov #:

you're probably not fully aware...C++ backend is in high demand and it's almost the most expensive jobs.

you probably just don't fully realise that a website is not only backend ;)

 

Not everyone follows the development of MQL5, but it has standard methods for matrices and vectors.

These are the standard methods of the language, not third-party libraries. With the introduction of matrix/vector/complex types, the language has become very powerful for stat analysis and heavy mathematics.

Function

Action

Category

Activation

Calculates the values of the activation function and writes to the passed vector/matrix

Machine learning

ArgMax

Returns the index of the maximum value

Statistics

ArgMin

Returns the index of the minimum value

Statistics

ArgSort

Returns the sorted index

Manipulations

Assign

Copies a matrix, vector or array with automatic conversion

Initialisation

Average

Calculates a weighted average of matrix/vector values.

Statistics

Cholesky

Calculates Cholesky decomposition

Transformations

Clip

Restricts matrix/vector elements to a specified range of acceptable values

Manipulations

Col

Returns a column vector. Writes the vector to the specified column

Manipulations

Cols

Returns the number of columns in the matrix

Characteristics

Compare

Compares elements of two matrices/vectors with specified accuracy

Manipulations

CompareByDigits

Compares elements of two matrices/vectors for matching with precision of significant digits

Manipulations

Cond

Calculates the conditional number of a matrix

Characteristics

Convolve

Returns a discrete linear convolution of two vectors

Derivatives

Copy

Returns a copy of a given matrix/vector

Manipulations

CopyRates

Gets the historical series of the MqlRates structure of the specified symbol-period in the specified amount into a matrix or vector

Initialisation

CopyTicks

Gets ticks from MqlTick structure into a matrix or vector

Initialisation

CopyTicksRange

Gets to a matrix or vector of ticks from the MqlTick structure in the specified date range.

Initialisation

CorrCoef

Calculates Pearson correlation coefficient (linear correlation coefficient)

Derivatives

Correlate

Calculates the cross-correlation of two vectors

Derivatives

Cov

Calculates the covariance matrix

Products

CumProd

Returns the cumulative product of matrix/vector elements, including elements along the given axis.

Statistics

CumSum

Returns the cumulative sum of matrix/vector elements, including elements along the given axis

Statistics

Derivative

Calculates the values of the derivative of the activation function and writes to the passed vector/matrix

Machine Learning

Det

Computes the determinant of a square nondegenerate matrix

Characteristics

Diag

Extracts a diagonal or constructs a diagonal matrix

Manipulations

Dot

Scalar product of two vectors

Derivatives

Eig

Calculates eigenvalues and right eigenvectors of a square matrix

Transformations

EigVals

Calculates eigenvalues of a general matrix

Transformations

Eye

Returns a matrix with ones on the diagonal and zeros elsewhere

Initialisation

Fill

Fills an existing matrix or vector with a given value

Initialisation

Flat

Allows a matrix element to be accessed using a single index instead of two indexes

Manipulations

Full

Creates and returns a new matrix filled with the specified value.

Initialisation

GeMM

General Matrix Multiply of two matrices (General Matrix Multiply)

Products

Hsplit

Horizontal splitting of a matrix into several submatrices. Same as Split with axis=0.

Manipulations

Identity

Creates a single matrix of the specified size

Initialisation

Init

Initialises a matrix or vector

Initialisation

Inner

Inner product of two matrices

Derivatives

Inv

Computes the (multiplicative) inverse of a square nondegenerate matrix using the Jordaan-Gauss method

Solutions

Kron

Returns the Kronecker product of two matrices, a matrix and a vector, a vector and a matrix, or two vectors

Products

Loss

Computes the values of the loss function and writes to the vector/matrix passed in

Machine learning

LstSq

Returns the least squares solution of linear algebraic equations (for non-square or degenerate matrices)

Solutions

LU

LU factorisation of a matrix as the product of a lower triangular matrix and an upper triangular matrix

Transformations

LUP

LUP factorisation with partial permutation, which refers to the LU decomposition with row permutation only: PA=LU

Transformations

MatMul

Matrix product of two matrices

Derivatives

Max

Returns the maximum value in a matrix/vector

Statistics

Mean

Calculates the arithmetic mean of element values

Statistics

Median

Calculates median of matrix/vector elements

Statistics

Min

Returns the minimum value in the matrix/vector

Statistics

Norm

Returns the norm of the matrix or vector

Characteristics

Ones

Creates and returns a new matrix filled with ones

Initialisation

Outer

Calculates the outer product of two matrices or two vectors

Products

Percentile

Returns the specified percentile of the matrix/vector elements or elements along the specified axis.

Statistics

PInv

Computes a pseudo-inverse matrix using the Moore-Penrose method

Solutions

Power

Elevates a square matrix to integer degree

Products

Prod

Returns the product of matrix/vector elements, which can also be performed for a given axis

Statistics

Ptp

Returns the range of matrix/vector values or the given matrix axis

Statistics

QR

Calculates the qr factorisation of a matrix

Transformations

Quantile

Returns the specified quantile of matrix/vector element values or elements along the specified axis

Statistics

Rank

Returns the rank of the matrix using the Gaussian method

Characteristics

RegressionMetric

Calculates the regression metric as the error of deviation from the regression line drawn on the specified data set

Statistics

Reshape

Changes the shape of a matrix without changing its data

Manipulations

Resize

Returns a new matrix with changed shape and size

Manipulations

Row

Returns a vector row. Writes the vector to the specified row

Manipulations

Rows

Returns the number of rows in the matrix

Characteristics

Size

Returns the size of the vector

Characteristics

SLogDet

Calculates sign and logarithm of matrix determinant

Characteristics

Solve

Solves a linear matrix equation or a system of linear algebraic equations

Solutions

Sort

Sort by location

Manipulations

Spectrum

Computes the spectrum of a matrix as the set of its eigenvalues from the product AT*A

Characteristics

Split

Split a matrix into several submatrices

Manipulations

Std

Returns the standard deviation of matrix/vector element values or elements along a given axis.

Statistics

Sum

Returns the sum of matrix/vector elements that can also be performed for the given axis(es)

Statistics

SVD

Singular Value Decomposition

Transformations

SwapCols

Swaps columns in a matrix

Manipulations

SwapRows

Swaps rows in a matrix

Manipulations

Trace

Returns the sum of the diagonals of the matrix

Characteristics

Transpose

Transpose (swaps axes) and returns the modified matrix

Manipulations

Tri

Constructs a matrix with ones on the given diagonal and below and zeros elsewhere.

Initialisation

TriL

Returns a copy of the matrix with zeroed elements over the kth diagonal. Lower triangular matrix

Manipulations

TriU

Returns a copy of the matrix with zeroed elements below the k-th diagonal. Upper triangular matrix

Manipulations

Var

Calculates the variance of the matrix/vector element values

Statistics

Vsplit

Vertical splitting of a matrix into several submatrices. Same as Split with axis=1

Manipulations

Zeros

Creates and returns a new matrix filled with zeros

Initialisation

Документация по MQL5: Методы матриц и векторов
Документация по MQL5: Методы матриц и векторов
  • www.mql5.com
Методы матриц и векторов - Справочник MQL5 - Справочник по языку алгоритмического/автоматического трейдинга для MetaTrader 5
 
mytarmailS #:

Well great, that's the way it was intended.....

But why these passive aggressive attacks on R all the time? It's the best language for its tasks, that's what it was designed for,

Python is a generic language with the pretence of being easy to learn...


The main thing is not that, but to make beautiful deals with the help of algorithms.


I don't need your deals, I need backtests!
Trading is not about science, it's more situational. Today's trades are +, tomorrow's are -.
There was a normal arbitrage when you could buy flowers for women and cars for yourself, and then somehow it was deflated. And no matter what statistics you use, Mikola won't make a stone flower.

Another problem with neurons is the choice of models. One has been working for a year, the others are blown away. Then some Egyptian yells at you that you cheated him. What are you gonna do? That's the nature of things. And the statistics somehow pass by again. So the choice was obvious - for maximum simplicity and convenience.
 
Maxim Dmitrievsky #:
I don't need your deals, I need your backtests!
Trading is not about science, it's more situational. Today's trades are up, tomorrow's
With all my knowledge, I don't know how to algorithmise it, I just have an understanding of the situation and that's all...
The MO is like an indicator, and 99% of the intellectual robot behind me...

1) Either it's like this and it's working.

2) or everything is automatic and it never works.


for now I'm sitting on 1) but dreaming about 2)

 
mytarmailS #:
For all my knowledge, I don't know how to algorithmise it, I just have an understanding of the situation and that's it....
IO is like an indicator, and 99% of the intelligent robot is behind me...

1) It's either that, and it works.

2) Or it's all on automatic and it never works.


I'm sitting on 1) but I'm dreaming of 2).

You figure out how to validate your FF crafting better and it'll be automatic. It's a cool idea.
 
Maxim Dmitrievsky #:
You figure out how to validate your FF craft better and it'll be automatic. That's a cool idea.

You just validate it like a normal algorithm.

I'm not talking about it as a discovery, I invented it more than a year ago...

The man asked how to train AMO for profit, I just showed him how...

 
mytarmailS #:

you just validate it like a normal algorithm.

I'm not talking about it as a discovery, I invented this thing more than a year ago....

The man asked how to train AMO for profit, I just showed you how.

It's not gonna work like a regular one. You need some tricky auto-tuning for unknown data, screening out noise signals, etc. to do about the same thing as a human.
 
mytarmailS #:


The man asked me how to train AMO for profit, I just showed him how.

I can not understand what, but something protests in me against your idea with a target in the form of a balance.


Everything is very similar to trading on history: here bought, and here sold ... and you sit there all smart and rich.


And then you go to real trading, buy, and the market turns around and a hundred pips in the other direction. This is exactly what I observe in my TS. There are few such cases, no more than 10 per cent of all, but everything goes under the tail.


It follows from your idea that you can bypass, i.e. actually predict strong market movements at the expense of the penalty, but it is impossible, because strong movements are the basis of non-stationarity of financial markets.


PS.

The mentioned zigzag is the same balance, but marked into longs and shorts.