Conversation
Owner
balancy
commented
Jan 12, 2021
- Работа с фундаментальными показателями разбита на множество простых функций
- Создано описание всех проверок, используемых для диаграммы перспективности
- Обеспечен вывод проверок и рекомендаций аналитиков на странице Тикера
- Бот по команде отсылает диаграмму в чат. Реализация отправки нужной картинки пока не сделана
…ct, added fundamentals tabl
…from financial API and Finviz; Calculating perspective coefficients and plotting Spider Plot based on these coefficients. New DB table Fundamentals created. Organisation of saving/extracting fundamentals from and to DB.
…frontend: displaying checks and recommendations
morgangt
approved these changes
Jan 20, 2021
Collaborator
morgangt
left a comment
There was a problem hiding this comment.
Очень много отличного кода!
| FINANCIAL_BASE_URL = "https://financialmodelingprep.com/api/v3/" | ||
|
|
||
| # finviz | ||
| FINVIZ_URL_BASE = "https://finviz.com/quote.ashx?t=" |
Collaborator
There was a problem hiding this comment.
В константе лучше хранить только url а get параметры лучше прописывать на момент отправки запроса, например в requests это так: requests.get(URL, params={"t": "AAPL"})
Comment on lines
+52
to
+62
| value_descr = list() | ||
| value_descr.append(f"Is the discounted cash flow value ({dict_['dcf']}) less than 20% of the share price " | ||
| f"({dict_['price']})?") | ||
| value_descr.append(f"Is the discounted cash flow value ({dict_['dcf']}) less than 40% of the share price " | ||
| f"({dict_['price']})?") | ||
| value_descr.append(f"Is the P/E ratio ({dict_['pe_ratio']}) less than the market average ({dict_['pe_country']}) " | ||
| f"but still greater than 0?") | ||
| value_descr.append(f"Is the P/E ratio ({dict_['pe_ratio']}) less than the industry average ({dict_['pe_sector']}) " | ||
| f"but still greater than 0?") | ||
| value_descr.append(f"Is the PEG ratio ({dict_['peg_ratio']}) within a reasonable range (0 to 1)?") | ||
| value_descr.append(f"Is the P/B ratio ({dict_['pb_ratio']}) within a reasonable range (0 to 1)?") |
Collaborator
There was a problem hiding this comment.
может стоит здесь просто декларативно описать список без команд append
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.