Optimal values of SL and TP orders for an arbitrary TS. - page 9

 
Farnsworth >>:

у нас же - 2 распределения (напомню):

  • распределение пунктов, которые принесло только ТС
  • распределение пунктов, которые принесло ТС и совместное срабатывание SL/TP

Ты о каком из них?

First about one, then the other. What happens to the first distribution if SL/TP is added? It becomes the second. Now there is a discussion on how to describe this transition.

That's it, I'm off for the day.

 
Candid >>:

Сначала об одном, потом о другом. Что произойдёт с первым распределением если добавить SL/TP? Оно станет вторым. Сейчас идёт рассуждение о том, как описать этот переход.

Всё, на сегодня ушёл.

How will you even get the first one without the stops? Will you be testing on the same rows, with all the "force majors". Or will it be some "cleaned" rows, purely theoretical. In general - so far all this is an abstraction and now I don't see the reasons of its workability :o(

 
Farnsworth писал(а) >>

Sergei, is that you?! It looks like a face, but the name on the passport is completely different.

Oh, you got married and took your wife's name?

 
Farnsworth >>:

А как ты вообще получишь первое без стопов? Тестировать ты будешь на тех же рядах, со всем "форсмажерами".

So what, the force majeure will build up distribution tails. Who says that the actual distribution has to be perfect?

 
Candid >>:

Ну и что, на форсмажорах наработаются хвосты распределения. Кто сказал что реальное распределения должно быть идеальным?

It's just that the meaning of what was said in the sense of what was written, starts to get a bit lost. :о)

 
Yurixx >>:

Сергей, ты ли это ?! Лицо вроде похоже, но в паспорте совсем другое имя.

That's my favourite cartoon character. More Bendr.(http://www.futurama.ru/farnsworth.shtml)

Ahh, you got married and took your wife's last name ?

That's more fun for you :o)

 
Farnsworth писал(а) >>

Yeah, I can't argue with you now, Professor. So i take it all back. >> that's it!

 
Farnsworth >>:

