Calculating Through-the-Cycle generator matrix and transition counts using duration method
duration.TTC(lstCnt,lstFirmYears)
off-diagonal transition counts (matrix) for each time-step
firm years each time-step
Count Level Weighting - Construct TTC transition matrix from aggregate scaled and weighted counts data (transitions and 'firm-years').
Periodic Transition Matrix Level Weighting - Construct TTC transition matrix using the average of the weighted transition matrices from each time-step (Scaling is performed at the transition matrix level for each time-step).
Periodic Generator Matrix Level Weighting - Construct TTC transition matrix using the average of the weighted Generator matices from each time-step (Scaling is performed at the generator matrix level for each time-step).
Unscaled and UnWeighted Periodic Transition Matrices - Construction of unscaled and unweighted periodic transition matrices from unscaled and unweighted generator matrices for each time-step .
Weighted Generator Matrix - Average generator matrix from each time-step.
Scaled and Weighted Transitions - aggregate scaled and weighted transitions
Scaled and Weighted Firm Years - aggregate scaled and weighted firm years
Given data representing x off-diagonal transition counts for each time-step, this function combines those data to obtain average counts for each time-step, in such a way as to preserve the information while implementing a weighting scheme that would allow for the weighting of the historical experiences.
Let \(T(m,y)\) and \(F(m,y)\) represent the off-diagonal transition matrix and 'firm-years' vector, for month = \(m\) and year = \(y\), respectively. Then, $$T(m,y) = \{T_{ij}(m,y)\}_{i,j\,=\,1,\ldots,K}$$ $$F(m,y) = \{F_{i}(m,y)\}_{i\,=\,1,\ldots,K}$$
Many credit risk models require a long-run average PD estimate. This has been interpreted as meaning the data from multiple years should be combined and in a method capable of supporting some form of weighting of samples. The three methods of weighting considered for data generated via the duration method are:
Scale the number of transitions and firm counts/years using the a single year count to preserve dynamics, then average transitions and firms counts/years separately to create a generator matrix.
Estimate the single-year quantities (generator matrices for each time-step), then average across years
Average transition matrices from each time-step
The Markov property allows for direct weighting as each year can be regarded as distinct.
# NOT RUN {
#Set parameters
startDate <- "2000-01-01"
endDate <- "2005-01-01"
method <- "duration"
snapshots <- 4
interval <- 0
Example1<-getPIT(data,startDate, endDate,method, snapshots, interval)
ExampleTTC1<-duration.TTC(Example1$lstCntMat,Example1$lstInitVec)
# }
Run the code above in your browser using DataLab