Open SunnyHillSpaces opened 1 year ago
The error message says line 18 ind = ind[ind.droplevel('Portfolio') != cash_index]
is wrong becasue
the length of ind.droplevel('Portfolio')
is 64 and the length of cash_index
is 3 so pandas can't compare them.
modelx v0.21.0 would show local variabls such as ind
and pos
in the case above. See #73.
Hi
do you please know what can cause this error ?
FormulaError: Error raised during formula execution ValueError: ('Lengths must match to compare', (164,), (3,))
Formula traceback: 0: m_2022_06_30.xxx.bs[-1].Dividend(t=0, proxy_flag=False), line 5 ... 24: m_2022_06_30.xxx.asset[-1, True].BV(t=0, step=2, AoS_step=0, level=4), line 8 25: m_2022_06_30.xxx.asset[-1, True].BV_Instrument(t=0), line 10 26: m_2022_06_30.xxx.asset[-1, True].BV_Yield(t=0), line 18
Formula source: