matthewgilbert / pdblp

pandas wrapper for Bloomberg Open API
MIT License
240 stars 69 forks source link

remove "Unknow security" Error #93

Closed BilalBAI closed 3 years ago

BilalBAI commented 3 years ago

When we use pdblp to request data for a list of tickers, if any one of the tickers is invalid, we get errors and can't get any data for the rest of the them. We have to pre-check all tickers one by one to handle the errors. It's very inefficient. If we remove this ValueError, it will return nan for invalid tickers which is easy to handle in the dataframe.

For pull requests please include the following:

Notes:

To run the git diff on the upstream/master branch make sure this is set up, e.g.

git remote add upstream git@github.com:matthewgilbert/pdblp.git
git fetch upstream

See here for more details.

Unfortunately automated testing using TravisCI is not possible since many tests require a valid Bloomberg connection. Please verify that pytest pdblp/tests -v has been run and all tests are passing.

Commit

For most simple feature implementations please squash your commit to one entry and follow the style of https://chris.beams.io/posts/git-commit/ in your commit message, i.e.

BilalBAI commented 3 years ago

It looks like this after removing that ValueError: image

matthewgilbert commented 3 years ago

This will change the API / expected behaviour in a way that I am not comfortable with therefore I don't want to introduce this change. Note that a variant of this type of behaviour is available in a new package I released which supercedes pdblp. You can take a look at specifying this type of behaviour in the new package here https://matthewgilbert.github.io/blp/quickstart.html#Troubleshooting

BilalBAI commented 3 years ago

This will change the API / expected behaviour in a way that I am not comfortable with therefore I don't want to introduce this change. Note that a variant of this type of behaviour is available in a new package I released which supercedes pdblp. You can take a look at specifying this type of behaviour in the new package here https://matthewgilbert.github.io/blp/quickstart.html#Troubleshooting

Understood. Thanks @matthewgilbert .