Skip to content

Commit c99b997

Browse files
lint
1 parent f82fafb commit c99b997

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

examples_synthetic/synthetic_data_portfolio.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,21 +52,21 @@
5252
pre = _lz_ema_spre_update(m=pre, x=x, update_precision=False, lmbd=lmbd, phi=phi)
5353
pre = _lz_ema_spre_update(m=pre, x=tiny_data[-1, :], update_precision=True, lmbd=lmbd, phi=phi)
5454

55-
lz_pre = pre['pre']
56-
# lz_cov = np.linalg.inv(lz_pre)
55+
lz_pre = pre['spre']
56+
lz_cov = np.linalg.inv(lz_pre)
5757

5858
# Portfolios
5959
n_dim = np.shape(big_data)[1]
6060
wones = np.ones(shape=(n_dim,1))
6161

6262
if LONG_ONLY:
63-
w_lz = long_from_pre(pre['pre'], as_dense=True)
63+
w_lz = long_from_pre(pre['spre'], as_dense=True)
6464
w_ridge = long_from_pre(ridge_pre, as_dense=True)
6565
w_affine = long_from_pre(affine_pre, as_dense=True)
6666
w_shrink = long_from_pre(shrink_pre, as_dense=True)
6767
w_perfect = long_from_pre(true_pre, as_dense=True)
6868
else:
69-
w_lz = normalize( np.squeeze(np.matmul( pre['pre'],wones )) )
69+
w_lz = normalize( np.squeeze(np.matmul( pre['spre'],wones )) )
7070
w_ridge = normalize( np.squeeze(np.matmul( ridge_pre, wones)))
7171
w_affine = normalize(np.squeeze(np.matmul(affine_pre, wones)))
7272
w_shrink = normalize(np.squeeze(np.matmul( shrink_pre, wones)))

examples_timeseries/ensembling_timeseries.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def evaluate_lz(df, n_adj,n_cov, n_test, do_plot):
8787
pre = _lz_ema_spre_update(m=pre, x=x, update_precision=False, lmbd=lmbd, phi=phi)
8888
pre = _lz_ema_spre_update(m=pre, x=cov_data[-1, :], update_precision=True, lmbd=lmbd, phi=phi)
8989

90-
lz_pre = pre['pre']
90+
lz_pre = pre['spre']
9191
try:
9292
lz_cov = np.linalg.pinv(lz_pre)
9393
except:

0 commit comments

Comments
 (0)