How is the matrix constructed to represent the portfolio and scenarios?
The matrix P is constructed with rows representing assets and columns representing scenarios, and elements containing asset values under each scenario.