Hi, I have created my own datalayer to access scandinavian stock exchanges.
Here's my issue right now, the symbol mapping don't work as expected.
- As an example of a mapping file: recsi.ose.csv. It has this content:
20200220,rec.ose
20201129,rec.ose
20501231,recsi.ose
- Which means at the date of 2020-11-30 it changed from REC -> RECSI
- This code:
self.SetStartDate(2021, 2, 9)
self.SetEndDate(2021, 2, 10)
self.AddEquity("RECSI.OSE", Resolution.Tick, 'nor')
self.AddEquity("RECSI.OSE", Resolution.Minute, 'nor')
self.Consolidate("RECSI.OSE", Resolution.Hour, self.HourBarHandler) ALG.historyHour = self.History(ticker, timedelta(20), Resolution.Hour)
ALG.historyMinute = self.History(ticker, timedelta(20), Resolution.Minute)
ALG.historyTick = self.History(ticker, timedelta(20), Resolution.Tick)When i Export these three PANDAS to excel, it shows:
- https://1drv.ms/u/s!ApGpUzcVR1sv6BUywgmMnw_4DjA4?e=cijB6A
It resolves correctly, as the data it contains is from "RECSI.OSE", but the ticker in the dataset is the old ticker (RSI.OSE)
- So my question is why does this happen?
In quantbook it all works fine.
Any idea?
Frode Hansen
Ok, nevermind. It's the Symbol.ID, which will always be unique, even thou tickers might overlap.
self.fb = self.AddEquity("fb", Resolution.Daily) self.fb1 = self.AddEquity("fb.1", Resolution.Daily) self.Debug("FB : " + str(self.fb.Symbol.ID) + " " + self.fb.Symbol.Value) self.Debug("FB.1: " + str(self.fb1.Symbol.ID) + " " + self.fb1.Symbol.Value)
Frode Hansen
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!