Scénario de test & Cas d'usage
Simulation of correlated returns for two portfolios.
| 1 | |
| 2 | DATA mycas.risk_portfolios; |
| 3 | DO i = 1 to 2000; |
| 4 | u1 = rand('Normal'); |
| 5 | u2 = u1 * 0.7 + rand('Normal') * sqrt(1 - 0.7**2); |
| 6 | OUTPUT; |
| 7 | END; |
| 8 | |
| 9 | RUN; |
| 10 |
| 1 | |
| 2 | PROC CAS; |
| 3 | copula.copulaFit TABLE={name='risk_portfolios'} copula='T' var={'u1', 'u2'} store={name='riskStore', replace=true}; |
| 4 | |
| 5 | RUN; |
| 6 |
| 1 | |
| 2 | PROC CAS; |
| 3 | copula.copulaViewStore / instore={name='riskStore'} viewOptions={finalEstimates=true, correlations=true} outputTables={names={'FinalEstimates', 'Correlations'}}; |
| 4 | |
| 5 | RUN; |
| 6 |
The action successfully retrieves the model from 'riskStore'. It displays and saves only the 'FinalEstimates' and 'Correlations' tables to the CAS library, allowing the risk team to validate the correlation coefficient (approx 0.7) and degrees of freedom.