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

Unmatched symbols/indexes #14

Open
TuringSage opened this issue Jun 19, 2023 · 1 comment
Open

Unmatched symbols/indexes #14

TuringSage opened this issue Jun 19, 2023 · 1 comment

Comments

@TuringSage
Copy link

TuringSage commented Jun 19, 2023

The symbols returned by the GET best/worst performers dont match the symbols returned by the GET tickers.
For example Addoha P (performer) vs ADH vs "Douja Promotion Groupe Addoha" (Ticker)
Its hard to link them unless hardcoded and kept an eye on or some kind of regex pattern finding ..

@Ahmed-Z-D
Copy link
Collaborator

Ahmed-Z-D commented Jun 19, 2023

@TuringSage, we appreciate you bringing this issue to our attention. Indeed, there is a discrepancy between the symbols and names returned by the GET best/worst performers and those related to GET tickers. The issue arises primarily because we present the data of the best/worst performers endpoint in its original form, a form that does not facilitate users to perform further computational analysis on the provided information due to the absence of the ticker identifier.

A solution for this problem will be implemented as soon as feasible. In the meantime, a temporary workaround would be to refer to the constant COMPANIES and utilize its data to match the name received from the GET best/worst performers with its corresponding ticker symbol, for instance:

import StocksMa as stm

companies = stm.constants.COMPANIES
print(companies["ADH"])
CompanyInfo(name='Douja Promotion Groupe Addoha', other_name='Addoha P', isin='MA0000011512')

It is evident that the named tuple CompanyInfo comprises the necessary data to conduct a search for the appropriate ticker symbol from the constant COMPANIES using the name provided in the GET best/worst performers functions. Nonetheless, utilizing this method will result in the omission of certain companies, particularly: {AKDITAL P, ATLANTASANAD P, SOTHEMA P}. Hence, to accomplish the task, it is advisable to utilize basic regex with the provided workaround solution.

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

2 participants