+BALANCED machine learning option

Posted By: Nialler

+BALANCED machine learning option - 01/14/19 22:19

Hi,

I'm using the +BALANCED train option and I'm wondering what Zorro Trader is doing exactly to balance the data. I've read in the documentation that its used to "enforce the same number of positive and negative target values by replication" and "trades used for training should result in about 50% wins and 50% losses, and negative and positive Objective values should be equally distributed", but I'm unsure how it picks which of the objective values to replicate.

The selection does not seem to be random, and the same target values get duplicated no matter how many samples exist.

Does anyone have any insight into what the Zorro +BALANCED option is doing under the hood?

The example I'm using is from the Financial Hacker example:

adviseLong(SIGNALS+BALANCED,0,
change(1),change(2),change(3),change(4),
range(1),range(2),range(3),range(4));
Posted By: jcl

Re: +BALANCED machine learning option - 01/18/19 07:37

The algorithm attempts to keep wins and losses in a similar range. If there are more wins at any point, then the next losses are repeated, and vice versa. If you have 500 wins and 1 loss, then it is repeated 500 times.
© 2024 lite-C Forums