CCOPULA Procedure

Example 8.2 Copula Analysis of Stock Returns

In this example, the correlations of daily returns on the large capital stocks Microsoft, Coca-Cola, IBM, Duke Energy, and British Petroleum are modeled using a t copula. To model the correlations, these companies’ stock prices are first converted into returns by using the following DATA step:

data allreturns;
   format date MMDDYY10.;
   input date:MMDDYY10. price_ibm price_msft price_bp price_ko price_duk;
   ret_msft = price_msft/lag(price_msft)-1;
   ret_ko   = price_ko/lag(price_ko)-1;
   ret_ibm  = price_ibm/lag(price_ibm)-1;
   ret_duk  = price_duk/lag(price_duk)-1;
   ret_bp   = price_bp/lag(price_bp)-1;
   if ret_msft ^= .;
   keep date ret_ibm ret_msft ret_bp ret_ko ret_duk;
datalines;
01/02/2008    99.91   33.48   62.78   56.91   17.13
01/03/2008   100.11   33.62   63.98   57.50   17.19
01/04/2008    96.52   32.68   63.05   57.61   17.18
01/07/2008    95.49   32.90   64.18   58.97   17.62

   ... more lines ...   

The stock return data can then be visualized and used to estimate the parameters of a t copula by using the following code:

/* Copula estimation and simulation of returns */
proc ccopula data = mylib.allreturns;
   var ret_ibm ret_msft ret_bp ret_ko ret_duk;
   * fit t-copula to stock returns;
   fit T / marginals  = empirical
           method     = MLE
           plots = (datatype = both);
run;
proc ccopula;
   var x1-x5;
   define t t(df=5);
   simulate t / ndraws=603 seed=100 outuniform=mylib.copuniform plots;
run;

proc ccopula data=mylib.copuniform;
   var x1-x5;
   fit T / marginals = uniform
           method    = MLE
           plots = (datatype = uniform);
run;

The output from these statements is shown in Output 8.2.1.

Output 8.2.1: Copula Estimation

The CCOPULA Procedure

Model Fit Summary
Number of Observations603
Data SetALLRETURNS
Copula TypeT
Fit MethodMLE
MarginalsEmpirical
Empirical ApproximationAdaptive Binning
Adaptive Refinement Resolution1000
Adaptive Interpolation MethodLinear
Number of Adaptive Iterations4
Log Likelihood634.6931
Maximum Absolute Gradient1.596E-7
Number of Iterations7
Optimization MethodNewton-Raphson
AIC-1247.39
SBC-1198.97

Parameter Estimates
ParameterEstimateStandard
Error
t ValueApprox
Pr > |t|
DF3.6592990.32047411.42<.0001

Pearson Correlations Matrix
Variableret_ibmret_msftret_bpret_koret_duk
ret_ibm1.00000.64150.51950.50040.5023
ret_msft0.64151.00000.51370.49350.4388
ret_bp0.51950.51371.00000.40630.4278
ret_ko0.50040.49350.40631.00000.5266
ret_duk0.50230.43880.42780.52661.0000


The first table in Output 8.2.1, "Model Fit Summary," provides some general description of copula model estimation. The second table, "Parameter Estimates," provides point estimates and inference about copula parameters. In this example, the only parameter in this table is the number of degrees of freedom in the multivariate t distribution. The last table, "Correlation Matrix," contains estimates of copula model parameters.

The graphical output from the preceding statements is shown in Output 8.2.2 and Output 8.2.3.

Output 8.2.2: Original Data

Original Data


Output 8.2.3: Original Data Transformed into Uniform Marginals

Original Data Transformed into Uniform Marginals


Note that in Output 8.2.2, the most elliptical scatter plot, which is between IBM and Microsoft, indicates the strongest dependence. Similarly, in Output 8.2.3, graphs that are denser along the diagonal indicate the same thing.

Last updated: July 09, 2026