@classmethod
def fillna_panel(cls, panel):
    """
        Fills NaNs in the panel as follows:

        - nan volume becomes 0
        - close is forward-filled
        - open, high, low are forward-filled with the prior close

        Before:
                     open  high   low close volume
        2018-02-06  50.10 51.00 49.90 50.56  45100
        2018-02-07    NaN   NaN   NaN   NaN    NaN
        2018-02-08  48.89 48.99 46.58 47.20  90500

        After:
                     open  high   low close volume
        2018-02-06  50.10 51.00 49.90 50.56  45100
        2018-02-07  50.56 50.56 50.56 50.56      0
        2018-02-08  48.89 48.99 46.58 47.20  90500
        """
    panel = panel.swapaxes('items', 'minor')
    panel.volume.fillna(0, inplace=True)
    panel.close.fillna(method='ffill', inplace=True)
    panel.open = panel.open.fillna(panel.close.shift())
    panel.high = panel.high.fillna(panel.close.shift())
    panel.low = panel.low.fillna(panel.close.shift())
    panel = panel.swapaxes('items', 'minor')
    return panel
