df_pivot = df.pivot_table(index='index_date', columns=['portfolio',
    'portfolio_ccy', 'reporting_ccy']).swaplevel(0, 1, axis=1).sortlevel(axis=1
    )
df1 = pd.DataFrame({'index_date': ['12/07/2016', '12/07/2016', '12/07/2016',
    '12/07/2016', '12/07/2016'], 'portfolio': ['A', 'B', 'C', 'D', 'E'],
    'reporting_ccy': ['JPY', 'USD', 'USD', 'EUR', 'EUR'], 'portfolio_ccy':
    ['JPY', 'USD', 'USD', 'EUR', 'EUR'], 'amount': [13767.2522, 263.34, 
    395.01, 474.785901, 593.4823763], 'injection': [1, 2, 3, 4, 5],
    'to_usd': [0.009564, 1, 1, 1.1093, 1.1093], 'to_ccy': [1.3167, 1.3167, 
    1.3167, 1.3167, 1.3167], 'm5': [2, 4, 6, 8, 10], 'm6': [1, 3, 5, 7, 9]})
df_pivot.columns.names = ['portfolio', 'measures', 'portfolio_ccy',
    'reporting_ccy']
Pandas Design Considerations for MultiIndexed Dataframes