In the past, I have used the symbol "MAXR" to trade and it is working well, however, in the logs, it appears as symbol "MDA." Now, I am getting an error where it says that the asset price is $0. Should I use the "MDA" symbol in my code rather than the "MAXR"?
Thank you,
Noah
Derek Melchin
Hi Noah W,
Before completing its acquisition of DigitalGlobe, Maxar Technologies (MAXR) was MacDonald, Dettwiler and Associates (MDA). That is why we see multiple symbols in this situation. As the attached research notebook shows, we have data for MDA from 2017-10-06 to 2017-10-10 and for MAXR from 2017-10-11 to the present day. Fortunately, LEAN takes care of these transitions automatically during backtesting and trading.
The error saying the asset price is $0 can be resolved by ensuring that the data slice passed to OnData has pricing information for the symbol we are trading.
if not data.Bars.ContainsKey(self.sym): return
In regards to which symbol should be used between MAXR and MDA, it doesn’t actually make a difference when backtesting. See the attached backtest algorithm for an example of how we can trade these symbols without error by specifying just one of the symbols. By cloning the project and reviewing the Orders tab, it can be seen that LEAN recognizes the symbol change on 2017-10-10.
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.
Noah W
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!