Closed Jermaine456 closed 4 years ago
Examples can be found in this folder: .yml default values
What I'm asking for, is how exactly in a script, do I provide "os.environ['BBG_ROOT']/markets/ccy.yml" so that I can add new currencies??
You don't need to write any script. The only thing you need to do, is to create the ccy.yml
file in your folder. Content of the file is given in above link.
which folder? my local environment?
I've already got the file for the record just wandering how to make sure python registers the changes I've made.
It's currently saved here: C:\anaconda3\Lib\site-packages\xbbg\markets
BBG_ROOT
is the system environment variable you defined in your system, for example D:\Data
.
Then you create .yml
files in D:\Data\markets
.
Ok so I created the system environment variable BBG_root and created the .yml files. I'm trying to add the CAD currency as you can see in below txt file attached but I keep getting "KeyError: 'Cannot find exchange info for CAD Curncy'".
Please advise.
Put below code in assets.yml
:
Curncy:
- tickers: [CAD]
exch: CurrencyGeneric
error still persists. Is there something I'm supposed to put in exch.yml?
Ignore this all resolved. Thanks!
ok good
Hi. I am with a similar problem here. I want to add Brazilian assets, more specific the ticker 'ODF21 Comdty'. How should I do the mapping?
I’ve been reading through your documentation for xbbg on https://pypi.org/project/xbbg/.
I’m confused following these instructions to add new mappings for more securities when pulling intraday data.
“To add new mappings, define BBG_ROOT in sys path and add assets.yml and exch.yml under BBG_ROOT/markets”.
When I open the .yml files for assets, exchanges and currencies in notepad the following instructions are also given:
“Override or expand this list by providing
os.environ['BBG_ROOT']/markets/assets.yml
os.environ['BBG_ROOT']/markets/ccy.yml
os.environ['BBG_ROOT']/markets/exch.yml “
Would you mind providing example code to show how exactly I’m supposed to do the above?
Many thanks,