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

 
Maxim Dmitrievsky:

I haven't looked yet, it's my day off) I'll write back when I have time, I mean later in the week.

I took a look at the packs for now. I think it fitshttps://hmmlearn.readthedocs.io/en/latest/tutorial.html

must be

 
mytarmailS:

Then you take the Viterbi algorithm and come to (data test)

you get two states, it should look like this

It's a real grail))


Maybe I'm confused, but are not these pictures not so long ago demonstrated someone Inocenti? And then it turned out that it was with peeping, shame fuck, facepalm

 
Maxim Dmitrievsky:

I'm not sure what the effect will be for non-stationarity... and if slow, it's hard even to montecarrelate

imho the main problem is scaling/transforming the data, isolating cycles since even non-linear regression or SVM give good results if the patterns repeat (on artificial BP)

i.e. problems with pattern selection are farfetched

Yeah, I'm just trying to brighten up the topic))

 
Grail:

Maybe I'm confused, but weren't these pictures shown not so long ago by someone named Inocentius, and then it turned out that it was with peeping, shame fuck, facepalm

Imho, similar pictures can be obtained with common MAs (or indicators based on them). Take a closer look.
 
Yuriy Asaulenko:
Imho, similar pictures can be obtained with ordinary MAs. Take a closer look.

Looks like really no better than mashki, actually for a particular area can be optimized mashki and cooler, and, yes, the grail has slipped away again...

Just apparently the coloring of the chart as Inokenty, so proassociated
 
Maxim Dmitrievsky:

Imho, if you allocate the modes correctly, you can get informative AR features

I'm still beating my head against the wall how to rewrite it in mql, but this is the missing element that will turn your garbage into working models

https://www.quantstart.com/articles/market-regime-detection-using-hidden-markov-models-in-qstrader

Why rewrite it? See the alglib.

CMarkovCPD::~CMarkovCPD(void)
  {

  }
//+------------------------------------------------------------------+
//| DESCRIPTION:                                                     |
//| This function creates MCPD (Markov Chains for Population Data)   |
//| solver.                                                          |
//| This solver can be used to find transition matrix P for          |
//| N-dimensional prediction problem where transition from X[i] to   |
//|     X[i+1] is modelled as X[i+1] = P*X[i]                        |
//| where X[i] and X[i+1] are N-dimensional population vectors       |
//| (components of each X are non-negative), and P is a N*N          |
//| transition matrix (elements of   are non-negative, each column   |
//| sums to 1.0).                                                    |
//| Such models arise when when:                                     |
//| * there is some population of individuals                        |
//| * individuals can have different states                          |
//| * individuals can transit from one state to another              |
//| * population size is constant, i.e. there is no new individuals  |
//|   and no one leaves population                                   |
//| * you want to model transitions of individuals from one state    |
//|   into another                                                   |
//| USAGE:                                                           |
//| Here we give very brief outline of the MCPD. We strongly         |
//| recommend you to read examples in the ALGLIB Reference Manual    |
//| and to read ALGLIB User Guide on data analysis which is          |
//| available at http://www.alglib.net/dataanalysis/                 |
//| 1. User initializes algorithm state with MCPDCreate() call       |
//| 2. User adds one or more tracks -  sequences of states which     |
//|    describe evolution of a system being modelled from different  |
//|    starting conditions                                           |
//| 3. User may add optional boundary, equality and/or linear        |
//|    constraints on the coefficients of P by calling one of the    |
//|    following functions:                                          |
//|    * MCPDSetEC() to set equality constraints                     |
//|    * MCPDSetBC() to set bound constraints                        |
//|    * MCPDSetLC() to set linear constraints                       |
//| 4. Optionally, user may set custom weights for prediction errors |
//|    (by default, algorithm assigns non-equal, automatically chosen|
//|    weights for errors in the prediction of different components  |
//|    of X). It can be done with a call of                          |
//|    MCPDSetPredictionWeights() function.                          |
//| 5. User calls MCPDSolve() function which takes algorithm state   |
//|    and pointer (delegate, etc.) to callback function which       |
//|    calculates F/G.                                               |
//| 6. User calls MCPDResults() to get solution                      |
//| INPUT PARAMETERS:                                                |
//|     N       -   problem dimension, N>=1                          |
//| OUTPUT PARAMETERS:                                               |
//|     State   -   structure stores algorithm state                 |
//+------------------------------------------------------------------+

 
elibrarius:

Why rewrite? See alglib.


wow, is that in datanalisis or solvers? didn't see it in the help

 
Maxim Dmitrievsky:

Wow, is that in the datanalisis or in the solvers?

datanalisis - search for the file itself
 
elibrarius:
datanalisis - search the file itself

in the header it says look at the examples on the site, but there are no examples on the site

 
Maxim Dmitrievsky:

In the header it says see examples on the site, but there are no examples on the site

If you know how to work with this in other languages, I think you can use this version by analogy. The I/O parameters should be similar.