pyfolio
pyfolio copied to clipboard
Index naming error in capacity.py
Running .create_capacity_tear_sheet() raises an index naming error in capacity.py.
The following lines inside get_max_days_to_liquidate_by_ticker()
are causing the error:
liq_desc.index.levels[0].name = 'symbol'
liq_desc.index.levels[1].name = 'date'
I am guessing the error is due to this syntax being no longer supported in pandas. Replacing the above with liq_desc.index.names = ['symbol', 'date']
seems to solve the problem.
I wish I knew how to formally test this and submit a pull request but I don't.