Package: valinvest
ValinvestA value investing tool based on Warren Buffett, Joseph Piotroski and Benjamin Graham thoughtsWelcome to Valinvest🔥 Important update 🔥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 onhttps://financialmodelingprep.com/loginand get an API key. Keep it, you will need it to use valinvest ;)✨tl;dr ✨For a given stock ticker,valinvestcalculates a score from 0 to 9. The higher the score, the better the company is according to the scoring methodology.Install itpipinstallvalinvestCalculate score>>>importvalinvest>>>aapl=valinvest.Fundamental('AAPL',YOUR_API_KEY)>>>aapl.fscore()6.8Table of contents :books:IntroductionMethodology descriptionGrowthProfitabilityDebtsMarket sensibilityInvestmentInstallationExamplesStarbucks Corporation (SBUX)Apple Inc. (AAPL)LicenseCreditsIntroductionThe 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 descriptionThe scoring methodology is based on Joseph Piotroski's study (Value Investing: The Use of Historical Financial Statement Information to Separate Winners from Losers). The F-Score is used to help financial investment decisions by finding the best value stocks on the market.The Piostroski score is calculated based on 9 criteria divided into 3 groups:ProfitabilityReturn 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 FundsChange 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 EfficiencyChange 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:GrowthNet RevenueEBITDAEarnings per share (EPS)ProfitabilityCROICROICDebtsEBITDA cover ratioDebt coverageMarket sensibilityBetaInvestmentEquity buybackInstallationpip install valinvestExamplesStarbucks Corporation (SBUX)20092010201120122013201420152016201720182019ScoreREV_G11111111111EBT_G11101110010.7EPS_G11101011100.7ROIC001000000000.1CROIC111110111110.95YRS_BETA1EBITDA_COVER111111111111DEBT_COST000011111110.7EQ_BUYBACK10010011110.6F-SCORE6.7>>>importvalinvest>>>sbux=valinvest.Fundamental('SBUX')>>>sbux.fscore()6.7Apple Inc. (AAPL)20092010201120122013201420152016201720182019ScoreREV_G11111101100.8EBT_G11101101100.7EPS_G11100101100.6ROIC111111111111CROIC1111111111115YRS_BETA0EBITDA_COVER111111111111DEBT_COST111111111111EQ_BUYBACK10010111110.7F-SCORE6.8>>>importvalinvest>>>aapl=valinvest.Fundamental('AAPL')>>>aapl.fscore()6.8LicenseThis project is licensed under the MIT License - see theLICENSE.mdfile for detailsCreditsThis software uses code from several open source packages:pandasnumpyrequests