0

Hi, Ny friends,

This is my 2nd week to learn and wite codes in python. I encounter a debug error in the last line of code or SizeDiffE(k) = j

. I could not figure out? I am using SPE IDE 0.8.3 to debug.

for k in range(1, NoE):

for j in range(1, Nobs):

if j == 1:

if Price(j, k) > 0:

SizeDiffB(k) = j

elif j > 1 and j < Nobs:

if Price(j - 1, k) == 0 and Price(j, k) > 0:

# we find the begining of data point for equity k

SizeDiffB(k) = j

elif Price(j - 1, k) > 0 and Price(j, k) ==0:

# we find the end of data point for equity k

SizeDiffE(k) = j - 1

elif j == Nobs:

if Price(j, k) > 0:

SizeDiffE(k) = j

Thanks so much. please help.

John