I'm not sure whether I should post here or speak to my broker or how to troubleshoot these sorts of issues...
I want to do some work on ISF, a London Stock Exchange ETF. My broker is IBKR. Within IBKR I can bring up a chart of ISF.
If I go to data manager, new dataset and add ISF. Then click on update dataset I get 200: no security definition has been found for ISF. Do I need to add something to ISF to point it to the London Stock Exchange?
I want to do some work on ISF, a London Stock Exchange ETF. My broker is IBKR. Within IBKR I can bring up a chart of ISF.
If I go to data manager, new dataset and add ISF. Then click on update dataset I get 200: no security definition has been found for ISF. Do I need to add something to ISF to point it to the London Stock Exchange?
Rename
thanks @eugene,
I'm not using any mapping, just the ticker that IB accepts in its interface.
I also noticed a further error in the log:
Timestamp Source Message Exception
"05/01/2023 07:20:42:654" "MorningStar" "Error getting History (ISF): Value cannot be null. (Parameter 'collection')" "Value cannot be null. (Parameter 'collection')"
I'm not using any mapping, just the ticker that IB accepts in its interface.
I also noticed a further error in the log:
Timestamp Source Message Exception
"05/01/2023 07:20:42:654" "MorningStar" "Error getting History (ISF): Value cannot be null. (Parameter 'collection')" "Value cannot be null. (Parameter 'collection')"
QUOTE:
I'm not using any mapping, just the ticker that IB accepts in its interface.
You may have to specify the exchange for this symbol as instructed in the WL8 Help > Extensions > Interactive Brokers.
Example German Stocks
Volkswagen: VOW3;STK;EUR;IBIS - IBIS or SMART
QUOTE:
I also noticed a further error in the log:
It's kind of expected: every data provider has its symbology. Morningstar, Quotemedia, Stooq, whatever - they all may require you to append a suffix or prefix. Symbol can be found on their website.
thanks @eugene
QUOTE:
they all may require you to append a suffix or prefix. Symbol can be found on their website.
As a followup, the resulting symbol can turn up different so you'd have to specify it using a feature introduced in B23:
"Symbol Mappings for Historical Data Providers"
https://www.youtube.com/watch?v=WD0OrKW8uTM&t=186s
Yes that worked ISF;STK;GBP;SMART in the end. Thanks for your help.
Glad to see you're up and running again!
The explicit symbol method you used ISF;STK;GBP;SMART is somewhat of an ad-hoc way to get a new symbol. If you have a large list of symbols that need this treatment, do this:
1. create a DataSet of the symbols and run this script on the DataSet (Portfolio Backtest):
2. Click File > Open Wealth-Lab User Data Folder and find the IBContracts.txt file.
3. Copy the result of the Debug log to use later...
4. Close WealthLab
5. Copy and paste the lines from the top of the debug log to the end of IBContracts.txt.
6. If there are conflicts with symbols in other markets, they'll be shown at the bottom of the debug log. You need to either rename your symbol or remove the conflicting record before adding the new one.
You'll be able to just use your LSE symbols now and IB will find them!
1. create a DataSet of the symbols and run this script on the DataSet (Portfolio Backtest):
CODE:
using WealthLab.Backtest; using System; using WealthLab.Core; using System.IO; using System.Collections.Generic; namespace WealthScript8 { public class MyStrategy : UserStrategyBase { public override void Initialize(BarHistory bars) { if (_contractSymbols.Contains(bars.Symbol)) { if (bars.Symbol.Length > 0) { _conflicts.Add(bars.Symbol); } } else WriteToDebugLog(String.Format(_formatString, bars.Symbol), false); } public override void BacktestBegin() { WriteToDebugLog("Add these records to IBContracts.txt: ", false); string[] lines = File.ReadAllLines(Path.Combine(WLHost.Instance.DataFolder, "IBContracts.txt")); foreach (string line in lines) { string[] token = line.Split('='); _contractSymbols.Add(token[0]); } } public override void BacktestComplete() { if (_conflicts.Count < 1) WriteToDebugLog("No conflicts"); else { WriteToDebugLog("_conflicts.Count = " + _conflicts.Count); WriteToDebugLog("Conflicts for the following should be resolved before adding these records:"); for (int n = 0; n < _conflicts.Count; n++) { WriteToDebugLog(String.Format(_formatString, _conflicts[n])); } } } public override void Execute(BarHistory bars, int idx) { } static List<string> _contractSymbols = new List<string>(); static List<string> _conflicts = new List<string>(); const string _formatString = "{0}={0}|GBP|STK|SMART"; } }
2. Click File > Open Wealth-Lab User Data Folder and find the IBContracts.txt file.
3. Copy the result of the Debug log to use later...
4. Close WealthLab
5. Copy and paste the lines from the top of the debug log to the end of IBContracts.txt.
6. If there are conflicts with symbols in other markets, they'll be shown at the bottom of the debug log. You need to either rename your symbol or remove the conflicting record before adding the new one.
You'll be able to just use your LSE symbols now and IB will find them!
Awesome thanks @cone I'll give it a try!
I need to rewrite that procedure... you should close WealthLab before editing that file since WealthLab might write to it when it shuts down.
2. Click File > Open Wealth-Lab User Data Folder and find the IBContracts.txt file.
3. Copy the result of the Debug log to use later...
4. Close WealthLab
5. Copy and paste the lines from the top of the debug log to the end of IBContracts.txt.
6. If there are conflicts with symbols in other markets, they'll be shown at the bottom of the debug log. You need to either rename your symbol or remove the conflicting record before adding the new one.
Example: say you wanted to add this record:
ZTS=ZTS|GBP|STK|SMART|
but it conflicted with this one:
ZTS=ZTS|USD|STK|SMART|NYSE
If you knew you weren't going to use ZTS on the NYSE, you could delete that record.
Another option is to use a different symbol for your LSE symbol like this:
ZTS.L=ZTS|GBP|STK|SMART|
In this case you need to change ZTS to ZTS.L in your DataSet so that IB finds the right contract for it. (I don't know if there's a ZTS on LSE, it's just an example.)
7. Save the file.
2. Click File > Open Wealth-Lab User Data Folder and find the IBContracts.txt file.
3. Copy the result of the Debug log to use later...
4. Close WealthLab
5. Copy and paste the lines from the top of the debug log to the end of IBContracts.txt.
6. If there are conflicts with symbols in other markets, they'll be shown at the bottom of the debug log. You need to either rename your symbol or remove the conflicting record before adding the new one.
Example: say you wanted to add this record:
ZTS=ZTS|GBP|STK|SMART|
but it conflicted with this one:
ZTS=ZTS|USD|STK|SMART|NYSE
If you knew you weren't going to use ZTS on the NYSE, you could delete that record.
Another option is to use a different symbol for your LSE symbol like this:
ZTS.L=ZTS|GBP|STK|SMART|
In this case you need to change ZTS to ZTS.L in your DataSet so that IB finds the right contract for it. (I don't know if there's a ZTS on LSE, it's just an example.)
7. Save the file.
Your Response
Post
Edit Post
Login is required