Profile Picture

How is CurrentEquity calculated for short stock positions?

Posted By fxgirl 2 Years Ago

How is CurrentEquity calculated for short stock positions?

Message
Posted Tuesday May 26 2015
Hi there,

I'm new to the world of stocks and trying out RightEdge I stumbled over this issue which I just can't get my head around.

For any long-positions I completely understand that when for example buying 1000 units of a stock at 30.00 my used equity if margin is set to 1:1 for that long-trade is now 30000 USD. Now if the price drops to 29.00 it would be 29000 USD. And this works as expected in RE.

But with short positions (Short Margin for Symbol set to 0, but I also tried 100) I always get slightly different values when calling SystemData.CurrentEquity or SystemData.CurrentValueShort.

For example when I sell 1000 units of a stock at 30.00 my used equity is not 30000 USD but something different like 28500 USD.

I just can't figure out why this is, probably it's something about stocks I don't understand but I also couldn't find anything using google so far.

Hope for your help guys!

xoxo

FXGirl
Posted Tuesday May 26 2015
ah I found the reason. RightEdge does calculate P&L of the running trade into the equity value of long/short positions.

But it looks like it does not reevaluate the margin used at the close? So for example a long position of 1000 units going from 30.00 to 31.00 would require 1000$ more margin in the real world with 1:1 margin right?

Does RightEdge not consider this? If not why not?
Posted Tuesday May 26 2015
Hi FXGirl,

If the Short Margin is set to 0, it defaults to 100%.

The current equity takes into account the unrealized profit or loss of open positions, so it fluctuates with the current price.  That's probably why you're seeing slightly different values.  You should see similar changes (though in the opposite direction) for long positions.

Does this help?

Thanks,
Daniel
Posted Tuesday May 26 2015
fxgirl (5/26/2015)
But it looks like it does not reevaluate the margin used at the close? So for example a long position of 1000 units going from 30.00 to 31.00 would require 1000$ more margin in the real world with 1:1 margin right?

Does RightEdge not consider this? If not why not?


No, RightEdge doesn't consider this.  Mostly because it would be complex to do so (for example there can be different margin requirements for day trading and for overnight positions), and I think that it will be rare for a successful system to be running close to the limit of available margin.  Related to this, RightEdge also doesn't simulate margin calls- because it's probably not very valuable to accurately simulate the failure state of a system.

Thanks,
Daniel
Posted Tuesday May 26 2015
Thanks for your reply Daniel!

But doesn't this give you a positive bias in some situations, especially with for example trend following systems that hold trades for months?

Let's say your system buys 1000 units at 10.00 and price moves up to 30.00, instead of needing 10000 USD you would need 30000 USD now to hold the position, and have 20000 USD less margin. At the same time though RE does add the profits of 20000 USD to the available margin. So in the meantime your system might buy more than it could in the real world...

I agree with you that using proper risk management you shouldn't even come close but I'm wondering why at the close when the P&L for the position is updated, the margin requirement is not. Doesn't sound too complicated on that basis...

Also do I get it right that the Buying Power is calculated by using the net balance which already has the P&L of an open trade included and then it substracts the initial margin of the position when it was opened and adds/substracts the P&L again:

BuyingPower = (Gross Balance + open trade P&L) - (Initial Margin of Trade + open trade P&L)?

Does that make sense? What's the idea behind it? I'd expect this to be (if we don't recalculate the margin at the close):

BuyingPower = (Gross Balance + open trade P&L) - (Initial Margin of Trade)

xoxo

FxGirl

Edited: Tuesday May 26 2015 by fxgirl
Posted Wednesday May 27 2015
Also do I get it right that the Buying Power is calculated by using the net balance which already has the P&L of an open trade included and then it substracts the initial margin of the position when it was opened and adds/substracts the P&L again


No, the buying power in RightEdge is the amount of cash in your account, also referred to as the account balance or the current capital.  Your buying power decreases when you open a position.  Unless there is trading activity, the buying power does not change, regardless of what happens to the open P&L.  When you close a position, the buying power will go back up, unless the position has lost more than the entry cost / margin requirement of the position.

So from RightEdge's point of view, the margin isn't an amount of cash that you need to keep in your account while the position is open.  The margin leaves your account when you open a position, and is added back to your account when you close the position, together with any profit or loss.  So:

Buying Power = Gross Balance

Current Equity = Initial Margin of Trade + Open Trade P&L

Total Account Value = Buying Power + Current Equity

Does that help clarify things?

Thanks,
Daniel
Posted Thursday May 28 2015
Hi Daniel,

thanks, this helps yes!
I understand now...

FxGirl


Similar Topics


Reading This Topic


2005-2017 © RightEdge Systems