А как ты вообще получишь первое без стопов? Тестировать ты будешь на тех же рядах, со всем "форсмажерами". Или это будут какие то "очищенные" ряды, сугубо теоретические. В общем - пока все это абстракция и сейчас не вижу причин ее работоспособности :о(


Sergey, everything you are trying to define for yourself now boils down to the requirement to specify the conditions of a certain TC. So far, we do not need to do this within the adopted presentation format. I am trying to give general features of a design, which allows us to understand the logic of operation of all constituent elements of the MTS and their connection to each other. It doesn't matter how and what works in detail, it's the overall, big picture that counts. Besides, at such approach, as a rule, many artificial constructions introduced in system for the purpose of its simplification, at the end self-destruct without leaving a trace in final result and it would be incorrect to be buried in an infinite number of details at intermediate stages of construction.

Let's continue.

Let me remind you that we got an expression for the logarithm of profit of an arbitrary TS which is specified by the FR of its bribes and whose operation is determined by the deposit share f coming to one point, SL & TP of orders (in points):

In order to enter into the functionality of the member responsible for the commission of the FC, we need to find out how the introduction of the spread affects the view of the FR.

In the picture on the left we see the distribution of FRs for the TS working without spread and on the right - spread of 10 points. You can see that the distribution of the profit has not changed but shifted to the left along the abscissa by exactly ten points. And if in the first case for the TS working on martingale (integrated CB with MO=0 - analog of price series) its MO=0, in the second case we have a steadily losing TS with MO=Sp=10 points. Now it isn't difficult to determine the most common view of the functional, for this purpose we need to "shift" FR g(h+Sp) and limits of itegrations to the left by value of Sp . The resulting expression is easily simplified by replacing the variables and reduced to the form:

In other words, having a spread is equivalent to simply subtracting a piece equal in size to the spread from each transaction... Well, that's how it is in reality. I guess you could have just shoved the spread into the central integral. Although, it would be more accurate and rigorous (in terms of mathematical formalism).

That's it! We have a complete functional with which we can do whatever we want. It includes all basic elements of trading and in the presence of a particular TS (its Open Market position given analytically by g(h)) allows us to obtain an analytical expression for finding the optimal parameters of protective orders(SL & TP) and equity values f, as a function of the brokerage company commission and the financial instrument predictability parameter (to be introduced later).

Further progress towards the ideal trading system is possible only when we know the specific type of the TP. Without it, we can not go anywhere. Since there can be an infinite number of different TS, the task in this formulation does not look attractive. Therefore we will try to find the possibility of creating an optimal TS in the sense that such a TS maximizes the amount of points obtained from its operation per unit of time we are accustomed to use. And we will try to solve this task without setting some exclusive requirements for the nature of regularities present in price series. For the time being we will consider that they are present, and this fact distinguishes a real quote from a martingale.

In our reasoning we will start from the general type of FRs for the optimal TS. Then, having a desired distribution, we will rebuild the TS itself by its type and get conditions to solve the optimization problem for its parameters.

A little later...

 
Neutron писал(а) >>

Sergey, everything you are trying to define for yourself now boils down to the requirement to specify the conditions of a certain TC. So far, we do not need to do this within the adopted presentation format. I am trying to give general features of a design, which allows us to understand the logic of operation of all constituent elements of the MTS and their connection to each other. It doesn't matter how and what works in detail, it's the overall, big picture that counts. Besides, at such approach, as a rule, many artificial constructions introduced in system for the purpose of its simplification, at the end self-destruct without leaving a trace in final result and it would be incorrect to be buried in an infinite number of details at intermediate stages of construction.

Let's continue.

Let me remind you that we got an expression for the logarithm of profit of an arbitrary TS which is specified by the FR of its bribes and whose operation is determined by the deposit fraction f coming to one point, SL & TP of orders (in points):

In order to enter into the functionality of the member responsible for the commission of the FC, we need to find out how the introduction of the spread affects the view of the FR.

In the picture on the left we see the distribution of FRs for the TS working without spread and on the right - spread of 10 points. You can see that the distribution of the profit has not changed but shifted to the left along the abscissa by exactly ten points. And if in the first case for the TS working on martingale (integrated CB with MO=0 - analog of price series) its MO=0, in the second case we have a steadily losing TS with MO=Sp=10 points. Now it isn't difficult to determine the most common view of the functional, for this purpose we need to "shift" FR g(h+Sp) and limits of itegrations to the left by value of Sp . The resulting expression is easily simplified by replacing the variables and reduced to the form:

In other words, having a spread is equivalent to simply subtracting a piece equal in size to the spread from each transaction... Well, that's how it is in reality. I guess you could have just shoved the spread into the central integral. Although, it would be more accurate and rigorous (in terms of mathematical formalism).

That's it! We have a complete functional with which we can do whatever we want. It includes all basic elements of trading and in the presence of a particular TS (its Open Market position given analytically by g(h)) allows us to obtain an analytical expression for finding the optimal parameters of protective orders(SL & TP) and equity values f, as a function of the brokerage company commission and the financial instrument predictability parameter (to be introduced later).

Further progress towards the ideal trading system is possible only when we know the specific type of the TP. Without it, we can not go anywhere. Since there can be an infinite number of different TS, the task in this formulation does not look attractive. Therefore we will try to find the possibility of creating an optimal TS in the sense that such a TS maximizes the amount of points obtained from its operation per unit of time we are accustomed to use. And we will try to solve this task without setting some exclusive requirements for the nature of regularities present in price series. For the time being we will consider that they are present, and this fact distinguishes a real quote from a martingale.

In our reasoning we will start from the general type of FRs for the optimal TS. Then, having a desired distribution, we will rebuild the TS itself by its type and get conditions to solve the optimization problem for its parameters.

A little later...

I believe there is one point missed here: when TP is set, trades with h[i] > TP will fall in the distribution column with h[i] = TP. In other words, the trades where the profit will be larger than TP will be 0. The same reasoning can be naturally applied to SL - the trades where the loss will be smaller than SL will be 0. Therefore, the distribution will radically change. Although the formula is still correct.

By the way, one more point: the integral in this formula is wrong because both g[i] and h[i] can only be discrete variables and therefore this function cannot be integrated, it can only be summed.

I must say this topic is interesting and close to me. I hope for continuation of this discussion.

 
Neutron писал(а) >>

That's it! We have a complete functional with which we can do everything we want. It includes all basic elements of trading, and in the presence of a particular TS (its TP specified analytically by g(h)) allows us to obtain an analytical expression for finding the optimal parameters of protective orders(SL & TP) and equity values f, as a function of the commission of CP-Sp and the parameter "a" of the instrument (to be introduced later).

Further progress towards the ideal trading system is possible only when we know the specific type of the TP. Without it, we can not go anywhere. Since there can be an infinite number of different TS, the task in this formulation does not look attractive. Therefore we will try to find the possibility of creating an optimal TS in the sense that such a TS maximizes the amount of points obtained from its operation per unit of time we are accustomed to use. And we will try to solve this task without setting some exclusive requirements for the nature of regularities present in price series. For the time being we will consider that they are present, and this fact distinguishes a real quote from a martingale.

In our reasoning we will start from the general type of FRs for the optimal TS. Then, having a desired distribution, we will rebuild the TS itself by its type and get conditions to solve the optimization problem for its parameters.

A little later...

Neutron, you cannot correctly analyze influence and effectiveness of SL and TP by distribution of bribes. And consequently, switch to the distribution of bribes using SL and TP. For this you need distribution of profits/losses by trades at each moment beginning from the moment of entering and till the moment of exiting. I.e. at zero (entry) the result of all trades = minus spread with probability 1. Then after a minimum interval of time (the smaller is the more accurate modelling, but it depends on the value of SL and TP) build a distribution for all trades, etc. It is easier to run the tester and check without any distributions.

P.S. SL and TP not only trim the distribution, taking away their probabilities, but also deform the area between them. How they deform it and depends on how the profits/losses change over time from the entry point.

Reason: