Hi everyone,
I'm new to QuantConnect and I'm struggling to understand the "Holdings" metric. I've read the documentation, but I'm still confused about how it relates to my overall portfolio.
Here's my current situation:
- Equity: $2,850,050.74
- Holdings: $5,683,214.96
From what I understand, "Equity" refers to the total value of my portfolio, which includes both my cash balance and the market value of any assets I currently hold. "Holdings" refers to the market value of the assets I currently hold.
However, the numbers don't seem to add up. If my holdings are $5,683,214.96, shouldn't my equity be at least that amount? I feel like I'm missing something fundamental here.
Could someone please help clarify this for me? I'd really appreciate a simple explanation to help me get my head around these metrics.
Thanks in advance for your help!
Mia Alissi
Hello Alexi,
You're correct in your understanding that "Equity" refers to the total value of your portfolio, which includes both your cash balance and the market value of any assets you currently hold. "Holdings", on the other hand, refers to the market value of the assets you currently hold.
However, the discrepancy you're seeing might be due to the concept of leverage. In QuantConnect, you can trade on margin, meaning you can borrow money to buy securities, which might be why your holdings exceed your equity.
In other words, it's possible to have holdings that are worth more than your total equity because you're trading with borrowed money. This is common in trading and can amplify both gains and losses.
You can check your leverage by using
self.Portfolio.Leverage
in your code. This will give you the ratio of the total market value of assets (Holdings) to the total portfolio value (Equity).Here's an example of how you might use it:
I hope this helps clarify things for you. If you have any more questions, feel free to ask!
Sources:
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.
Alexi Trevett
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.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!