<h1 align="center">
<br>
<strong>Valinvest</strong>
<br>
<br>
<img src="https://imgs.xkcd.com/comics/technical_analysis_2x.png" />
</h1>
<h4 align="center">A value investing tool based on Warren Buffett, Joseph Piotroski and Benjamin Graham thoughts</h4>
# Welcome to Valinvest <!-- omit in toc -->
## 🔥 Important update 🔥 <!-- omit in toc -->
The Financial API used by valinvest to get financial data has been rewritten and now requires a API Key in order to make request. So, the first step now is to register on https://financialmodelingprep.com/login and get an API key. Keep it, you will need it to use valinvest ;)
## ✨tl;dr ✨ <!-- omit in toc -->
For a given stock ticker, `valinvest` calculates a score from 0 to 9. The higher the score, the better the company is according to the scoring methodology.
1. Install it
```bash
pip install valinvest
```
2. Calculate score
```python
>>> import valinvest
>>> aapl = valinvest.Fundamental('AAPL', YOUR_API_KEY)
>>> aapl.fscore()
6.8
```
## Table of contents :books: <!-- omit in toc -->
- [Introduction](#introduction)
- [Methodology description](#methodology-description)
- [Growth](#growth)
- [Profitability](#profitability)
- [Debts](#debts)
- [Market sensibility](#market-sensibility)
- [Investment](#investment)
- [Installation](#installation)
- [Examples](#examples)
- [Starbucks Corporation (SBUX)](#starbucks-corporation-sbux)
- [Apple Inc. (AAPL)](#apple-inc-aapl)
- [License](#license)
- [Credits](#credits)
## Introduction
The aim of the package is to evaluate a stock according to his fundamentals by setting a score and identify buy and sells opportunies through technical indicators.
## Methodology description
The scoring methodology is based on Joseph Piotroski's study ([Value Investing: The Use of Historical Financial Statement Information to Separate Winners from Losers](http://www.chicagobooth.edu/~/media/FE874EE65F624AAEBD0166B1974FD74D.pdf)). The F-Score is used to help financial investment decisions by finding the best value stocks on the market.<br>
> The Piostroski score is calculated based on 9 criteria divided into 3 groups:
>
> #### Profitability
>
> - Return on Assets (1 point if it is positive in the current year, 0 otherwise)
> - Operating Cash Flow (1 point if it is positive in the current year, 0 otherwise)
> - Change in Return of Assets (ROA) (1 point if ROA is higher in the current year compared to the previous one, 0 otherwise)
> - Accruals (1 point if Operating Cash Flow/Total Assets is higher than ROA in the current year, 0 otherwise)
>
> #### Leverage, Liquidity and Source of Funds
>
> - Change in Leverage (long-term) ratio (1 point if the ratio is lower this year compared to the previous one, 0 otherwise)
> - Change in Current ratio (1 point if it is higher in the current year compared to the previous one, 0 otherwise)
> - Change in the number of shares (1 point if no new shares were issued during the last year)
>
> #### Operating Efficiency
>
> - Change in Gross Margin (1 point if it is higher in the current year compared to the previous one, 0 otherwise)
> - Change in Asset Turnover ratio (1 point if it is higher in the current year compared to the previous one, 0 otherwise)
>
This software calculates an alternate version of the F-Score as follows:
#### Growth
- Net Revenue
- EBITDA
- Earnings per share (EPS)
#### Profitability
- CROIC
- ROIC
#### Debts
- EBITDA cover ratio
- Debt coverage
#### Market sensibility
- Beta
#### Investment
- Equity buyback
## Installation
> `pip install valinvest`
## Examples
### Starbucks Corporation (SBUX)
| | 2009 | 2010 | 2011 | 2012 | 2013 | 2014 | 2015 | 2016 | 2017 | 2018 | 2019 | Score |
| ------------ | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ----- |
| REV_G | | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
| EBT_G | | 1 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 1 | 0.7 |
| EPS_G | | 1 | 1 | 1 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 0.7 |
| ROIC | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.1 |
| CROIC | 1 | 1 | 1 | 1 | 1 | 0 | 1 | 1 | 1 | 1 | 1 | 0.9 |
| 5YRS_BETA | | | | | | | | | | | | 1 |
| EBITDA_COVER | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
| DEBT_COST | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0.7 |
| EQ_BUYBACK | | 1 | 0 | 0 | 1 | 0 | 0 | 1 | 1 | 1 | 1 | 0.6 |
| F-SCORE | | | | | | | | | | | | 6.7 |
```python
>>> import valinvest
>>> sbux = valinvest.Fundamental('SBUX')
>>> sbux.fscore()
6.7
```
### Apple Inc. (AAPL)
| | 2009 | 2010 | 2011 | 2012 | 2013 | 2014 | 2015 | 2016 | 2017 | 2018 | 2019 | Score |
| ------------ | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ----- |
| REV_G | | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 1 | 1 | 0 | 0.8 |
| EBT_G | | 1 | 1 | 1 | 0 | 1 | 1 | 0 | 1 | 1 | 0 | 0.7 |
| EPS_G | | 1 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 1 | 0 | 0.6 |
| ROIC | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
| CROIC | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
| 5YRS_BETA | | | | | | | | | | | | 0 |
| EBITDA_COVER | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
| DEBT_COST | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
| EQ_BUYBACK | | 1 | 0 | 0 | 1 | 0 | 1 | 1 | 1 | 1 | 1 | 0.7 |
| F-SCORE | | | | | | | | | | | | 6.8 |
```python
>>> import valinvest
>>> aapl = valinvest.Fundamental('AAPL')
>>> aapl.fscore()
6.8
```
## License
This project is licensed under the MIT License - see the [LICENSE.md](https://github.com/astro30/valinvest/blob/master/LICENSE) file for details
## Credits
This software uses code from several open source packages:
- [pandas](http://pandas.pydata.org)
- [numpy](http://numpy.pydata.org)
- [requests](https://requests.readthedocs.io/en/master/)
Raw data
{
"_id": null,
"home_page": "https://github.com/astro30/valinvest",
"name": "valinvest",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "",
"author": "Guillaume Rey",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/62/7f/a023d11df31080c9e890a0376513cf6a2e49066403385d10481a4331be1d/valinvest-0.0.2.tar.gz",
"platform": "",
"description": "<h1 align=\"center\">\n <br>\n <strong>Valinvest</strong>\n <br>\n <br>\n <img src=\"https://imgs.xkcd.com/comics/technical_analysis_2x.png\" />\n</h1>\n\n<h4 align=\"center\">A value investing tool based on Warren Buffett, Joseph Piotroski and Benjamin Graham thoughts</h4>\n\n# Welcome to Valinvest <!-- omit in toc -->\n## \ud83d\udd25 Important update \ud83d\udd25 <!-- omit in toc -->\nThe Financial API used by valinvest to get financial data has been rewritten and now requires a API Key in order to make request. So, the first step now is to register on https://financialmodelingprep.com/login and get an API key. Keep it, you will need it to use valinvest ;)\n\n## \u2728tl;dr \u2728 <!-- omit in toc -->\nFor a given stock ticker, `valinvest` calculates a score from 0 to 9. The higher the score, the better the company is according to the scoring methodology.\n1. Install it\n```bash\npip install valinvest\n```\n\n2. Calculate score\n```python\n>>> import valinvest\n>>> aapl = valinvest.Fundamental('AAPL', YOUR_API_KEY)\n>>> aapl.fscore()\n6.8\n```\n\n\n## Table of contents :books: <!-- omit in toc -->\n\n- [Introduction](#introduction)\n- [Methodology description](#methodology-description)\n - [Growth](#growth)\n - [Profitability](#profitability)\n - [Debts](#debts)\n - [Market sensibility](#market-sensibility)\n - [Investment](#investment)\n- [Installation](#installation)\n- [Examples](#examples)\n - [Starbucks Corporation (SBUX)](#starbucks-corporation-sbux)\n - [Apple Inc. (AAPL)](#apple-inc-aapl)\n- [License](#license)\n- [Credits](#credits)\n\n## Introduction\n\nThe aim of the package is to evaluate a stock according to his fundamentals by setting a score and identify buy and sells opportunies through technical indicators.\n\n## Methodology description\n\nThe scoring methodology is based on Joseph Piotroski's study ([Value Investing: The Use of Historical Financial Statement Information to Separate Winners from Losers](http://www.chicagobooth.edu/~/media/FE874EE65F624AAEBD0166B1974FD74D.pdf)). The F-Score is used to help financial investment decisions by finding the best value stocks on the market.<br>\n\n> The Piostroski score is calculated based on 9 criteria divided into 3 groups:\n> \n> #### Profitability\n>\n> - Return on Assets (1 point if it is positive in the current year, 0 otherwise)\n> - Operating Cash Flow (1 point if it is positive in the current year, 0 otherwise)\n> - Change in Return of Assets (ROA) (1 point if ROA is higher in the current year compared to the previous one, 0 otherwise)\n> - Accruals (1 point if Operating Cash Flow/Total Assets is higher than ROA in the current year, 0 otherwise)\n>\n> #### Leverage, Liquidity and Source of Funds\n>\n> - Change in Leverage (long-term) ratio (1 point if the ratio is lower this year compared to the previous one, 0 otherwise)\n> - Change in Current ratio (1 point if it is higher in the current year compared to the previous one, 0 otherwise)\n> - Change in the number of shares (1 point if no new shares were issued during the last year)\n>\n> #### Operating Efficiency\n>\n> - Change in Gross Margin (1 point if it is higher in the current year compared to the previous one, 0 otherwise)\n> - Change in Asset Turnover ratio (1 point if it is higher in the current year compared to the previous one, 0 otherwise)\n> \n\nThis software calculates an alternate version of the F-Score as follows:\n#### Growth\n- Net Revenue\n- EBITDA\n- Earnings per share (EPS)\n\n#### Profitability\n- CROIC\n- ROIC\n\n#### Debts\n- EBITDA cover ratio\n- Debt coverage\n\n#### Market sensibility\n- Beta\n\n#### Investment\n- Equity buyback\n\n## Installation\n\n> `pip install valinvest`\n\n## Examples\n\n### Starbucks Corporation (SBUX)\n\n| | 2009 | 2010 | 2011 | 2012 | 2013 | 2014 | 2015 | 2016 | 2017 | 2018 | 2019 | Score |\n| ------------ | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ----- |\n| REV_G | | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |\n| EBT_G | | 1 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 1 | 0.7 |\n| EPS_G | | 1 | 1 | 1 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 0.7 |\n| ROIC | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.1 |\n| CROIC | 1 | 1 | 1 | 1 | 1 | 0 | 1 | 1 | 1 | 1 | 1 | 0.9 |\n| 5YRS_BETA | | | | | | | | | | | | 1 |\n| EBITDA_COVER | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |\n| DEBT_COST | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0.7 |\n| EQ_BUYBACK | | 1 | 0 | 0 | 1 | 0 | 0 | 1 | 1 | 1 | 1 | 0.6 |\n| F-SCORE | | | | | | | | | | | | 6.7 |\n\n```python\n>>> import valinvest\n>>> sbux = valinvest.Fundamental('SBUX')\n>>> sbux.fscore()\n6.7\n```\n\n### Apple Inc. (AAPL)\n\n| | 2009 | 2010 | 2011 | 2012 | 2013 | 2014 | 2015 | 2016 | 2017 | 2018 | 2019 | Score |\n| ------------ | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ----- |\n| REV_G | | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 1 | 1 | 0 | 0.8 |\n| EBT_G | | 1 | 1 | 1 | 0 | 1 | 1 | 0 | 1 | 1 | 0 | 0.7 |\n| EPS_G | | 1 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 1 | 0 | 0.6 |\n| ROIC | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |\n| CROIC | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |\n| 5YRS_BETA | | | | | | | | | | | | 0 |\n| EBITDA_COVER | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |\n| DEBT_COST | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |\n| EQ_BUYBACK | | 1 | 0 | 0 | 1 | 0 | 1 | 1 | 1 | 1 | 1 | 0.7 |\n| F-SCORE | | | | | | | | | | | | 6.8 |\n\n```python\n>>> import valinvest\n>>> aapl = valinvest.Fundamental('AAPL')\n>>> aapl.fscore()\n6.8\n```\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](https://github.com/astro30/valinvest/blob/master/LICENSE) file for details\n\n## Credits\n\nThis software uses code from several open source packages:\n\n- [pandas](http://pandas.pydata.org)\n- [numpy](http://numpy.pydata.org)\n- [requests](https://requests.readthedocs.io/en/master/)\n\n\n",
"bugtrack_url": null,
"license": "",
"summary": "A value investing tool based on Warren Buffett, Joseph Piotroski and Benjamin Graham thoughts",
"version": "0.0.2",
"project_urls": {
"Homepage": "https://github.com/astro30/valinvest"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "0bbd489b7e37e3b01cb023c4c9f3773d03a7ac6a2b1899f133c5cd401e91d0d0",
"md5": "0f2271e32500240f789eeb945976b5a0",
"sha256": "37fadaf30c69e0487fed8d9cc93bb792ca8cf36fed0839e0e755a84738166ab9"
},
"downloads": -1,
"filename": "valinvest-0.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "0f2271e32500240f789eeb945976b5a0",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 11574,
"upload_time": "2020-09-05T08:40:46",
"upload_time_iso_8601": "2020-09-05T08:40:46.802535Z",
"url": "https://files.pythonhosted.org/packages/0b/bd/489b7e37e3b01cb023c4c9f3773d03a7ac6a2b1899f133c5cd401e91d0d0/valinvest-0.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "627fa023d11df31080c9e890a0376513cf6a2e49066403385d10481a4331be1d",
"md5": "7aec2a07619cdac3bb44bae4ddd57e25",
"sha256": "9614aaf8019e015c20ea48867ede8a6ea10e1c6410e787314066d7b2e5aeb7dc"
},
"downloads": -1,
"filename": "valinvest-0.0.2.tar.gz",
"has_sig": false,
"md5_digest": "7aec2a07619cdac3bb44bae4ddd57e25",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 11978,
"upload_time": "2020-09-05T08:40:48",
"upload_time_iso_8601": "2020-09-05T08:40:48.965099Z",
"url": "https://files.pythonhosted.org/packages/62/7f/a023d11df31080c9e890a0376513cf6a2e49066403385d10481a4331be1d/valinvest-0.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2020-09-05 08:40:48",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "astro30",
"github_project": "valinvest",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "certifi",
"specs": [
[
"==",
"2022.12.7"
]
]
}
],
"lcname": "valinvest"
}