설명
CreditImmunization.gms: 회사채에 대한 인자 예방접종 모델. 콘실리오, 닐슨, 제니오스. 실제 재무 최적화: 슬롯 사이트 모델 라이브러리, 섹션 4.6 최종 수정 날짜: 2008년 4월.
카테고리 : 슬롯 사이트 FIN 라이브러리
메인파일 : 슬롯 사이트gms 포함: BondAndLiabilityData.inc CreditYieldRates.inc FactorLoadings.inc TimeDefinitionSets.inc
$title Factor 회사채 예방접종 모델
* CreditImmunization.gms: 회사채에 대한 인자 예방접종 모델.
* Consiglio, Nielsen 및 Zenios.
* 실제 재무 최적화: 슬롯 사이트 모델 라이브러리, 섹션 4.6
* 최종 수정일: 2008년 4월.
세트
i 최대 증권 수 /Bond-1 * Bond-13/
j 요인 위험 유형 /이동, 기울기, 곡선/
class 등급 등급 /AAA, B3/
ja(j) 활성 인자;
스칼라
BaseDate 가장 빠른 책임 날짜입니다.
$include "TimeDefinitionSets.inc"
$include "CreditYieldRates.inc"
* 지속적인 수익률
수익률(ty,class,'수익률')= log( 1 + ( 수익률(ty,class,'이자') /100 ) ) * 100;
디스플레이 수율;
$include "BondAndLiabilityData.inc"
매개변수
rl(tl,class) 부채이자율
pl(class) 부채의 현재 가치
r(ts,class) 채권의 현재 수익률
cf(ts,i,class) 채권의 현금흐름
p(i,class) 채권의 현재가치(현재가격)
pv(i,class) 채권 현금흐름의 현재가치
k(i,class) 채권의 달러 듀레이션;
BaseDate = SMIN(tl, jdate(LiabData(tl,'년'),LiabData(tl,'월'),LiabData(tl,'일')));
DISPLAY 기준 날짜;
* 시점을 일 단위에서 연도 단위로 변환합니다.
LiabData(tl,'일') = jdate(LiabData(tl,'년'),LiabData(tl,'월'),LiabData(tl,'일')) - BaseDate;
LiabData(tl,'term') = LiabData(tl,'일')/365;
stime(ts,'일') = jdate(stime(ts,'년'),stime(ts,'월'),
stime(ts,'day'))- BaseDate;
stime(ts,'기간') = stime(ts,'일') / 365;
* 해당 날짜의 부채 및 채권에 대한 기간 구조 데이터를 계산합니다.
* 보간법 사용:
LOOP( (tl,ty,class)$(yield(ty,class,"term") eq trunc(LiabData(tl,"term"))),
rl(tl,class) = ( 수율(ty,class,"수율" ) +
( Yield(ty+1,class,"수율") - Yield(ty,class,"수율") ) /
( Yield(ty+1,class,"term") - Yield(ty,class,"term") ) * ( LiabData(tl,"term") - Yield(ty,class,"term") ) ) / 100
);
LOOP( (ts,ty,class)$(yield(ty,class,"term") eq trunc(stime(ts,"term"))),
r(ts,class) = ( Yield(ty,class,"interest" ) +
( Yield(ty+1,class,"interest" ) - Yield(ty,class,"interest") ) /
( Yield(ty+1,class,"term") - Yield(ty,class,"term") ) * ( stime(ts,"term") - Yield(ty,class,"term") ) ) / 100
);
DISPLAY rl,r,yield,LiabData;
pl(class) = SUM( tl, LiabData(tl,'liability') * exp(-rl(tl,class)*LiabData(tl,'term')) );
cf(ts,i,class) = BondData(ts,i,class);
p(i,class) = BondData('price',i,class) + BondData('accr',i,class) ;
pv(i,class) = SUM( ts, cf(ts,i,class) * ( 1 + r(ts,class)/2 )**( -2*stime(ts,'term') ) );
k(i,class) = -SUM( ts, cf(ts,i,class) * stime(ts,'term') * ( 1 + r(ts,class)/2 )**(-2*stime(ts,'term') - 1) );
* 참고: (4) 액면가를 표시하기 위해 10 단위로 조정된 달러 금액입니다.
* (5) 현재가치를 나타내기 위해 사용되는 현재가격.
* (6) 달러 듀레이션과 달러 볼록성은 반기 복리를 사용합니다.
디스플레이 k;
$include "FactorLoadings.inc"
매개변수
sfac(ts,class,j) 유가 증권 기간에 대한 보간된 인자 로딩
lfac(tl,class,j) 부채 기간에 대한 보간된 인자 로딩
f(i,j,class) 유가증권의 요인 민감도
fl(j,class) 부채의 요소 민감도 ;
스칼라
주어진 요소 책임으로부터의 제곱 편차에 대한 람다 페널티;
LOOP( (ts,tf,class)$( a(tf,class,"term") eq trunc(stime(ts,"term"))),
sfac(ts,클래스,j) = ( a(tf,클래스,j) + ( a(tf+1,클래스,j) - a(tf,클래스,j) ) /
( a(tf+1,class,"term") - a(tf,class,"term") ) * (stime(ts,"term")-a(tf,class,"term") ) ) / 100
);
LOOP( (tl,tf,class)$(a(tf,class,"term") eq trunc(LiabData(tl,"term"))),
lfac(tl,클래스,j) = ( a(tf,클래스,j) + ( a(tf+1,클래스,j) - a(tf,클래스,j) ) /
( a(tf+1,class,"term") - a(tf,class,"term") ) * ( LiabData(tl,"term") - a(tf,class,"term") ) ) / 100
);
f(i,j,class) = - SUM( ts, sfac(ts,class,j) * cf(ts,i,class) * stime(ts,"term") *
( 1 + r(ts,class)/2 )**( -2*stime(ts,'term')-1 ) );
fl(j,"AAA") = - SUM( tl, lfac(tl,"AAA",j) * LiabData(tl,"부채") * LiabData(tl,"term") * exp(-rl(tl,"AAA")*LiabData(tl,"term")) );
fl(j,"B3") = - SUM( tl, lfac(tl,"B3",j) * LiabData(tl,"부채")/100 * LiabData(tl,"term") * exp(-rl(tl,"B3")*LiabData(tl,"term")) );
양수 변수
x(i,class) 채권 보유(액면가);
양수 변수
long(i,class) 채권 보유량(액면가)
short(i,class) 채권 보유량(액면가);
변수
z 목적 함수 값
편차(j,class) 해당 책임 요소 수준의 편차입니다.
방정식
PresentValueMatchOne 자산과 부채의 현재 가치를 일치시키는 방정식
PresentValueMatchTwo 자산과 부채의 현재 가치를 일치시키는 방정식
DurationMatchOne(j,class) 각 신용 등급에 대한 자산 및 부채의 요소 지속 기간을 일치시키는 방정식
DurationMatchTwo(j,class) 각 신용 등급에 대한 자산 및 부채의 요소 지속 기간을 일치시키는 방정식
DeviationsEq(j,class) 해당 책임 요소와의 편차를 정의하는 방정식
xDef(i,class) 자산 배분을 매수 포지션과 매도 포지션의 합으로 정의하는 방정식
공매도된 채권의 양을 제한하는 xShort 방정식
ObjDefOne 목적 함수 정의(AAA 채권만 해당)
ObjDefTwo 목적 함수 정의(두 학점 클래스 모두)
ObjDefThree 목적 함수 정의(편차 제곱의 합도 최소화)
ObjDefOne .. z =E= SUM(i, k(i,"AAA")* ( BondData('yield',i,"AAA") / 100 ) * x(i,"AAA") );
ObjDefTwo .. z =E= SUM((i,class), k(i,class) * ( BondData('yield',i,class) / 100 ) * x(i,class) );
ObjDefThree .. z =E= (SUM(i, k(i,"AAA")* ( BondData('yield',i,"AAA") / 100 ) * x(i,"AAA") ) +
람다 * SUM((ja,class), SQR(편차(ja,class))))/1000000;
PresentValueMatchOne .. SUM(i, pv(i,"AAA")*x(i,"AAA")) =E= pl("AAA");
DurationMatchOne(ja,"AAA") .. SUM(i, f(i,ja,"AAA")*x(i,"AAA")) =E= fl(ja,"AAA");
PresentValueMatchTwo .. SUM((i,class), pv(i,class)*x(i,class)) =E= pl("AAA");
DurationMatchTwo(ja,class) .. SUM(i, f(i,ja,class)*x(i,class)) =E= fl(ja,"AAA");
편차Eq(ja,class) .. 편차(ja,class) =E= SUM(i, f(i,ja,class)*x(i,class))- fl(ja,"AAA");
xDef(i,class).. x(i,class) =E= long(i,class) - short(i,class);
xShort .. SUM((i,class), short(i,class)) =L= 5000.0;
모델 FactorCreditOne 'PFO 모델 4.5.1' /ObjDefOne, PresentValueMatchOne, DurationMatchOne/;
MODEL FactorCreditTwo /ObjDefTwo, PresentValueMatchTwo, DurationMatchTwo/;
모델 FactorCreditThree /ObjDefTwo, PresentValueMatchTwo, DurationMatchTwo, xDef, xShort/;
모델 FactorCreditFour /ObjDefThree, PresentValueMatchTwo, DeviationsEq/;
ja( "시프트" ) = 예;
ja( "기울기" ) = 예;
ja( "곡선" ) = 예;
옵션 LIMROW = 100, LIMCOL = 100;
PARAMETER 요약보고서;
LP 사용을 최소화하는 FactorCreditOne 해결;
SummaryReport(class,i,'one') = x.l(i,class);
SummaryReport('model','status','one') = FactorCreditOne.MODELSTAT;
LP 사용을 최소화하는 FactorCreditTwo 해결;
SummaryReport(class,i,'two') = x.l(i,class);
SummaryReport('model','status','two') = FactorCreditTwo.MODELSTAT;
DISPLAY i,pv,pl,f,fl,x.L;
x.LO(i,class) = -INF;
LP를 사용하여 z 최소화하는 FactorCreditThree 해결;
SummaryReport(class,i,'3') = x.l(i,class);
SummaryReport('모델','status','3') = FactorCreditThree.MODELSTAT;
DISPLAY ja,클래스,x.L;
x.LO(i,클래스) = 0.0;
람다 = 2;
NLP를 사용하여 z 최소화하는 FactorCreditFour 해결;
SummaryReport(class,i,'four') = x.l(i,class);
SummaryReport('모델','status','4') = FactorCreditFour.MODELSTAT;
DISPLAY x.L,편차.L,fl;
DISPLAY 요약보고서;
임베디드 코드 연결:
- 슬롯 사이트리더:
기호: [ 이름: 요약 보고서 ]
- 엑셀작성기:
파일: CreditSummary.xlsx
기호: [ 이름: SummaryReport, 범위: Sheet!A1 ]
endEmbeddedCode