Back

Margin call on long position with no leverage

Hi guys.

Why do I get a margin call on a long position with no leverage. I should be able to keep that position to whatever price it goes down to, before(and if) it recovers. Am I missing something?

Attached sample algo which goes long XIV with all the portfolio cash, and then gets a margin call when the price plunges.

Update Backtest








By default, equities have leverage set to 2.
Even if you do not use borrowed money, our margin call model will issue margin call warnings and margin calls when conditions are met.

Since you are not using leverage, you can set it to unity:

Securities["XIV"].SetLeverage(1m);

and margin call orders will not be issued. 

0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Thanks.

0

Is this also valid?  This sets maintenance model to 0.

            foreach (string symbol in symbols)
            {
                AddSecurity(SecurityType.Equity, symbol, Resolution.Minute);
                //Securities[symbol].SlippageModel = new ConstantSlippageModel(0.001m);
                //Securities[symbol].SetLeverage(1m); // we are not using leverage
                SecurityMarginModel model = new SecurityMarginModel(1,0);
                Securities[symbol].MarginModel = model;
            }

0

Update Backtest





0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Loading...

This discussion is closed