jtloong / chow_test

Python module to calculate time series Chow break statistics.
30 stars 10 forks source link

Bug #3

Open csselo opened 3 years ago

csselo commented 3 years ago

Traceback (most recent call last): File "jtest.py", line 751, in day_trade(config.mode, start_date, end_date, tend_date, ttime, myporset) File "jtest.py", line 663, in day_trade test(ts, start_date, end_date, tend_date, por, mode) File "jtest.py", line 200, in test chowarr = chow(lastnarr, len(lastnarr2)) File "jtest.py", line 398, in chow p = chow_test.p_value(y1, x1, y2, x2) File "C:\Users\Dr.Tekgeçer\AppData\Local\Programs\Python\Python36\lib\site-packages\chowtest_init.py", line 41, in p_value F = f_value(y1, x1, y2, x2, **kwargs) File "C:\Users\Dr.Tekgeçer\AppData\Local\Programs\Python\Python36\lib\site-packages\chowtest_init.py", line 31, in f_value rss_total, n_total = find_rss(np.append(y1, y2), np.append(x1, x2)) File "C:\Users\Dr.Tekgeçer\AppData\Local\Programs\Python\Python36\lib\site-packages\chowtest_init.py", line 26, in find_rss rss = np.linalg.lstsq(A, y, rcond=None)[1] File "<_array_function_ internals>", line 6, in lstsq File "C:\Users\Dr.Tekgeçer\AppData\Local\Programs\Python\Python36\lib\site-packages\numpy\linalg\linalg.py", line 2259, in lstsq x, resids, rank, s = gufunc(a, b, rcond, signature=signature, extobj=extobj) File "C:\Users\Dr.Tekgeçer\AppData\Local\Programs\Python\Python36\lib\site-packages\numpy\linalg\linalg.py", line 109, in _raise_linalgerror_lstsq raise LinAlgError("SVD did not converge in Linear Least Squares") numpy.linalg.LinAlgError: SVD did not converge in Linear Least Squares

jtloong commented 3 years ago

Do you have any sample data/code to replicate this problem?