DCF icon indicating copy to clipboard operation
DCF copied to clipboard

ValueError on running the example code

Open cryptCEE opened this issue 2 years ago • 4 comments

python main.py --t AAPL --i 'quarter' --y 3 --eg .15 --steps 2 --s 0.1 --v eg --apikey <deleted>

Traceback (most recent call last): File "main.py", line 112, in main(args) File "main.py", line 33, in main cond, dcfs = run_setup(args, variable = 'eg') File "main.py", line 66, in run_setup dcfs[step] = historical_DCF(args.t, args.y, args.p, args.d, args.eg, args.cg, args.pg, args.i, args.apikey) File "/.../DCF/modeling/dcf.py", line 70, in historical_DCF dcf = DCF(ticker, File "/.../DCF/modeling/dcf.py", line 20, in DCF enterprise_val = enterprise_value(income_statement, File "/.../DCF/modeling/dcf.py", line 152, in enterprise_value ebit = float(income_statement[0]['EBIT']) ValueError: could not convert string to float: ''

cryptCEE avatar Sep 20 '21 23:09 cryptCEE

that's may because of income_statement[0]['EBIT'] is empty from the source data

yangfengKAUST avatar Jan 16 '22 09:01 yangfengKAUST

I think it works for me -- still having this issue?

halessi avatar Jan 29 '22 20:01 halessi

I have the same issue.

timojuez avatar May 18 '22 08:05 timojuez

Reason is that the nice people from financialmodelingprep do not provide the most recent EBIT anymore. I am going to make a pull request to your repo.

timojuez avatar May 18 '22 17:05 timojuez