## What is the margin assumption on ALGOGENE?

#### Economy & Market

Hi team, I encounter many auto-closed positions while backtesting.
I believve it is related to margin call? May I know what is the margin assumption on ALGOGENE?
I want to implement my strategy to remove this kind of scenario.
https://algogene.com/community/post/12
Thanks Johnathan sharing the reference link.

Hi Sharwan, the margin level actually depends on the leverage you choose.
Here an example for your better understanding. eg,
• account leverage = 5
• initial capital = HK\$100,000
• stock A's current price is HK\$100 and lot size is 100.
When you buy 1 lot, you will need to have HK\$100*100/5 = HK\$2,000 as margin.
In other word, the maximum number of lot you can buy will be 100,000/2,000 = 50 lot. For such case, you account need to have HK\$100,000 to maintain the margin.
If stock price drops to HK\$99, your balance will become 100,000 + (\$99-\$100)*100*50 = HK\$95,000, which is less than the required maintainance margin (i.e. HK\$100,000). Thus, the system will auto-close some orders until the latest balance is able to cover the margin requirement.
Basically, margin = 1/leverage
For above example, your margin level will be 1/5 = 20%

Thanks Johnathan sharing the reference link.

Hi Sharwan, the margin level actually depends on the leverage you choose.
Here an example for your better understanding. eg,
• account leverage = 5
• initial capital = HK\$100,000
• stock A's current price is HK\$100 and lot size is 100.
When you buy 1 lot, you will need to have HK\$100*100/5 = HK\$2,000 as margin.
In other word, the maximum number of lot you can buy will be 100,000/2,000 = 50 lot. For such case, you account need to have HK\$100,000 to maintain the margin.
If stock price drops to HK\$99, your balance will become 100,000 + (\$99-\$100)*100*50 = HK\$95,000, which is less than the required maintainance margin (i.e. HK\$100,000). Thus, the system will auto-close some orders until the latest balance is able to cover the margin requirement.
Basically, margin = 1/leverage
For above example, your margin level will be 1/5 = 20%

Thank you for the explanation.
Original Posted by - b'Jonathan Tay': https://algogene.com/community/post/12
Thank you for the reference post.