diff --git a/Math/Finance/FinanceFormulas.php b/Math/Finance/FinanceFormulas.php index e180935f9..e9496f292 100644 --- a/Math/Finance/FinanceFormulas.php +++ b/Math/Finance/FinanceFormulas.php @@ -1397,4 +1397,36 @@ class FinanceFormulas return $P * $r * $t; } + /** + * Relative market share by share + * + * @param float $ownShare Own market share + * @param float $competitorShare Largest competitor market share + * + * @return float + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public static function getRelativeMarketShareByShare(float $ownShare, float $competitorShare) : float + { + return $ownShare / $competitorShare; + } + + /** + * Relative market share by sales + * + * @param float $ownSales Own sales + * @param float $competitorSales Largest competitor sales + * + * @return float + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public static function getRelativeMarketShareBySales(float $ownSales, float $competitorSales) : float + { + return $ownSales / $competitorSales; + } + }