This repository contains R code to perform fundamental analysis for value investors. It leverages the dplyr
and tidyverse
libraries along with fmpcloudr
to retrieve and analyze financial data from Financial Modeling Prep.
- Analysis: Analyze key financials of a company.
- Visualization: Chart the cash ratio to visualize cash usage and sources.
- Benchmarking: Compare a company’s financial metrics with selected competitors.
- R (version >= 4.0.0)
- RStudio (optional, but recommended)
- Packages:
dplyr
,tidyverse
,fmpcloudr
,ggplot2
,shiny
(for interactive visualizations)
-
Clone the repository:
git clone https://github.com/yourusername/fundamental_analysis.git cd fundamental_analysis
-
Run the script on run_analysis.R:
-
Set up your API Token on : https://www.financialmodelingprep.com
-
Run the Analysis:
source('scripts/main.R')
-
Select the Company and Competitors: Modify the
run_analysis.R
script to include the ticker of the company and its competitors.
data/
: Contains raw and processed data files.scripts/
: Contains the main script to run the analysis (run_analysis.R) and for data retrieval, ratio analysis, an.reports/
: Contains example reports and R Markdown files.tests/
: Contains test scripts for the functions.
Contributions are welcome! Please create a pull request with a detailed description of your changes.
This project is licensed under the MIT License.