Closed shivamsouravjha closed 1 month ago
Hi @shivamsouravjha, can I work on this one?
Sure @naineel1209 feel free to work on it!
Thanks @shivamsouravjha! I was going through the codebase and was wondering what should be the value of the COMPANY_URL
env variable?
Its for the case when we dont have the data in database so we scrap it out from the source website
Thanks for your response, Just to clarify, is there any specific site that you are using to scrape the data?
Just for basic detail like name and etc.
I meant to ask any specific external API endpoint that I should I set in the environment variable.
Nope you wont be needing that most of data is fetched from mongodb whose sample of 1 stock dump is present on dump.txt
Hi @shivamsouravjha, I was working on this issue and created a structure to calculate the F-score, but while accessing the document returned from MongoDB, I encountered a strange problem. When I try to access a key like Net Profit +
, the map cannot locate the key, even though it is present.
But when I access key like Total Assets
- then it is being located.
Am I possibly missing something in the code? Here's a link to the relevant part of the code: Code Link
ideally this Net Profit +
should help you access the map, perhaps there's issue with + sign try replicating the same in a small code section
Hi @shivamsouravjha,
I was able to resolve the issue of accessing the key Net Profit +
. The problem occurred because the preceding spaces in keys with a + sign contained a non-breaking space (NBSP)
instead of a regular space. I've addressed this for now.
However, I encountered another issue today. Some of the stock data in the MongoDB restore document you added to the Git repository has a different structure than expected. For example, under profitLoss > Net Profit +
, we expect an array of strings, but in some cases, it's an array of objects containing quarterly data.
For HDFC Bank:
There are approximately 199 documents with this issue, while 4,553 documents match the expected format. The remaining documents don't have any data.
actually the HDFC format is the needed one. Reason is that it has months mentioned.
There are the keys
| Mar 2015 | Mar 2016 | Mar 2017 | Mar 2018 | Mar 2019 | Mar 2020 | Mar 2021 | Mar 2022 | Mar 2023 | Mar 2024 | TTM
But seems like it is not needed as it can be used as array.
WIll try update the database! Thanks for pointing this out.
Value Investing: Using the Piotroski F-Score to Identify Winning Stocks
This README provides a simplified explanation of Joseph D. Piotroski's research paper titled "Value Investing: The Use of Historical Financial Statement Information to Separate Winners from Losers." The paper introduces the Piotroski F-Score, a scoring system that helps investors identify undervalued stocks with strong financial health.
Introduction
Value investing involves buying stocks that appear undervalued based on financial ratios like the book-to-market (BM) ratio. However, not all high BM stocks are good investments—some are financially distressed and continue to underperform.
Objective of the Study:
The Piotroski F-Score
The F-Score is a 9-point scoring system based on specific financial criteria derived from a company's financial statements. Each criterion adds 1 point if positive, with a maximum score of 9.
Components of the F-Score:
1. Profitability Criteria (4 points)
2. Leverage, Liquidity, and Source of Funds (3 points)
3. Operating Efficiency Criteria (2 points)
How to Calculate the F-Score
For each criterion:
Interpretation:
Applying the F-Score in Investment Strategy
Step 1: Identify high BM (value) stocks.
Step 2: Calculate the F-Score for each stock.
Step 3: Select stocks with high F-Scores for your portfolio.
Benefits:
Research Findings
Practical Example
Imagine you're evaluating two companies, both with high BM ratios:
Company A:
Company B:
Investment Decision: Choose Company A for your portfolio due to its high F-Score, indicating strong financial health.
Limitations and Considerations
Conclusion
The Piotroski F-Score is a valuable tool for investors seeking to enhance their value investing strategy by focusing on financially strong companies. By systematically applying this scoring system, investors can improve portfolio performance and reduce the risk of investing in financially distressed firms.
References