 # Dangers of ramping up the risk: MARGIN VIOLATIONS Here is a scenario that I ran into the other day. AlgoLab customer A was happy with his 100% return on a \$50,000 investment after year 1, and was considering adding an additional \$50,000 to his account to increase the total investment to \$100,000. He wanted to achieve the same percentage return and average percentage drawdown as as he did with the original \$50,000.

From a couple of tests using the Performance Viewer, here is how we calculated the new risk value for the new \$100,000 amount that would generate similar percentage returns as previously:

Date range = 2009 to 2017 (The big spike in 2008 was removed)

Multisystem = DifferenceEngine

1. Here are the settings and results from the original \$50,000 of capital (note that these results are 'raw' hypothetical metrics from Performance Viewer and do not include my 40% "real-world" deduction):

capital = \$50,000

risk = .05

Ave rtn = 170%

Ave DD = 21%

2. This is the result of adding another \$50,000 to bring the account up to \$100,000 and setting the risk level to MATCH the same return percentage from above.

capital = \$100,000

risk = .25

ave rtn = 160%

ave dd = 21%

But after playing with the PV for a while, customer A had what seemed like a good idea. Instead of adding another \$50,000 in the second year, he wanted to just use the original \$50,000 but ramp up the risk high enough that he achieved the same profits as if he had increased the account to \$100,000. Essentially, this means he would be looking for a risk value on \$50,000 that would create over 320% profit (double the 160% profit). So here is what that PV run looked like:

capital = \$50,000

risk = .53

ave rtn = 328%

ave dd = 40%

Looks good so far doesn't it? It looks like we just created our \$100,000 returns using only \$50,000 of capital by simply jacking up the risk on our \$50,000. But there are two serious problems with this approach:

1. The maximum drawdown for this scenario is \$42,000! This could have wiped out his entire \$50,000 account (if it had occurred).

2. Customer A would have exceeded the Interactive Brokers minimum margin requirements about 10% of the time (see table below), and many of these trades would have been rejected, as well as trades forced to close early by IB.

When you trade using a high risk value, you do risk the chance that periodically, AlgoLab will accumulate enough open positions in your account, that your "P margin" field (on your dashboard) starts to come within 5% of your account value. When this happens, AlgoLab will automatically pause placing any new trades in your account. You will get an email from AlgoLab notifying you that your account has been paused. When your trades start to close by hitting their trailing stops, your "P margin" value will start to decrease, and AlgoLab will unpause your account and start to place new orders again.

There are risks by letting this happen too often. If you do exceed your minimum margin requirement, then IB will start to liquidate your account by closing your positions and canceling new orders. They will also issue a warning to you.

So how do you know when you are trading at a risk level where there is a risk of margin violation? As it turns out, the risk of exceeding the minimum margin level is the same for any amount of capital.

Following is a table comparing various risk levels using any capital amount and the resulting approximate % of days that the account was at or over the minimum margin requirement level set by Interactive Brokers. Note that this table is generated from a 9 year period that contained many very volatile periods where there was a chance that multiple AlgoLab positions would have been opened all at the same time which is what generates a margin violation issue. In many cases, prior to reaching full violation, AlgoLab's automatic trade pause will circumvent the violation.

risk = % of time in violation

0.2 = 0.00%

0.24 = 0.08%

0.28 = 0.25%

0.32 = 0.70%

0.36 = 1.60%

0.4 = 2.90%

0.45 = 4.80%

0.5 = 6.80%

0.6 = 12.60%

0.75 = 21.60%

1 = 36.00%