- ago
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?
0
1,047
Solved
10 Replies

Reply

Bookmark

Sort
- ago
#1
WL8 B16, IB 12: No security definition has been found for QGC#C
0
- ago
#2
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')"
0
- ago
#3
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.
1
Best Answer
- ago
#4
thanks @eugene
0
- ago
#5
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
0
- ago
#6
Yes that worked ISF;STK;GBP;SMART in the end. Thanks for your help.
1
- ago
#7
Glad to see you're up and running again!
0
Cone8
 ( 7.27% )
- ago
#8
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):

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!
2
- ago
#9
Awesome thanks @cone I'll give it a try!
0
Cone8
 ( 7.27% )
- ago
#10
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.
1

Reply

Bookmark

Sort