Market etiquette or good manners in a minefield - page 2

 

I could be wrong, but NProgrammer probably meant that a neural network with a wrong wizard is like watching microorganisms with a hammer

 
HideYourRichess писал(а) >>
the link to "When, the basic equation of balance (details here) including the spread will look like this:" does not lead anywhere

I've fixed it. Now "here" is where it should go :-)

Suvorov wrote(a) >>

Where did you get those formulas from anyway? Did you even understand what you wrote?

With such a probability of less than 0.1 it's better not to trade:))) it will be more expensive.

I made the formulas myself and I understand what I'm writing about.

By the way, the formula I was looking for the extremum is not given in full. In that form, in which it is given in the first post, it shows the income for n transactions. We are interested in income per fixed time:

The difference is in the first term - it appears due to the fact that position holding time is on average proportional to the square of the price movement amplitude ds=SQRT(t). It is for this case that my estimations of optimum leverage and average profit value are given.

P.S. And as for 10%, I wish I had a stable TS with such parameters.

Suvorov wrote(a) >>
How to determine the probability of accurate prediction of the sign of the expected price movement? Statistically? Ok, for example: TS has given a signal to open a long position the first 2 hours the market goes in the right direction and after 2 hours went down. It looks like TS has given the right result, but it seems not.

I am talking about statistics of already executed trades. Count how many closed in the "+" and divide by the total number of transactions we get, say 54%, so p=0.04.

HideYourRichess wrote :>>

It says "(1/2+p where p is probability of correct prediction of a sign of expected price movement)" i.e. p needs to be added to 0.5

Why the mapper needs such a complication, is not clear.

There is not much of a problem. Right: "...where 1/2+p is the probability of correctly predicting the sign of the expected price movement."

FION wrote: >>

Knowing your love of analytical methods I'm interested - what do you feed into the output of the network for training?

Kagi
 
Prival >> :

It would make a good article if you teamed up with Mathemat and his bernuli.

Bernoulli has incredible potential. It's all about knowing when it's acceptable to apply it. Perhaps we can take a closer look at this formula.

 
Mathemat писал(а) >>

Bernoulli has incredible potential. The key is to know when it is acceptable to apply it. Perhaps we can take a closer look at this formula.

I just think the following material will be good for a lot of people. We run the Expert Advisor on history, determine that it's not a berk, calculate probability, confidence limits for forecast probability estimation and then calculate the lot based on the forecast probability (we also take it out of the tester).

Because if it was taken, then there is no point in calculation of lot, also there is no point if the forecast probability confidence interval is 0.5.

The methodology would be very interesting to get (read).

 
Bernoulli??? To the market??? How's that???
 
KimIV писал(а) >>
Bernoulli??? To the market??? How's that???

to the sequence of transactions. If random, take

 
Prival писал(а) >>

to the sequence of transactions. If random, Bernoulli's law

Bernoulli's law seems to have been derived for gases and liquids. Or is there another law applicable to random variables?

 
KimIV писал(а) >>

Bernoulli's law seems to have been derived for gases and liquids. Or is there another law that applies to random variables?

Different laws can be considered. But if the transactions are random then it is more likely that the consistency of P U ...., will be subject to Bernoulli's Law, here a mathematician wrote about it 'Delusions, Part 2: Statistics is Pseudoscience, or the Chronicle of a Diving Sandwich'. If I'm wrong, I hope he corrects me.

 

Yes, Igor, Bernoulli is a dynasty. I'm already confused by them. But one of them is named after a sequence of independent success/failure deals (i.e. 1/0) with a fixed probability of success ("Bernoulli's scheme"). If it turns out that the sequence of deals satisfies Bernoulli's scheme, one can make a couple of non-trivial conclusions about the trading system itself - conclusions that do not follow directly from the test results. This very Bernoulli is considered to be the father of the terver.

 

I wrote a program which generates Bernouleva sequence and with probability 1/2+p, where p=5% gives a positive increment. This is a simulation of "real" work of some TS, which with 55% probability opens a position correctly. The task is to see how exceeding or undershooting of leverage really affects the behavior of the balance of funds in the account (ordinate axis). To do this, we will generate 1000 transactions, set TS to the optimal size of transaction dS (at commission=2 points, p=5% we obtain |dS|=40 points and Lever=12) and enter the market with the optimal leverage (black line), three times larger (red) and three times smaller (blue):

The solid lines in the chart show the analytical solution as given in the formula of the first post. We can note good agreement of the obtained solution with the experiment which points to the absence of gross errors in the adopted model and correspondence of the optimal leverage and maximum profitability observed in "real" trading. We can see that exceeding of the Lever size leads to inevitable loss of the deposit even if the expected payoff is positive, and decrease of the Lever size leads to shortfall of possible profit.

The same situation can be seen when the optimum value of the second parameter - the average transaction amount, is not observed. In our case the optimum value of this parameter is 40 points. Let us fix an optimal trading leverage Lever=12 and enter the market with an optimal |dS|=40 points (black line), three times larger (red line) and three times smaller (blue line):

We can clearly see that placing of StopLoss and TakeProfit orders (they set the average size of |dS|) larger or smaller than the optimal level, leads to a decrease in the rate of possible profit. Moreover, a threefold decrease has had disastrous consequences for the deposit (blue line), while a threefold increase has only a slight decrease in profits but leads to a considerable increase in drawdowns (red line).

By the way, if we analyze the results of trading of an Expert Advisor, for example, placed by a reputable KimIV in the Championship:

Then we can, with a certain degree of certainty, suggest that this trading robot may have exceeded the optimal leverage size. Compare the upper graph, the red line...

As a dry residue, we can talk about cautious confidence in the obtained formulas.

.

Then, if

S - price of the instrument in pips,

K - deposit size in $,

stLot - price in $ of the standard lot,

Lot - the size of the opened position in fractions of stLot,

Spread - commission on the instrument in points,

1/2+p - the share of correct predictions according to the results of TS testing (0<=p<=0.5),

<|dS|> - price increment for the time of position holding in points,

Lever - trade leverage.

.

then the optimal parameters of TS should be considered:

trading leverage Lever=S/Spread*p^2,

TR and SL levels or the same |dS| = Spread/p,

open position size Lot=K/stLot*S/Spread*p^2,

typical time of deposit doubling t=2*t0*Spread^2/p^4, where t0 is average time of position holding.