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

 
Maxim Dmitrievsky #:

Well, I don't see what the problem is.

There was no problem in the first place. That is, there was no problem to be solved. Just sharing intermediate results and discussing different interpretations.


I myself am pretty bummed about my assumption.

Forum on trading, automated trading systems and testing trading strategies

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

fxsaber, 2023.08.19 00:50

If dopilivayut, for Monte Carlo, probably the best option to generate a random-symbol with the desired stat. characteristics.

I thought that by such randomisation of perfectly scalable real tick history I will also get a symbol, which will be perfectly scalable with proper tuning. But I got a complete failure, which, at least, made me wonder, what was there in the real history that it scalped perfectly?

 
Maxim Dmitrievsky #:

Still means there's more alpha in the ticks.

We can only say for sure that when working with ticks there is more information than when working with bars. Therefore, it is logical to work with ticks with proper computational capabilities.

 
mytarmailS #:

The first row is original (top left), all other rows are simulations based on the characteristics of the first row

I wouldn't use any of the simulations. What they do:

  1. Find several (let it be 100) stat characteristics in the bar history.
  2. Generate bar series so that these 100 statistical characteristics match.

It is absurd that 100 values can describe an original series of millions of values! It seems to be a tool of theorists but not of practitioners.


Theproposed algorithm works with ticks. Tick volumes coincide in the received bars, spreads coincide. Identical sharp reaction on news, identical rollover behaviour, etc.

Sounds like it's all cool. But I can't teach scalping even after such randomisation. And so far I have no explanation for it.


I would post an EX5-script that creates the necessary random symbol, but forum rules forbid it. I'm not ready to form a blog entry for it yet. If anyone is interested in spinning it, please contact me.

 
fxsaber #:

wasn't something that needed to be solved.

I would like to solve the following.


Task.

Randomise a real scalable symbol so that it remains scalable.


Objective.

Monte Carlile.

 
fxsaber #:
But got a complete failure, which at the very least made me wonder, what was it about the real story that made it scalp perfectly?

I think the difference is the seriality or repetitiveness of consecutive bars/ticks. During a trend most of them are in the same direction, the randomiser does them on average in 1.

 
Forester #:

I think the difference is in the seriality or repetitiveness of consecutive bars/ticks. During a trend most of them are in one direction, the randomiser makes them on average in 1.

There are several hypotheses. Just in case I checked MathRand by running this script on a real and a random symbol.

#property script_show_inputs

input datetime inFrom = D'2023.01.01';

double GetAvgPrice( const MqlTick &Tick )
{
  return((Tick.bid + Tick.ask) / 2);
}

void OnStart()
{
  MqlTick Ticks[];
  
  int Amount1 = 0;
  int Amount2 = 0;
  
  for (uint i = CopyTicksRange(_Symbol, Ticks, COPY_TICKS_INFO, inFrom * 1000) - 1; (bool)i--;)
  {
    const double Diff = NormalizeDouble(GetAvgPrice(Ticks[i]) - GetAvgPrice(Ticks[i + 1]), 8);
    
    if (Diff > 0)
      Amount1++;
    else if (Diff < 0)
      Amount2++;
  }
  
  Print(Amount1);
  Print(Amount2);
}

Both symbols showed almost the same values. Interestingly, Amount1 ~ Amount2. I.e. trendiness is formed not by the number of increments of one character, but by the absolute values of the increments themselves.

In the current randomisation algorithm, the sequence of absolute values of increments does not change.

 
fxsaber #:

There are several hypotheses. Just in case I checked MathRand by running this script on a real and random symbol.

Both symbols showed almost the same values. Interestingly, Amount1 ~ Amount2. I.e. trendiness is formed not by the number of increments of one symbol, but by the absolute values of the increments themselves.

Amount1 - Amount2 is rather volatility. Trendiness is if you add up a lot of them. In real data the trends are one, in randomised data (up to about through1), the trends are more like random outliers by increasing volatility. I assume that they are many times smaller in amplitude than the real ones.

UPD: I didn't see that you have ~ instead of - there.

About ~. Their approximate rave means just that, real well mixed, averaged in 1.
 
fxsaber #:

Not a single simulation I would use. What they do:

  1. Find several (let it be 100) stat. characteristics in the bar history.
  2. Generate a series of bars so that these 100 statistical characteristics coincide.

It isabsurd that 100 values can describe an original series of millions of values! It seems to be a tool of theorists but not of practitioners.

It is absurd to be surprised by something you are not familiar with and call it absurd.....

Are you familiar with dimensionality reduction algorithms? compression algorithms?

fxsaber #:

Theproposed algorithm works with ticks. Tick volumes coincide in the received bars, spreads coincide. Identical sharp reaction on news, identical rollover behaviour, etc.

Sounds like it's all cool. But I can't teach scalping even after such randomisation. And so far I have no explanation for it.

Here is the answer to how well your randomisation simulates real market process.....

fxsaber #:

Task.

Randomise a real scalpable symbol so that it remains scalpable.

And here is a criterion/fitness function to create a proper row simulation

 
mytarmailS #:

It's absurd to be surprised by the unfamiliar and call it absurd ....

In those artificial data as a signal - periodic functions, for analysis of which 1-2-10 periods are enough (every 50 bars, for example, the same function (absolutely), but with different noise, after 50 again, etc.). In market data there is no periodic function, so we need to analyse everything....

 
mytarmailS #:

Are you familiar with dimensionality reduction algorithms? Compression algorithms?

Yes.

Here's how well your randomisation simulates the real market process...

Yes.

And here's a criterion/fitness function for creating a proper simulation of a series.

Unfortunately, it's not clear which input parameters of the randomisation to optimise.