I am getting the following error when trying to create a matrix which I can pass to the DLM instruction:

## SX26. Matrix Constructed with ||...|| has Too Complicated a Type

>>>> ||<<<<

The matrix has one parameter estimate which is a wrapped up in a function (similar to the Nelson-Siegal model), the vector tau has some numbers in it which I want to index:

- Code: Select all

dec vect tau_f(7)

dec vect tau_s(7)

dec real tenor

dofor tenor = 120 3 12 12 24 12 24

compute tau_f(%doforpass) = tenor

end dofor tenor

dofor tenor = 0 0 0 0 12 0 12

compute tau_s(%doforpass) = tenor

end dofor tenor

frml Cf = ||1.0,-((exp(-lambda*tau_s(1))-exp(-lambda*tau_f(1)))/(tau_f(1)-tau_s(1))),((tau_s(1)*exp(-lambda*tau_s(1))-tau_f(1)*exp(-lambda*tau_f(1)))/(tau_f(1)-tau_s(1)))+((exp(-lambda*tau_s(1))-exp(-lambda*tau_f(1)))/(tau_f(1)-tau_s(1))),0.0,0.0,0.0|$

||1.0,-((exp(-lambda*tau_s(2))-exp(-lambda*tau_f(2)))/(tau_f(2)-tau_s(2))),((tau_s(2)*exp(-lambda*tau_s(2))-tau_f(2)*exp(-lambda*tau_f(2)))/(tau_f(2)-tau_s(2)))+((exp(-lambda*tau_s(2))-exp(-lambda*tau_f(2)))/(tau_f(2)-tau_s(2))),0.0,0.0,0.0|$

||1.0,-((exp(-lambda*tau_s(3))-exp(-lambda*tau_f(3)))/(tau_f(3)-tau_s(3))),((tau_s(3)*exp(-lambda*tau_s(3))-tau_f(3)*exp(-lambda*tau_f(3)))/(tau_f(3)-tau_s(3)))+((exp(-lambda*tau_s(3))-exp(-lambda*tau_f(3)))/(tau_f(3)-tau_s(3))),0.0,0.0,0.0|$

||1.0,-((exp(-lambda*tau_s(4))-exp(-lambda*tau_f(4)))/(tau_f(4)-tau_s(4))),((tau_s(4)*exp(-lambda*tau_s(4))-tau_f(4)*exp(-lambda*tau_f(4)))/(tau_f(4)-tau_s(4)))+((exp(-lambda*tau_s(4))-exp(-lambda*tau_f(4)))/(tau_f(4)-tau_s(4))),0.0,0.0,0.0|$

||1.0,-((exp(-lambda*tau_s(5))-exp(-lambda*tau_f(5)))/(tau_f(5)-tau_s(5))),((tau_s(5)*exp(-lambda*tau_s(5))-tau_f(5)*exp(-lambda*tau_f(5)))/(tau_f(5)-tau_s(5)))+((exp(-lambda*tau_s(5))-exp(-lambda*tau_f(5)))/(tau_f(5)-tau_s(5))),0.0,0.0,0.0|$

||1.0,-((exp(-lambda*tau_s(6))-exp(-lambda*tau_f(6)))/(tau_f(6)-tau_s(6))),((tau_s(6)*exp(-lambda*tau_s(6))-tau_f(6)*exp(-lambda*tau_f(6)))/(tau_f(6)-tau_s(6)))+((exp(-lambda*tau_s(6))-exp(-lambda*tau_f(6)))/(tau_f(6)-tau_s(6))),0.0,0.0,0.0|$

||1.0,-((exp(-lambda*tau_s(7))-exp(-lambda*tau_f(7)))/(tau_f(7)-tau_s(7))),((tau_s(7)*exp(-lambda*tau_s(7))-tau_f(7)*exp(-lambda*tau_f(7)))/(tau_f(7)-tau_s(7)))+((exp(-lambda*tau_s(7))-exp(-lambda*tau_f(7)))/(tau_f(7)-tau_s(7))),0.0,0.0,0.0||

Do I need to hard enter the tau values?