Trading a portfolio of currency pairs - page 7

 
EvgeTrofi:
Tell me, in your indicator do you buy and sell symbols in the same volumes? Net pips?
Yes. These are net points. The balance curve can be plotted in averaged points (parameter Mid.Points= true).
 
kharko:

I've read all your posts. You've already come up with a great idea! All that's left to do is write an advisor. What else do you want from the public? A money management system?

Yes, please - to straighten the equity line, enter the market in the drawdowns and exit at the tops!

 
The value between 0% and 100% is interpolated and remains unchanged on the way to SL. And instead of 100% only 30% can be used e.g......
 

kharko:

Reshetov's formula for calculating position volume for one instrument:

Position volume = Risk * Equity / (Number of instruments * Lot value) - Total volume of open positions

Where 0 < Risk <= 1 - coefficient.

If the position volume is positive and exceeds the minimum allowed volume, we add a new position of the corresponding volume. If the position volume is negative, we close the position of the corresponding volume.

This formula allocates equal parts of Funds for each instrument. I think we should rewrite the formula in the following way:

Position Volume = Risk * (Equity / Number of Instruments + Profit) / Lot Value - Total Volume of Open Positions

Where, Profit - profit from an instrument.

Thus, new positions will be added to the instruments with positions opened by the trend and vice versa.

Thinking is one thing, and mathematical proof is quite another.

1. In your formula, the profit is counted twice, i.e., the first time as a part of equity, and the second time, separately. Such double-entry bookkeeping can have bad consequences, i.e. it can lead to the fact that there is simply not enough margin for profitable instruments and additional dancing around is required to avoid an overabundance of margin requirements.

2) While studying various MM based on topping up based on actual previous profit, I came to the conclusion that they are not effective because the trends are not linear, but refer to oscillatory movements, i.e. impulses and corrections replacing each other. For this reason MMs bluntly adding on the basis of previous profit have a lot of disadvantages:

- They fail in sideways movements

- They go down in trend corrections

- After correction in the beginning of a trend they reduce the volume of lots, and as a result the system enters the trend with a smaller volume (i.e. it is underbought), and only after the initial trend impulse is over, begin to deposit the previous profit. That is, practically by the time the trend movement has weakened (at the extremum) and is preparing to correction.

- Since the maximum volume of open positions is reached before trend corrections (and even worse, before trend reversals), the subsequent loss during these corrections is also maximal.

And so on and so forth.

For this reason, I began to add to the denominator of my formula the value of GER (indicator iStdDev()) of the instrument for which the volume in lots is calculated. This has improved the results both in sideways and trend reversals but worsened them in trend reversals.

 
Reshetov:

Thinking is one thing, mathematically justifying is quite another.

1. In your formula, the profit is counted twice, i.e. the first time as part of the equity, and the second time separately. Such double-entry bookkeeping can have bad consequences, i.e. it can lead to the fact that there is simply not enough margin for profitable instruments and additional dancing around is required to avoid an overabundance of margin requirements.

2) While studying various MM based on topping up based on actual previous profit, I came to the conclusion that they are not effective because the trends are not linear, but refer to oscillatory movements, i.e. impulses and corrections replacing each other. For this reason MMs bluntly adding on the basis of previous profit have a lot of disadvantages:

- They fail in sideways movements

- They go down in trend corrections

- After correction in the beginning of a trend they reduce the volume of lots, and as a result the system enters the trend with a smaller volume (i.e. it is underbought), and only after the initial trend impulse is over, begin to deposit the previous profit. That is, practically by the time the trend movement has weakened (at the extremum) and is preparing to correction.

- Since the maximum volume of open positions is reached before trend corrections (and even worse, before trend reversals), the subsequent loss during these corrections is also maximal.

And so on and so forth.

For this reason, I have added to the denominator of my formula the value of SPE (indicator iStdDev()) of the symbol for which the volume in lots is calculated. It improved the results both in sideways and trend reversals but worsened them in trend reversals.

Spb for the informative reply.

1. I thought about one thing but wrote something else in the formula. :)

To trade on one instrument of the portfolio a part of the Balance is allocated.

Position volume = Risk * (Balance / Number of instruments + Profit) / Lot value - Total volume of open positions

Where, Profit - profit from an instrument, Balance - funds that are used for the risk (Balance, part of Balance, percentage of Balance).

Balance / amount of instruments + Profit is the Equity for the specific instrument. The total position volume for each instrument will change according to the sign of the summand Profit.

Once again I want to emphasize the importance of the leverage size. The leverage should be between 1:10 and 1:50.

