Buying Stocks on Margin with cash = 0

Hello Community, I want to simulate the buying of stocks an margin, but with cash = 0.

The process should follow these steps:

Step 1: First trade
Initial equity (cash): 10.000 $
Buy stocks for 10.000 $
Cash left: 0 $

Step 2: Whait ...
... until the value of the stocks from First trade increases hopefully to (e.g.) 30.000 $

Step 3: Second trade
Because Cash = 0 $, a certain fraction of the value of the stocks (30.000 $) should be used as security ("shares credit") for a second buy. Of course this fraction has to take into account the requirements of the broker on "initial margin" and "maintainance margin".

By looking at the documentation I could not find a solution (or did not recognize that I was already looking at it ...) on how Step 3 could be accomplished. Opening new buy positions seems only be possible until the "Initial (Cash) Equity" in conjunction with the "Account Margin" is exhausted. E.g. with "Initial Equity" = 10.000 $ and "Account Margin" = 50 an amount of 20.000 $ was available for buying stocks.

Is it possible to let the "Account Margin" reference the time-varying stock value/equity (Step 3 above) and not the "Initial Equity" ?

Thank You very much for Your help !

This does not work that way as far as backtester works. If you use standard 50% margin, your buying power (cash + margin) is $20000 and in Step 1 cash does not go down to zero, you still have 50% cash. When you have open positions your buying power varies day by day with changing valuation of open positions.
Run backtest with "Detailed mode" to get all the numbers.

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.