PHP Classes

TEconomicsHandler: Perform several types of economic calculations

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2025-01-10 (9 days ago) RSS 2.0 feedNot yet rated by the usersTotal: 12 This week: 4All time: 11,474 This week: 13Up
Version License PHP version Categories
ascoos-economics-cla 25.0.0Custom (specified...8.2Finances, Business, PHP 8
Description 

Author

This package can perform several types of economic calculations.

It provides a class that can take an array with several types of parameter values as a parameter.

The class can perform several types of calculations with shares like:

- Altman Z-Score

- Asset turnover ratio based on net sales and average assets

- Capital adequacy ratio based on equity and total risk

- Capital expenditure based on the purchase of fixed assets and improvements of fixed assets

- Cash conversion cycle based on the inventory period, receivables period, and payables period

- Cost of goods sold (COGS) based on beginning inventory, purchases, and ending inventory

- Total cost based on fixed and variable costs

- Cost of equity based on the risk-free rate, beta, and market return

- Current ratio based on current assets and current liabilities

- Current yield based on annual interest and current bond price

- Debt ratio based on total liabilities and total assets

- Debt service coverage ratio (DSCR) based on net operating income and total debt service

- Debt to equity ratio based on total liabilities and shareholders' equity

- Dividend payout ratio based on total dividends and net income

- Dividend yield based on dividends per share and share price

- Earnings per share based on net income and number of shares

- Economic value added based on net operating profit after taxes, capital, and weighted average cost of capital (WACC)

- Equity ratio based on total equity and total assets.

- Free cash flow based on operating cash flow and capital expenditure

- GDP growth rate based on current GDP and previous GDP

- Gross margin based on gross profit and net sales

- Interest coverage ratio based on earnings before interest and taxes (EBIT) and interest expense

- Internal rate of return (IRR) based on an array of cash flows

- Inventory turnover ratio based on cost of goods sold and average inventory

- Net margin based on net income and net sales

- Net present value based on cash flow, discount rate, and period

- Net working capital based on current assets and current liabilities

- Operating cash flow based on net income, depreciation, and changes in working capital

- Operating cost based on administrative, operational, sales, and depreciation expenses

- Operating income based on net income, operating expenses, depreciation, and research and development expenses

- Operating margin based on operating profit and net sales

- Payback period based on initial investment and annual cash flows

- Price-to-book ratio based on share price and book value per share

- Price-to-earnings ratio based on share price and earnings per share

- Profitability index based on the present value of cash flows and initial investment.

- Profit margin based on net income and total revenue

- Quick ratio based on current assets, inventories, and current liabilities

- Return on assets based on net income and total assets

- Return on capital employed based on earnings before interest and taxes (EBIT) and capital employed

- Return on equity based on net income and shareholders' equity

- Return on investment based on net profit and investment cost

- Times interest earned based on earnings before interest and taxes (EBIT) and interest expense

- Working capital based on current assets and current liabilities

Picture of ASCOOS CMS
  Performance   Level  
Name: ASCOOS CMS <contact>
Classes: 25 packages by
Country: Greece Greece
Age: ???
All time rank: 379423 in Greece Greece
Week rank: 7 Up1 in Greece Greece Up
Innovation award
Innovation award
Nominee: 14x

Winner: 1x

Instructions

This package requires Ascoos Framework >= 25.0.0

Example

<?php
/**
 * __ _ ___ ___ ___ ___ ___ ____ _ __ ___ ___
 * / _` |/ / / __/ _ \ / _ \ / / / __/| '_ ` _ \ / /
 * | (_| |\ \| (_| (_) | (_) |\ \ | (__ | | | | | |\ \
 * \__,_|/__/ \___\___/ \___/ /__/ \___\|_| |_| |_|/__/
 *
 *
 ************************************************************************************
 * @ASCOOS-NAME : ASCOOS CMS 25' *
 * @ASCOOS-VERSION : 25.0.0 *
 * @ASCOOS-CATEGORY : Framework (Frontend and Administrator Side) *
 * @ASCOOS-CREATOR : Drogidis Christos *
 * @ASCOOS-SITE : www.ascoos.com *
 * @ASCOOS-LICENSE : [Commercial] http://docs.ascoos.com/lics/ascoos/AGL.html *
 * @ASCOOS-COPYRIGHT : Copyright (c) 2007 - 2025, AlexSoft Software. *
 ************************************************************************************
 *
 * @package : ASCOOS FRAMEWORK - TEconomicsHandler Examples
 * @subpackage : Calculate the cash conversion cycle based on inventory period, receivables period, and payables period.
 * @source : examples/cash_conversion_cycle.php
 * @fileNo :
 * @version : 25.0.0
 * @build : 10831
 * @created : 2025-01-06 07:00:00 UTC+2
 * @updated :
 * @author : Drogidis Christos
 * @authorSite : www.alexsoft.gr
 * @license : AGL-F
 *
 * @since PHP 8.2
 */

// REQUIRE ASCOOS FRAMEWORK
require_once '[ASCOOS FRAMEWORK PATH]/autoload.php';
require_once
'../class/coreEconomics.php';

use
ASCOOS\FRAMEWORK\Extras\Economics\TEconomicsHandler;

/*
<English> Example : Calculation of Cash Conversion Cycle
<Greek> ?????????? : ??????????? ?????? ?????????? ????????
*/

/*
<English> Data
<Greek> ????????
*/
$array = [
   
'inventory_period' => 60, // Stock cycle period (in days)
   
'receivables_period' => 60, // Accounts receivable period (in days)
   
'payables_period' => 45 // Accounts payable period (in days)
];

/*
<English> Create an object
<Greek> ?????????? ????????????
*/
$objEconomic = new TEconomicsHandler($array);

/*
<English> Calculation of Cash Conversion Cycle
<Greek> ??????????? ?????? ?????????? ????????
*/
$ccc = $objEconomic->cash_conversion_cycle();
echo
"Cash Conversion Cycle (CCC): $ccc days\n";

$objEconomic->Free($objEconomic);


  Files folder image Files (5)  
File Role Description
Files folder imageclass (1 file)
Files folder imageexamples (2 files)
Accessible without login Plain text file LICENSE_AGL-F.md Lic. License text
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files (5)  /  class  
File Role Description
  Plain text file coreEconomics.php Class Handles arrays with economics formulas

  Files folder image Files (5)  /  examples  
File Role Description
  Accessible without login Plain text file cash_conversion_cycle.php Example Calculate the cash conversion cycle based on inventory period, receivables period, and payables period
  Accessible without login Plain text file earnings_per_share.php Example Example script

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
Downloadascoos-economics-cla-2025-01-10.zip 23KB
Downloadascoos-economics-cla-2025-01-10.tar.gz 21KB
Install with ComposerInstall with Composer
Needed packages  
Class DownloadWhy it is needed Dependency
Ascoos Framework Download .zip .tar.gz included in Ascoos Framework Required
 Version Control Unique User Downloads Download Rankings  
 60%
Total:12
This week:4
All time:11,474
This week:13Up