Skip to content
This repository has been archived by the owner on Aug 15, 2023. It is now read-only.
/ ValueInvestFinnhub Public archive

This library provides functionality to analyze financial data and rank companies based on the principles outlined in the book "The Little Book that Still Beats the Market" by Joel Greenblatt.

License

Notifications You must be signed in to change notification settings

gp1981/ValueInvestFinnhub

Repository files navigation

Greenblatt's Magic Formula Stock Ranking System

Author: gp1981 with the contribution of ChatGPT4.0

Purpose

This library provides functionality to analyze financial data and rank companies based on the principles outlined in the book "The Little Book that Still Beats the Market" by J. Greenblatt. The system utilizes data from the Finnhub API to analyze and rank stocks based on specific criteria.

The purpose of this project is for educational purposes only. The code provided here is not intended as financial advice and should be used at your own risk.

Ranking System Summary

In "The Little Book that Still Beats the Market," J. Greenblatt outlines a simple stock ranking system called the Magic Formula. The Magic Formula ranks stocks based on two key factors: earnings yield and return on capital. By selecting stocks with high earnings yield and return on capital, the system aims to identify potentially undervalued companies with strong profitability.

Disclaimer

The code provided in this repository is for educational purposes only and should not be considered as financial advice. Use the code and any information obtained from it at your own risk. The author and contributors of this repository are not responsible for any investment decisions made based on the code or its output.

Usage

To use the code in this repository, you will need an API key from Finnhub. The API key should be stored as an environment variable named API_KEY.

File Overview

File Purpose
main.R Main script to run the analysis
Functions/api.R Functions for interacting with the API
Functions/utils.R Utility functions
Functions/analysis.R Analysis functions for stock ranking

Contributing

Contributions to this project are welcome! Please follow the guidelines below when making contributions:

Contributing Guidelines

Commit Descriptions

If you encounter any issues or have suggestions, please open an issue in the GitHub repository.

When making commits to the repository, please follow these guidelines for writing descriptive commit messages:

  • Feat: Use this prefix for new features or enhancements to existing functionality.
  • Fix: Use this prefix for bug fixes or resolving issues.
  • Docs: Use this prefix for documentation updates or improvements.
  • refactor : Use this prefix for code refactoring or restructuring without changing functionality.
  • test : Use this prefix for adding or modifying test cases. Please provide a clear and concise description of the changes made in the commit message.

Branch Naming

When creating branches, please use descriptive names that indicate the purpose or functionality of the branch. Some common branch naming conventions include:

  • Feature-branch-name: Use this prefix for branches that add new features or enhancements.
  • Bugfix-branch-name: Use this prefix for branches that fix bugs or resolve issues.
  • Refactor-branch-name: Use this prefix for branches that involve code refactoring
  • docs-branch-name: Use this prefix for branches that involve documentation updates or improvements. Choose a branch name that clearly represents the purpose of the branch and provides context to other contributors.

ChatGPT4.0 Link

GitHub: ValueInvestFinnhub

About

This library provides functionality to analyze financial data and rank companies based on the principles outlined in the book "The Little Book that Still Beats the Market" by Joel Greenblatt.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages