Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to get constituent rics of 0#MIFID.xbo #59

Open
zwedwin opened this issue Apr 21, 2022 · 1 comment
Open

Trying to get constituent rics of 0#MIFID.xbo #59

zwedwin opened this issue Apr 21, 2022 · 1 comment

Comments

@zwedwin
Copy link

zwedwin commented Apr 21, 2022

hi @wiwat-tharateeraparb I have tried to implement this recursively but am running into issues

here is my implementation

def get_all_children(chain_ric, visited, rics):
    children, _ = expand_chain_ric(chain_ric)
    if chain_ric.endswith('.xbo') and not chain_ric.startswith('0#'):
        rics.add(chain_ric)
    children = [child for child in children if child not in visited]
    print('CHAIN RIC:   ' + chain_ric)
    if children:
        for child in children:
            if child in visited:
                pass
            visited.append(child)
            get_all_children(child, visited, rics)
    return None

I appear to be missing some RICs however. I am expecting ~3500 constituent rics but I am only getting ~2000. From what I understand pyfra is no longer officially supported by refinitiv could this be causing the issue here? Are there RICS that "live on an island" so to speak and can only be accessed if you have the address? Thanks for your help.

@zwedwin
Copy link
Author

zwedwin commented Apr 21, 2022

Using the expand_chain_ric() found in the examples.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant