Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Balance cannot interpret "assets" parameter. #14

Open
jeongmincha opened this issue Aug 25, 2020 · 2 comments
Open

Balance cannot interpret "assets" parameter. #14

jeongmincha opened this issue Aug 25, 2020 · 2 comments

Comments

@jeongmincha
Copy link

Describe the bug
Even the first line of your example in the main README doesn't work.

To Reproduce

from autodcf.company import BalanceSheet, CashFlows, Company, IncomeStatement
from autodcf.models import SimpleDCF
balance_sheet = BalanceSheet(assets=100, liabilities=50)

Error Message:

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-3-d255612aabf1> in <module>
----> 1 balance_sheet = BalanceSheet(assets=100, liabilities=50)

TypeError: __init__() got an unexpected keyword argument 'assets'

Expected behavior
This code is expected not to make any error.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):
If specific to your OS, please specify which OS you are using [e.g. Windows, macOS, Ubuntu Linux, etc.]

Additional context
Add any other context about the problem here.

@Crazylegs85
Copy link

This issue seems old, but for anyone wondering about it I'm leaving a response.

It seems the example in the README.rst is incorrect. If you look in the balance_sheet.py file, or better yet run help(balance_sheet) in the REPL or Ipython session, you'll see that the assets and liabilities are read-only properties. All you need to do to continue with the example is fill-in the values for each of the parameters for the assets and liabilities. In my case, I just set everything to 10.00.

balance_sheet = BalanceSheet(cash=10.00,
                             short_term_investments=10.00,
                             net_receivables=10.00,
                             inventory=10.00,
                             other_current_assets=10.00,
                             ppe=10.00,
                             goodwill=10.00,
                             intangible_assets=10.00,
                             other_lt_assets=10.00,
                             accounts_payable=10.00,
                             accrued_liabilities=10.00,
                             short_term_debt=10.00,
                             current_part_lt_debt=10.00,
                             other_current_liabilities=10.00,
                             long_term_debt=10.00,
                             other_lt_liabilities=10.00,
                             deferred_lt_liabilities=10.00,
                             minority_interest=10.00,)

@jackmoody11
Copy link
Owner

Thanks for leaving this @Crazylegs85! I haven't been great about updating the documentation for this project. I was doing this more as a proof of concept, but it seems that people might actually be interested in using it.

If that is the case, I need to find a better way to allow users to load data. I'm open to any suggestions.

Repository owner deleted a comment from DylanZhu2021 Feb 23, 2024
Repository owner deleted a comment from technosoft-admin Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants