**I. Estimation**

- Get data.
- Estimate parameters of stock prices; (52) and (53).
- Estimate parameters of interest rate dynamics (cf. Subsection 4.1).
- Compute the historical time series () by (57).
- Solve equations (50) and (49) for the historical ().
- Compute the covariance matrix ; (54).
- Compute the Cholesky decomposition of ; (47).

- Simulate future i.i.d. normal random variables and plug them into (48) to get the simulated ().
- Plug the into (50) and (49) to get the simulated scenario of stock prices and interest rate model factors ().
- Plug the factors into (38) or (39) to get spot rates or bond prices.
- Reiterate the above three steps to get a large set of market scenarios.

- Choose (or assume to be given) a certain portfolio.
- Compute portfolio values (e.g. by (1)) using the scenarios generated in step II.
- Compute the risk and performance measures (10), (12) and (15) by the empirical portfolio distributions obtained; cf. (31) to (33).
- If necessary, compute the partial derivatives (23), (24) and (25).

- Use a GS or SI method repeating step III for each new portfolio.

Note that the simulation procedure (=scenario generation; step II) must only be done once. The optimization loops use the same set of scenarios for alternating portfolios.