#On the name of ALLAH and may the blessing and peace of Allah #be upon the Messenger of Allah Mohamed Salla Allahu Aliahi Wassalam. #Author : Fouad Teniou #Date : 07/03/09 #version :2.6.1 """ collections module's extras in python 2.6.1 were used in my program, DVMextrapolating DVMgordonsModel and CAPM subclasses of namedtuple Python class provide the cost of equity the calculation of the dividend growth g in two different ways, and the value of the company if the cost of equity Ke is known. I used an utility method and the try/exceptions statements to raise errors """ import math as m from collections import namedtuple class MyError: """ Demonstrate imporper operation on negative number""" def _negativeNumberException(self,*args): """ Utility method to raise a negative number exception""" for item in args: if item <0: raise ValueError,\ " python "C:\Users\Fouad Teniou\Documents\python\DVM_Versus_CAPM7.py" #♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦ #< Ke = 14.0% #♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦ #< Extrapolating Growth Model g = 0.12 #< Cost of equity Ke = 0.14 #< Market value of the share Po = \$13.44 #♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦ #< Gordon's Growth Model g = 0.056 #< Cost of equity Ke = 0.127 #< Market value of the share Po = \$2.68 #♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦ #< Extrapolating Growth Model g = 0.06 #< Cost of equity Ke = 7.5% #< Market value of the share Po = \$17.5 #♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦ #< Gordon's Growth Model g = 0.189 #< Cost of equity Ke = 30.3% #< Market value of the share Po = \$1.77 #♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦ #0.06 #7.5 #0.189 #30.3 #♣♣♣♣♣♣♣♣♣♣♣♣♣♣♣♣♣♣♣♣♣♣♣♣♣♣♣♣♣♣♣♣♣♣♣♣♣♣♣♣♣♣♣ #0.215 #c:\Python26> ########################################################################################## #Version : Python 3.2 #import math as m #from collections import namedtuple #class MyError: # """ Demonstrate imporper operation on negative number""" # def _negativeNumberException(self,*args): # """ Utility method to raise a negative number exception""" # # for item in args: # if item <0: # # raise ValueError("