Subsystem "Asset Management" - page 5

 
TheXpert >> :

That was an oversight. You just need to select the percentage of the deposit at which the maximum acceptable results are obtained.

This percentage should be chosen on the basis of known parameters of the system without MM. It is not like I want to win a Nobel Prize. At least this simple variant.

It's not an oversight.


Let's say that if you compare your approach with mine, you are comparing a greedy algorithm with more accurate optimization heuristics.

Putting the above-mentioned parameters into the target function will increase the profit.


It will be interesting to see your model in terms of linear programming.

 
TheXpert писал(а) >>

That was an overreaction. All you need to do is to find the percentage of the deposit that gives the best results.

You should choose it based on the known parameters of the system when it works without MM. It is not like I want to win a Nobel Prize. At least in this simple variant.

And let's try to implement an optimal MM scheme.

I once saw something similar in Ezhov's derivation of functional for NS.

So, we have a relative price increment x=dS/S for the time of holding an open position and the relative equity increment dK/K=Lever*x where Lever is the leverage.

Then the equity increment in the next step: K[1]=K[0]*(1+p*|x|*Lever), where 1/2+p is the probability of the price direction correctly predicted by TS. The profit after time t will be K[t]/K[0]=(1+p*|x|*Lever)^t. Logarithmizing the right and left parts of the identity and dividing all takes into "good" and "bad", we get the average profit (brackets <> denote the procedure of averaging the value over a certain big sample)

<ln(K[t]/K[0])>=t*<(1/2+p)*ln(1+|x|*Lever)+(1/2-p)*ln(1-|x|*Lever)>

Actually, the right-hand side of this expression is the functional that we need to maximise with respect to the leverage value of Lever .Let's differentiate this expression by Lever and equate it to zero to find its optimal value as a function of the average value of the percentage of correct predictions p and x=dS/S(essentially the volatility of bribes).

Lever=2p/<|x|> or taking into account the shape of the distribution density function (e.g. thick tails in the bribe distribution increase risks):

Lever=2p/<|x|>, where a=<|x|>^2/<x^2> =0.8 for the Gaussian distribution and 0.25 for the exponential one (which is more probable for Forex).

The resulting value of leverage, will give the most maximum return for a particular TS of all possible. Any increase or decrease of the Lever will change the rate of profit to the negative side. This is the optimal MM!

For example, for an MT with the percentage of correctly guessed digits 50+1% and dS=50 points (average size of the take per transaction) we get the following graph for the average profit rate K[i]/K[i-1] per one transaction as a function of the trading leverage:

I.e. optimal leverage is 4 if we are in the market 51 times out of 100 entries. For a larger percentage of correctly guessed entries, the optimal Lever will be larger.

All this is true for one instrument. If we want to apply the result obtained for the multi-currency portfolio, we need to have the trading history for each of the instruments separately and select the degree of its capitalization inversely proportional to its returns in money terms. It will allow to even out the influence of each individual instrument on the portfolio and to smooth the individual drawdowns of each of them.

Let me remind you that portfolio risk decreases as the root of the number of instruments in it, therefore the capitalization (Lever) of each instrument can be increased proportionally (relative to the optimal one), while the total risk remains the same. This will increase the return of the portfolio as a whole with the same deposit compared to working with one instrument.

 

to TheXpert

Скажем так, если сравнить Ваш подход с моим, получится сравнение жадного алгоритма с более точной эвристикой при оптимизации. Вынос вышеупомянутых параметров в целевую функцию позволит увеличить прибыль.

From what I understand, you actually want to get an empirical "profit formula", "stuffing" the whole variety of dependencies into the target function. Or you can get it by reasoning this way. In the end, just substitute the input values and get a sort of "optimal" solution. This is also not bad, but the approaches are still significantly different at the conceptual level, and the existence of such a formula is still questionable for me.

It will be interesting to see your model in terms of linear programming.

Yes, I think I'll post it soon. But I doubt, that it will be right all at once. So, don't scold me, I'm just learning all sorts of scientific wisdom and tricks. :о)


to Neutron

Interesting information, I take time to ponder, and I have to hurry for the business :o(

 
Neutron >> :

All this is true for a single instrument. In order to generalize the result obtained for a multi-currency portfolio, one should have trading history for each instrument separately and choose the degree of its capitalization inversely proportional to its return in money equivalent. It will allow to even out the influence of each individual instrument on the portfolio and to smooth the individual drawdowns of each of them.

There is also a portfolio analyser :) .

