Scénario de test & Cas d'usage
Creation of the Pearson correlation matrix representing the dependency between Equities (Asset1) and Bonds (Asset2).
| 1 | DATA asset_corr; |
| 2 | LENGTH _name_ $ 8 _type_ $ 4; |
| 3 | _name_ = 'Asset1'; _type_='CORR'; Asset1=1.0; Asset2=0.4; OUTPUT; |
| 4 | _name_ = 'Asset2'; _type_='CORR'; Asset1=0.4; Asset2=1.0; OUTPUT; |
| 5 | RUN; |
| 6 | |
| 7 | PROC CASUTIL; |
| 8 | load DATA=asset_corr casout='asset_corr' replace; |
| 9 | QUIT; |
| 1 | PROC CAS; |
| 2 | copula.copulaSimulate / |
| 3 | define={copulaType='NORMAL', corrTable={name='asset_corr'}}, |
| 4 | ndraws=50000, |
| 5 | seed=12345, |
| 6 | var={'Asset1', 'Asset2'}, |
| 7 | outuniform={name='simulated_returns', replace=true}; |
| 8 | RUN; |
| 9 | QUIT; |
A CAS table 'simulated_returns' is generated containing 50,000 rows with two columns (Asset1, Asset2). The data follows the specified correlation structure (0.4) with uniform marginal distributions, reproducible via the seed.