2. In my variant, I proposed to simultaneously open additional positions for all instruments in the portfolio at the levels of the indicator, i.e. to average positions of the portfolio. We specify the maximum grid width or the maximum correction in points, the grid spacing or the distance between the indicator levels in points, the value of the risked funds. There is all data to calculate the position volume for each instrument in the portfolio.

This option is dangerous as there is a possibility of exceeding the maximum correction set point.

 
kharko:

Balance / Number of Instruments + Profit is the Equity for the particular instrument.

This is more correct, as it really reflects the current state of the instrument. The only thing to clarify, in order to avoid terminological misunderstandings, is that the Balance is the initial deposit + total Profit of all closed positions of all instruments, while the Profit is the current Profit of all open positions of the instrument, for which the calculations are performed.

At least there is no accounting inaccuracy in the form of double profit calculation. I.e. there shouldn't be an overrun of margin requirements and the margin level is fixed at one level.

Thank you! We will try it.

 
Reshetov:

This is more correct, because it really reflects the current state of the instrument. The balance is the initial deposit + total profit on all closed positions of all instruments, and the profit is the current profit on all open positions of the instrument, for which the calculations are carried out, in order to avoid terminological misunderstandings.

At least, there is no accounting inaccuracy in the form of double profit calculation.

Thank you! We will give it a try.


In parentheses above, I specified what the term "Balance" means.

Balance is the current state of the balance sheet.

Part of the Balance is the constant value of the funds which we allocate to the trade.

Percentage of Balance - the percentage of the current balance.

 
kharko:

In the brackets above, I have clarified what the term Balance means.

Balance is the current state of the balance sheet.

The Balance part is the constant value of the funds we allocate to the trade.

Percentage of Balance - the percentage of the current balance.

In principle, it is clear that the Balance is the value of AccountBalance(). It's just that I always try to formulate the problem as precisely as possible, because the correct formulation is almost the solution to the problem. Especially since we're talking about a multicurrency system and there's nothing that can be solved by a cavalry charge. You need the exact knowledge of where and from where funds are flowing and what role they play. This way, if something goes wrong in practice, as it is supposed in theory, you will be able to find out the reasons.

So far, according to preliminary tests, your rationalisation proposal has not improved anything so far. I.e. EAs with previous formulas are more stable compared to modified ones. The reason is precisely because trends are non-linear, and therefore lot refills for the most "successful" instruments occur with a significant lag, and refills occur after a pullback. Therefore, we have not seen any rationalization perspectives yet. Modified EAs behave worse than previously unmodified ones at flat prices, i.e. they trade with no response at all: they buy expensive and sell for mere money.

 
Reshetov:

In principle, it is clear that the balance is the value of AccountBalance(). It's just that I always try to formulate the problem as precisely as possible, because the correct formulation is almost the solution. Especially since we're talking about a multicurrency system and there's nothing that can be solved by a cavalry charge. You need the exact knowledge of where and from where funds are flowing and what role they play. Thus, if something goes wrong in practice, as it is supposed to do in theory, it will be possible to find out the reasons.

At the moment, according to preliminary tests, your rationalization proposal has not improved anything so far. I.e. EAs with previous formulas are more stable compared to modified ones. The reason is precisely because trends are non-linear, and therefore lot refills for the most "successful" instruments occur with a significant lag, and refills occur after a pullback. Therefore, we have not seen any rationalization perspectives yet. Modified EAs behave worse than previously unmodified ones at flat prices, i.e. they trade with no response at all: they buy expensive and sell for a pittance.

What leverage size do you use?

How do you select the trading direction for each instrument of the portfolio?

I have given 3 ways of using the term Balance. If you take a constant value as the Balance, there should in principle be a result.

 

Reshetov:

So far, according to preliminary tests, your rationalisation proposal has not improved anything so far. I.e. EAs with previous formulas are more stable compared to modified ones. The reason is precisely because trends are non-linear, and therefore lot refills for the most "successful" instruments occur with a significant lag, and refills occur after a pullback. Therefore, we have not seen any rationalization prospects yet.

The reason is that the formula for calculating the position volume for each instrument in the portfolio does not take into account the impact of the spread. Therefore it needs to be rewritten.

Position volume = Risk * (Balance / Number of instruments + Profit + Spread) / Lot value - Total volume of open positions

Where Profit - profit from an instrument,

Balance - funds at risk (Balance, part of the Balance, percentage of the Balance),

Spread value = Total volume of open positions * Spread * Point value.

Thus, we artificially equalize the chances to open/close positions.

Reason: