Financial Metrics Calculation Package
Project description
Financial Metrics
Financial Metrics Package provides a range of tools for calculating and analyzing various financial ratios from annual reports. This package includes modules for liquidity ratios, profitability ratios, efficiency ratios, market value ratios, leverage ratios, and cash flow ratios.
Installation
Prerequisites
- Python 3.8 or higher
pip
Steps
-
Clone the repository:
git clone https://github.com/martinthetechie/financial-metrics
-
Navigate to the project directory:
cd financial-metrics
-
Install dependencies:
If using
pip
:pip install -r requirements.txt
If using
poetry
:poetry install
Usage
-
Import the Functions
from financial_metrics.liquidity_ratios import cash_ratio,current_ratio,quick_ratio from financial_metrics.profitability_ratios import gross_profit_margin, net_profit_margin, return_on_assets, return_on_equity from financial_metrics.efficiency_ratios import inventory_turnover, receivables_turnover, asset_turnover_ratio, accounts_payable_turnover, days_sales_outstanding from financial_metrics.market_value_ratios import price_to_book, price_to_earnings, price_to_earnings_growth, dividend_yield from financial_metrics.leverage_ratios import debt_ratio, debt_to_equity_ratio, interest_coverage_ratio from financial_metrics.cash_flow_ratios import free_cash_flow, operating_cash_flow_ratio
-
Pass in Parameters
from financial_metrics.liquidity_ratios import current_ratio # Example data current_assets = 500000 current_liabilities = 300000 # Calculate the Current Ratio current_ratio_value = current_ratio(current_assets, current_liabilities) print(f"Current Ratio: {current_ratio_value}")
-
Calculativng Individual Ratios
-
Liquidity Ratios
current_ratio_value = current_ratio(current_assets,current_liabilities) quick_ratio_value = quick_ratio(current_assets,current_liabilities,inventory) cash_ratio_value = cash_ratio(cash,cash_equivalents,current_liabilities)
-
Profitability Ratios
gross_profit_margin_value = gross_profit_margin(gross_profit, revenue) net_profit_margin_value = net_profit_margin(net_income, revenue) return_on_assets_value = return_on_assets(net_income, total_assets) return_on_equity_value = return_on_equity(net_income, equity)
-
Efficiency Ratios
inventory_turnover_ratio_value = inventory_turnover(cogs, average_inventory) receivables_turnover_ratio_value = receivables_turnover(net_credit_sales, average_accounts_receivable) asset_turnover_ratio_value = asset_turnover_ratio(net_sales, average_total_assets) accounts_payable_turnover_ratio_value = accounts_payable_turnover(cogs, average_accounts_payable) days_sales_outstanding_value = days_sales_outstanding(average_accounts_receivable, net_credit_sales)
-
Market Value Ratios
price_to_book_value = price_to_book(price_per_share, book_value_per_share) price_to_earnings_value = price_to_earnings(price_per_share, earnings_per_share) price_to_earnings_growth_value = price_to_earnings_growth(price_per_share, earnings_per_share, price_to_earnings_growth_rate) dividend_yield_value = dividend_yield(dividends_per_share, price_per_share)
-
Leverage Ratios
debt_ratio_value = debt_ratio(total_debt, total_assets) debt_to_equity_ratio_value = debt_to_equity_ratio(total_debt, total_equity) interest_coverage_ratio_value = interest_coverage_ratio(earnings_before_interest_and_tax, interest_expense)
-
Cash Flow Ratios
free_cash_flow_value = free_cash_flow(operating_cash_flow, capital_expenditures) operating_cash_flow_ratio_value = operating_cash_flow_ratio(net_cash_flow_from_operations, current_liabilities)
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contact
- Author: Martin Tan
- Email: martinthetechie@gmail.com
- GitHub: https://github.com/martinthetechie
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file financial_metrics-0.0.1.tar.gz
.
File metadata
- Download URL: financial_metrics-0.0.1.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f576ce5917542a7c702bfab3a74a211dbd5705b8560ab8a8d87c123e847f4371 |
|
MD5 | 9b0681143787c0def2ed6adc2ea6f1e7 |
|
BLAKE2b-256 | 5a1d0821ba46d962ba3f94a5a18e99b7e9c71f6f9b40a0b8b72f1801e9183844 |
File details
Details for the file financial_metrics-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: financial_metrics-0.0.1-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | afb30346cb8859834b45cd693dddf6c037fa43b59d764bb8ab34c990dfdcbedd |
|
MD5 | 476ed43b8f2c29c540eeda0df90bbef7 |
|
BLAKE2b-256 | 9784861e338979d21786d7b59cb0de38d65496eaeff14d7b901a899face8a8da |