So we can find the optimal degree of capitalization for the portfolio. And then it is simply distributed proportionally between the pairs so that the total degree of capitalization is obtained for the portfolio.

It is not an accurate solution, but it will work, imho.

 
grasn >> :

to TheXpert

From what I understand, you actually want to get an empirical "profit formula" by "cramming" all sorts of dependencies into the target function. Or you can get it by reasoning this way. In the end, just substitute the input values and get a sort of "optimal" solution. It's not bad either, but approaches all the same are essentially different on conceptual level, and presence of such formula is still questionable for me.

No :)

But to continue the comparison, a greedy algorithm takes half an hour to write, while exact heuristics... It's a matter of luck before your brain boils.

 

And what does the esteemed community think of Ralph Vince's book "A New Approach to Money Management. Asset Allocation Structure between Different Investment Instruments"?

 

Since the notion of a portfolio is not necessarily linked to different currency pairs, I

I have approached portfolio analysis as follows.

1. I selected N trading strategies and prepared experts for M currencies.

2) Optimized them on the history to maximize the yield with drawdown percentage <50%

3. Inserted into each EA a code, which was saved every day in the strategy tester into a csv file:

OrdersTotal(), LastBallance,AccountBalance(),AccountEquity()

where LastBallance is the maximum balance achieved by the expert at the time the data was saved.

4. As the result I got N*M files

5. Loaded it all into Excel, calculated profits (losses) for each day

6. Calculated maximal value of relative profit and loss for each strategy in % for the whole testing period

7. Calculated the maximum relative income and loss for a portfolio of several strategies as a % for the whole period of testing

At this stage I built the portfolio myself.

I acted as follows:

- took a strategy

- find the days with the biggest drawdown

- searched which strategy had at least a small profit on this day

- then I added up data of two strategies for each day

- added the next strategy


As the result I got evidence that portfolio trading can decrease total drawdown and smooth the yield curve

(many people think for some reason that portfolio trading is obligatory to increase profitability).

In the future I plan to write a program (most likely a script) that will automatically pick a portfolio

Without using Excel.




 
grasn писал(а) >>

to anubis

Glad I could help. Only I didn't have time to clarify one more peculiarity. Increasing the order of the model leads, as a rule, to an increase in the error. But taking into account how these models predict, as well as the impossibility to identify them clearly at price series, we cannot be bothered with such details.

I will look into it! I periodically encounter performance issues when using high orders, I'm afraid to think what will happen next -)

I'm not too worried about accuracy, it's too early.

As for the task - join me and it will become clear at once.

It would be very interesting, I had similar thoughts, but so far I have not enough experience, I am messing around with algorithms....

ps: What's a restricted section? Can ordinary mortals get in there? =)

 
thecore писал(а) >>

...many people for some reason think that portfolio trading is bound to increase returns.

Isn't it?

Suppose, for clarity, we have a profitable TS and several non-correlated instruments, the returns of which are equal or equalized by different capitalization. Let us consider the case of a single instrument. The income curve (RC) can be represented as a straight line drawn through it using the method of least squares. Then the income of TC is proportional to the slope tangent of the straight line and the risks are proportional to the dimensionless value equal to the ratio of the standard deviation of QD points from this straight line to the amount of capital invested in this instrument. Suppose, according to the chosen MM, the risk level of R% is acceptable for us.

Now divide our capital that traded on one instrument into n equal parts by the number of all instruments. Then the return of each instrument will decrease n times, risks will remain the same and not correlated with each other. For such a portfolio, the total return will be additive and equal to the return on capitalization of a single position, and the standard deviations of QD for each instrument will add up as random variables, and in first approximation equal to the square root of the sum of their squares, which for aggregate risk will give the estimate R%/SQRT(n) (see above definition of risk). But, according to MM, we can assume risks of at least R%, which allows us to increase the capitalisation of the portfolio over the original SQRT(n) times! The return, in its turn, is proportional to the capitalization of the position, therefore it can be stated that by dividing the capital between n non-correlated instruments we increase the return on the aggregate position as the root of n times without increasing the risk.

Which was indeed required to prove. Of course, it is also true that by not increasing the capitalization of the portfolio we will decrease its risk and one can formally argue that portfolio trading does not have to increase the return... but these are essentially two sides of the same coin.

Above you can see the growth of equity of a portfolio consisting of 100 and 10 instruments (blue line) and one of the instruments it contains (red). As the yield is equal, one can see that risks decrease as the number of instruments grows.

 
It is more logical to increase capitalisation -))) as they say why should money lie idle? Let it work, too bad the number of instruments (currency pairs) is limited...
Reason: