UsageΒΆ
There are a few important classes which will help you build your DCF.
The Company
class encapsulates three classes: BalanceSheet
, CashFlows
,
and IncomeStatement
. Once a Company
object is created using the 3
financial statements, this can be passed to one of the DCF models (currently either SimpleDCF
or DCF
).
In [1]: from autodcf.company import BalanceSheet, CashFlows, Company, IncomeStatement
In [2]: from autodcf.models import SimpleDCF
In [3]: balance_sheet = BalanceSheet(cash=10,
...: short_term_investments=5,
...: net_receivables=10,
...: inventory=5,
...: other_current_assets=5,
...: ppe=30,
...: goodwill=10,
...: intangible_assets=20,
...: other_lt_assets=0,
...: accounts_payable=5,
...: accrued_liabilities=9,
...: short_term_debt=6,
...: current_part_lt_debt=4,
...: long_term_debt=14,
...: other_current_liabilities=2,
...: other_lt_liabilities=2,
...: deferred_lt_liabilities=3,
...: minority_interest=5)
...:
In [4]: cash_flows = CashFlows(capex=3)
In [5]: income_statement = IncomeStatement(sales=100,
...: cogs=50,
...: sga=25,
...: rd=0,
...: depreciation=4,
...: amortization=2,
...: interest=0,
...: nonrecurring_cost=3,
...: tax=4)
...:
In [6]: company = Company(balance_sheet=balance_sheet,
...: cash_flows=cash_flows,
...: income_statement=income_statement,
...: price_per_share=2.00,
...: fully_diluted_shares=100)
...:
In [7]: simple_dcf = SimpleDCF(change_in_nwc_to_change_in_sales=0.1,
...: company=company,
...: discount_rate=0.14,
...: sales_growth=0.03,
...: tax_rate=0.21,
...: terminal_growth_rate=0.03,
...: window=5)
...:
In [8]: forecast = simple_dcf.forecast()
In [9]: forecast
Out[9]:
Year Sales COGS ... Change in NWC FCF Discounted FCF
-1 2019 100.000000 50.000000 ... 0.000000 18.000000 NaN
0 2020 103.000000 51.500000 ... 0.300000 18.250300 18.250300
1 2021 106.090000 53.045000 ... 0.309000 18.797809 16.489306
2 2022 109.272700 54.636350 ... 0.318270 19.361743 14.898233
3 2023 112.550881 56.275441 ... 0.327818 19.942596 13.460684
4 2024 115.927407 57.963704 ... 0.337653 20.540873 12.161846
5 2025 119.405230 59.702615 ... 0.347782 21.157100 10.988335
[7 rows x 18 columns]
In [10]: round(simple_dcf.enterprise_value, 2)
Out[10]: 87.810000000000002
In [11]: round(simple_dcf.equity_value, 2)
Out[11]: 82.810000000000002