Is there any build in method to get Average Position Open Price?
QUANTCONNECT COMMUNITY
Is there any build in method to get Average Position Open Price?
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.
Link Liang
Hi Konstantin,
Yes, we offer that as a property of our SecurityHolding object, which provides easy access to a lot of holding properties. For example, if you want to check out your average position open price for “IBM”, it is simply self.Portfolio[“IBM”].AveragePrice . For more information you could check out here
and here. Here is a simple example logging average position open price everyday.
Hope it helps!
Mikko M
Why is AveragePrice not documented on the porfolio documentation?
In many cases it seems that in many cases in order to understand how your quite complicated framework works (and I say this with 20 years of industry experience) you have to go to github and browse the repository code.
https://www.quantconnect.com/docs/algorithm-reference/securities-and-portfolio#Securities-and-Portfolio
Alexandre Catarino
Hi Mikko M ,
In the docs, under Securities and Portfolio (the link you mentioned), we can click the words in red to open a hidden frame with all the class members and methods.
Konstantin P.
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!