Hi,
I am trying to simulate data from the DCC model and I have to create matrices with some formulas. I am trying to create the first matrix, mQ, but I am getting the same error all the time. This is (part of) my code:
for i in range(iN):
for i in range(iN):
mQ[i,i] = np.ndarray(1 - dAlpha - dBeta) mS + np.ndarray(dAlpha (vEps[i-1] np.transpose(vEps[i-1]))) + (np.ndarray(dBeta) mQ[i-1])
I hope someone can help me, because I have no idea what to do!! And I also tried to calculate mQ without using np.ndarray but then sometimes I get the error: setting an array element with a sequence.
I can also upload my whole code if someone would like to see that in order to help me.
Hi, I am trying to simulate data from the DCC model and I have to create matrices with some formulas. I am trying to create the first matrix, mQ, but I am getting the same error all the time. This is (part of) my code:
iN = 10000 dOmega = 0.1 dAlpha = 0.05 dBeta = 0.94 vEps = np.random.normal(size=iN);
def computeMQ(iN, dAlpha, dBeta, mS, vEps, mQ): """ Purpose: Compute mQ
for i in range(iN): for i in range(iN): mQ[i,i] = np.ndarray(1 - dAlpha - dBeta) mS + np.ndarray(dAlpha (vEps[i-1] np.transpose(vEps[i-1]))) + (np.ndarray(dBeta) mQ[i-1])
I hope someone can help me, because I have no idea what to do!! And I also tried to calculate mQ without using np.ndarray but then sometimes I get the error: setting an array element with a sequence.
I can also upload my whole code if someone would like to see that in order to help me.
Thanks!!