[摘 要] 論文在給出債券久期概念的基礎上,建立了債券投資組合管理免疫策略的模型,并設計了求解該模型的計算程序,這樣可大大提高債券投資組合管理策略的計算效率。
[關鍵詞] 債券組合;免疫策略;程序實現
[中圖分類號]F232;F275.5[文獻標識碼]A[文章編號]1673-0194(2008)05-0043-02
1 債券久期
債券的久期是指收回債券的利息和本金的加權平均年數。其計算公式為:
2 債券投資組合管理免疫策略模型
免疫策略是債券的消極投資組合管理策略,是債券組合管理者不積極尋求交易的可能性而企圖戰勝市場的一種策略。它的基本假設是,債券市場是半有效性市場,債券的現時價格能準確地反映所有能獲得的信息。因此,免疫策略就是保護債券組合避免利率風險的一種策略。管理者選擇久期等于其負債(現金流出)的到期期限的債券組合,利用價格風險和再投資風險相互抵消的特點,保證不受損失。
3 債券投資組合管理免疫策略模型的程序實現
上述計算是一個麻煩的過程,為此筆者編制了一個VBA程序,簡化了上述的計算。VBA程序如下:
Sub 計算()
Dim n, i As Integer
Dim d1, d2, d3 As String
Dim myrange1, myrange2, myrange3, myrange4, myrange5 As String
n = Cells(6, 2)
Cells(15, 1) = \"債券計算\"
Cells(15, 1).HorizontalAlignment = xlCenter
Range(Cells(15, 1), Cells(15, 2)).Select
Selection.Merge
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
End With
Cells(16, 1) = \"現值\"
Cells(17, 1) = \"久期\"
Cells(16, 2) = Cells(3, 2) / Cells(7, 2)
Cells(17, 2) = (1 + Cells(7, 2)) / Cells(7, 2)
Range(Cells(16, 2), Cells(17, 2)).NumberFormat
= \"0.00\"
Range(Cells(17, 1), Cells(17, 2)).Select
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
End With
Cells(19, 1) = \"債券投資組合的計算\"
Cells(19, 1).HorizontalAlignment = xlCenter
Range(Cells(19, 1), Cells(19, 2 + n)).Select
Selection.Merge
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
End With
Cells(20, 1) = \"債券\"
Cells(20, 1).HorizontalAlignment = xlCenter
Cells(21, 1) = \"久期\"
Cells(22, 1) = \"投資比例\"
Cells(23, 1) = \"投資額\"
For i = 1 To n
Cells(20, 1 + i) = \"債券\" i
Cells(20, 1 + i).HorizontalAlignment = xlCenter
Next i
Cells(20, 2 + n) = \"組合\"
Cells(20, 2 + n).HorizontalAlignment = xlCenter
Range(Cells(23, 1), Cells(23, 2 + n)).Select
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
End With
d1 = \"2000/1/1\"
d2 = \"/1/1\"
d3 = \"\"\"\"
For i = 1 To n
xx = 2000 + Cells(12, 1 + i)
Cells(21, 1 + i) = \"=duration(\" d3 d1 d3 \",\" d3 xx d2 d3 \",\" Chr(65 + i) 11 \",b7,\" Chr(65 + i) 13 \")\"
Cells(21, 1 + i).NumberFormat = \"0.00\"
Next i
myrange1 = \"b21:\" Chr(65 + n) 21 '各個債券久期數據區域
myrange2 = \"b22:\" Chr(65 + n) 22 '各個債券投資比例計算結果數據區域
Cells(21, 2 + n) = \"=sumproduct(\" myrange1 \",\" myrange2 \")\"
Cells(22, 2 + n) = \"=sum(\" myrange2 \")\"
Range(myrange2).NumberFormat = \"0.00%\"
myrange3 = Chr(66 + n) 22
Range(myrange3).NumberFormat = \"0.00%\"
myrange4 = \"b17\"
myrange5 = Chr(66 + n) 21
Range(myrange5).NumberFormat = \"0.00\"
'開始利用規劃求解工具計算
SolverReset
SolverOk setcell:=myrange3, MaxminVal:=3, ValueOf:=\"1\", byChange:=myrange2
SolverAdd CellRef:=myrange5, Relation:=2, FormulaText:=myrange4
SolverAdd CellRef:=myrange2, Relation:=3, FormulaText:=\"0\"
SolverSolve
For i = 1 To n
Cells(23, 1 + i) = Cells(16, 2) * Cells(22, 1 + i)
Next i
Cells(23, 2 + n) = Cells(16, 2)
Range(Cells(23, 2), Cells(23, 2 + n)).NumberFormat = \"0.00\"
End Sub
注意:在調用上述包含SolverOk()、SolverAdd()等函數的程序之前,必須先建立一個對規劃求解的引用,保持Visual Basic模塊在激活狀態,點擊工具菜單中的引用,然后瀏覽并找到Solver.xla(這個工具通常放在\\Office\\Library目錄下)。
注:“本文中所涉及到的圖表、注解、公式等內容請以PDF格式閱讀原文?!?/p>