Hello! I want to add a property to the SecurityHolding Class. This was easily achieved in VS, but now I've uploaded my algorithm to the browser IDE and have no idea how to edit the SecurityHolding Class here.
Thanks for the help.
Kyle
QUANTCONNECT COMMUNITY
Hello! I want to add a property to the SecurityHolding Class. This was easily achieved in VS, but now I've uploaded my algorithm to the browser IDE and have no idea how to edit the SecurityHolding Class here.
Thanks for the help.
Kyle
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.
Jared Broad
Hey Kgmanager! Welcome to QuantConnect. Sorry, you cannot edit the SecurityHolding class here.
If its a feature that will be useful for all users we can merge it into LEAN/Github.
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.
Kgmanager
Thanks for the reply Jared. I'm guessing there is another way to do what? I would like to have a variable for a holding that stores RiskPerShare ($/share). I can run a separate list parallel or recalculate the value every time I need it, but this seems really clumsy.
Rahul Chowdhury
Hey Kgmanager,
You can create a custom class SymbolData, which holds the relevant data for each symbol. In this class you can calculate and store the RiskPerShare. By creating a dictionary of SymbolData objects keyed by their corresponding symbol, we can easily access the data in our SymbolData class.
Here's an example:
Kgmanager
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!