beneish

package module
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2023 License: MIT Imports: 1 Imported by: 0

README

Beneish Go package

A package to calculate M scores, as in Beneish, Lee Nichols 2013, Financial Analysts Journal.

Usage

Calculate an M-Score

mscore := MscoreCalc(
		2134,  // prevNetReceivables
		6242,  // prevAssets
		9006,  // prevCogs
		2201,  // prevPPE
		10727, // prevTotalAssets
		9842,  // prevSales
		474,   // prevDepr
		2140,  // prevSGA
		2716,  // prevLiabilities
		2011,  // prevTLTD
		2956,  // currNetReceivables
		6580,  // currAssets
		8377,  // currCogs
		2409,  // currPPE
		11203, // currTotalAssets
		11682, // currSales
		386,   // currDepr
		1310,  // currSGA
		1981,  // currLiabilities
		1946,  // currTLTD
		1094,  // currICO
		-82,   // currCFO
	)

The returned struct will have the complete M score, as well as the incremental indexes.

There are functions for each incremental index as well. For example:

dsri := Dsri(prevNetReceivables, currNetReceivables, prevSales, currSales)

Documentation

Index

Constants

View Source
const AQIcoef = 0.404
View Source
const BaseMScore = -4.84
View Source
const DEPIcoef = 0.115
View Source
const DSRIcoef = 0.92
View Source
const GMIcoef = 0.528
View Source
const LVGIcoef = 0.327
View Source
const SGAIcoef = 0.172
View Source
const SGIcoef = 0.892
View Source
const TATAcoef = 4.679

Variables

This section is empty.

Functions

func Aqi added in v0.1.1

func Aqi(
	prevAssets int64,
	prevPPE int64,
	prevTotalAssets int64,
	currAssets int64,
	currPPE int64,
	currTotalAssets int64,
) decimal.Decimal

Asset Quality Index (AQI) AQI = [1 - (Current Assets t + PP&E t) / Total Assets t] / = [1 - ((Current Assets t-1 + PP&E t-1) / Total Assets t-1)]

func Depi added in v0.1.1

func Depi(prevDepr int64, prevPPE int64, currDepr int64, currPPE int64) decimal.Decimal

Depreciation Index (DEPI) DEPI = (Depreciation t-1/ (PP&E t-1 + Depreciation t-1)) / (Depreciationt / (PP&Et + Depreciationt))

func Dsri added in v0.1.1

func Dsri(prevNetReceivables int64, currNetReceivables int64, prevSales int64, currSales int64) decimal.Decimal

Days Sales in Receivables Index (DSRI) DSRI = (Net Receivables t / Sales t) / (Net Receivables t-1 / Sales t-1)

func Gmi added in v0.1.1

func Gmi(prevSales int64, currSales int64, prevCogs int64, currCogs int64) decimal.Decimal

Gross Margin Index (GMI) GMI = [(Sales t-1 - COGS t-1) / Sales t-1] / [(Sales t - COGSt) / Sales t]

func Lvgi added in v0.1.1

func Lvgi(
	prevLiabilities int64,
	prevTLTD int64,
	prevTotalAssets int64,
	currLiabilities int64,
	currTLTD int64,
	currTotalAssets int64,
) decimal.Decimal

Leverage Index (LVGI) LVGI = [(Current Liabilities t + Total Long Term Debt t) / Total Assets t] / [(Current Liabilities t-1 + Total Long Term Debt t-1) / Total Assets t-1]

func Sgai added in v0.1.1

func Sgai(prevSGA int64, prevSales int64, currSGA int64, currSales int64) decimal.Decimal

Sales General and Administrative Expenses Index (SGAI) SGAI = (SG&A Expense t / Sales t) / (SG&A Expense t-1 / Sales t-1)

func Sgi added in v0.1.1

func Sgi(prevSales int64, currSales int64) decimal.Decimal

Sales Growth Index (SGI) SGI = Sales t / Sales t-1

func Tata added in v0.1.1

func Tata(currICO int64, currCFO int64, currTotalAssets int64) decimal.Decimal

Total Accruals to Total Assets (TATA) TATA = (Income from Continuing Operations t - Cash Flows from Operations t) / Total Assets t

Types

type Mscore added in v0.1.1

type Mscore struct {
	Dsri  decimal.Decimal
	Gmi   decimal.Decimal
	Aqi   decimal.Decimal
	Sgi   decimal.Decimal
	Depi  decimal.Decimal
	Sgai  decimal.Decimal
	Lvgi  decimal.Decimal
	Tata  decimal.Decimal
	Score decimal.Decimal
}

func MscoreCalc added in v0.1.1

func MscoreCalc(
	prevNetReceivables int64,
	prevAssets int64,
	prevCogs int64,
	prevPPE int64,
	prevTotalAssets int64,
	prevSales int64,
	prevDepr int64,
	prevSGA int64,
	prevLiabilities int64,
	prevTLTD int64,
	currNetReceivables int64,
	currAssets int64,
	currCogs int64,
	currPPE int64,
	currTotalAssets int64,
	currSales int64,
	currDepr int64,
	currSGA int64,
	currLiabilities int64,
	currTLTD int64,
	currICO int64,
	currCFO int64,
) *Mscore

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL