I intend to calculate the daily return on my investment in forex. Assume a trader invests $\$$40 at a leverage of 100:1, so in total he is trading $\$$4000 worth of currency, and assume the position is open from Dec 4 to Dec 6. Also the trader has enough money to cover potential drawdowns.
In order to calculate the daily returns I would first need to virtually close and re-open the position using market prices (not shown here) and "realise" the daily profits/losses. Since in forex accounts a position can have a negative profit (as long as you have enough money in the account to cover the cost), this poses a problem when the trade balance is really close to zero and when the trader realises a big gain or loss the next day. To illustrate, I present a real life example below.
Date PnL BeginBalance EndBalance Return Dec4 -30 40 10 -75% Dec5 -10.01 10 -0.01 -100.1% Dec6 -9 -0.01 -9.01 900,000%
PnL is the daily profit or loss calculated using market data (i.e. its the unrealised PnL the trader would see at the end of a trading day),
BeginBalance is initially set at 40 which is the amount initially invested,
Notice how on Dec 6, the return is 900,000%. While it is an arithmetically correct calculation, this greatly skews my data and is wrong because the balance has dropped from -0.01 to -9.01 which is not a positive return. What can I do to overcome this?