#### Topic: Maximizing the initial position (safely)

I'm studying the spreadsheet of stats that I keep for each bot that gets created by FSB. I am toying with a new idea today that I wanted to kick around and see if someone can shoot down my logic.

What I mean is -- I am admittedly not the best math person. What I'm trying to find here is the MAXIMUM percentage of equity that can be spent on the initial position, while at the same time maintaining what I perceive to be a safe drawdown level.

The "safe drawdown" level is defined as the max drawdown I want to experience from the bot, and assuming the bot is performing within spec. The spec will be defined as the max equity drawdown that was experienced during the test. Therefore, if the bot should exceed this level in forward testing or live trading, I would know that it has become out-of-spec.

Starting from my spreadsheet, I look at the stats generated from the bot. From these figures, I have come up with this formula. Please see if you can shoot this down as a "bad idea" and tell me why. Am I wrong in my math here?

Stats that I know from the test:
initial position: 3% equity
max equity DD% during test: 2.87%

If we know that 3% initial position equated to 2.87% max DD equity,
then would you also agree that 6% initial position would equate to 5.74% max DD equity?
(NOTE: if the above statement is wrong, please let me know!)

Therefore, in order to maximize the performance while keeping equity DD within my target threshold (lets say 20%), then I could apply this formula:

``````  3% initial equity               x% target initial equity
---------------------     =     -----------------------------
2.87% max DD                    20% target max DD

2.87x = 3 * 20

x = 20.91%  --> optimal initial position equity``````

It should also be noted that (I believe) FSB/FST would round-down the broker lots, so that should theoretically keep my DD within the target spec.

Assuming this theory is all correct ... I know that DD could exceed the target level. But doing so would violate the spec of the original bot and be an indication that it needs more work (or stopped working as tested, for example).

#### Re: Maximizing the initial position (safely)

I'm not notable for my math skills either, hehee, but it seems fine. You are trying to achieve proper position opening amount, right? You should be able to test it with FSB if your calcs hold water, entry amount should be the calculated percent of account and if results come through and are correlated to initial tests, then it's sorted.

#### Re: Maximizing the initial position (safely)

Is the initial equity and max DD a linear relationship? I don't know, I've never researched this.
I would run a few backtests with different initial equity values to verify, with easy amounts like 5, 10, 15, 20, 50, and 99 or 100 (%).

#### Re: Maximizing the initial position (safely)

Is the initial equity and max DD a linear relationship?

Drawdown depends on the number consecutive losses. Position amount has nothing to do with this.

Probably there is such linear relationship between them only for a single strategy where the number and distribution of the winning and the loosing trades are fixed.

#### Re: Maximizing the initial position (safely)

I do believe that it may be linear.

That formula would also assume only 1 position taken, with no additional legs added. If I can prove that the relationship is linear and the formula essentially "works", then I can also adjust the formula to account for strategies that utilize additional trading leg percentages.

If all of this works, you could take such a formula and incorporate it into a limitation for the Generator/Optimizer, such that instead of the user inputting a static amount of equity to trade with... they could simply input the risk limit amount. This would seem like a better way to optimize. After all, it seems kindof arbitrary to just set the initial trade to a fixed lot or equity percentage.

#### Re: Maximizing the initial position (safely)

Ok I ran a test on this particular bot, which I think proves the linear relationship I was looking for. Actually there are several items that have a linear relationship. Take a look at this grid: I've highlighted the columns where you can see the relationship. There is some fudge factor, probably due to rounding of the lots. #### Re: Maximizing the initial position (safely)

SpiderMan wrote:

Consecutive losses is not a figure that FSB provides (that I'm aware). I don't think I am too concerned about this because personally I find it irrelevant in a bot. I'm more interested in the combination of other metrics such as Executed Orders (too many is a bad sign IMO).  I can tell you that regardless of the initial equity position, the consecutive losses stay the same (ie unaffected)

Separately, I went looking at the Strategy Properties window to see how how to adjust the formula for strategies that use the feature of adding additional trading lots/equity%. (Note: in the grid I posted above, this example did NOT add additional lots beyond the initial position)

In order to properly calculate the max position, I think you need to know the max equity% that would ever be at play. This is controlled by the option in that window "Max # of open lots". And that leads me to make a wishlist suggestion: there should be an alternate option "Max % of equity to risk"

The way it is listed now "max # of open lots" is a static figure that does not change as the account grows during the test. However, the lower portion that is equity%-based does grow dynamically (presumably). Therefore, the limit should also be dynamic.

To effectively use the formula I discussed in this post, you need to know the max (ever) equity% that would be at risk over the course of the strategy. I suppose as a workaround we could convert the "max # of open lots" to its static equity% to get that figure, but it would be better if it were a dynamic value.

PS: just for fun, I ran this (raw) bot using the formula with my risk limit set to 20%. Formula says 20.91% of equity for initial position. On \$300 account here is the result:
test gain: 110.31%
max bal DD: \$47.61
max equity DD: \$61.94
max equity DD%: 17.43%