You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the price goes down post investment, beangrow crashes with complex type error (sum of real and complex).
An investment that has the price drop after acquisition results in a complex rate of return that cannot be summed.
Removing the 9.00 USD Price on line 22 stops the crash.
Output:
INFO : Reading ledger: bug.bean
INFO : Processing account: Assets:US:Investments:XYZ
INFO : Writing details file: bug-returns/investments/Assets_US_Investments_XYZ.org
INFO : Writing returns dir for currency.XYZ: bug-returns/groups/currency.XYZ
DEBUG : top of Axes not in the figure, so title not moved
DEBUG : top of Axes not in the figure, so title not moved
Traceback (most recent call last):
File ".../scm/gh/beangrow/beangrow/compute_returns.py", line 105, in <module>
main()
File ".../scm/gh/beangrow/beangrow/compute_returns.py", line 86, in main
pricer = reports.generate_reports(account_data_map, config,
File ".../scm/gh/beangrow/beangrow/reports.py", line 551, in generate_reports
func()
File ".../scm/gh/beangrow/beangrow/reports.py", line 218, in write_returns_html
plots = plot_flows(
File ".../scm/gh/beangrow/beangrow/reports.py", line 415, in plot_flows
gamounts[-remaining_days:] += gflow
numpy.core._exceptions._UFuncOutputCastingError: Cannot cast ufunc 'add' output from dtype('complex128') to dtype('float64') with casting rule 'same_kind'
Version:
Beancount 2.3.4 (git:0003608e; 2021-12-05)
==> bug.bean <==
; -*- mode: beancount; fill-column: 9999; -*-
2000-01-01 commodity USD
2000-01-01 commodity XYZ
2000-01-01 open Equity:Opening-Balances
2000-01-01 open Assets:US:Investments:XYZ XYZ
2000-01-01 open Assets:US:Investments:Cash USD
2022-02-07 price XYZ 9.950 USD
2022-01-01 * "Opening"
Equity:Opening-Balances -10,000.00 USD
Assets:US:Investments:Cash 10,000.000 USD
2022-02-10 * " Make Investment"
Assets:US:Investments:XYZ 1000 XYZ { 10.00 USD, 2022-02-10 }
Assets:US:Investments:Cash -10,000.00 USD
closing: TRUE
; Change this to > 10.00 USD and it will not crash.
2022-02-14 price XYZ 9.00 USD
2022-02-28 price XYZ 11.00 USD
When the price goes down post investment,
beangrow
crashes with complex type error (sum of real and complex).An investment that has the price drop after acquisition results in a complex rate of return that cannot be summed.
Removing the 9.00 USD Price on line 22 stops the crash.
Output:
Version:
Beancount 2.3.4 (git:0003608e; 2021-12-05)
==> bug.bean <==
==> bug.conf <==
Bean Report Print output:
The text was updated successfully, but these errors were encountered: