Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
capital limits of a long / short portfolio in Quantopian Open challenge

I understand that the capital limit for Quantopian Open is 100K with a max leverage of 3. Suppose I have a long short portfolio and I short 1 million stocks and long 1.3 million stocks. Does that fall under the limits?

4 responses

I dont get how would that fall under the limit? Your beta would balance but not your capital used

When I plot capital_used it only shows up as difference between long and short portfolio. 300K in above case.

Your leverage is the absolute value of the market value of your positions divided by the equity in the account (gross leverage). You are thinking of your net leverage, or market exposure. Given the rules, 300K on 100K is the absolute ceiling on what you will be able to work with. Use context.account.leverage to track the gross leverage you are using.

This may be easiest to explain with an example, attached. It's an algo that starts with $100,000. Every day it rebalances, trying to maintain two positions, one long 100% of the portfolio value and one short 100%.

In shorthand, leverage is the long position plus the absolute value of the short position, divided by the portfolio's value. (100 + abs(-100))/100 = 2.

Disclaimer

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 Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian 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.