Skip to content

Commit bf259a6

Browse files
authored
Merge pull request #41 from stephenhky/matmul
convert np.matmul to np.dot
2 parents f6ebff3 + 4bcf530 commit bf259a6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

finsim/portfolio/optimize/policy.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def optimize(self, r, cov, symbols=None):
107107
self.optimized_weights = self.optimized_sol.x
108108
self.optimized_sharpe_ratio = -self.optimized_sol.fun
109109
self.optimized_portfolio_yield = np.sum(self.optimized_weights * self.r)
110-
sqweights = np.matmul(
110+
sqweights = np.dot(
111111
np.expand_dims(self.optimized_weights, axis=1),
112112
np.expand_dims(self.optimized_weights, axis=0)
113113
)
@@ -158,7 +158,7 @@ def optimize(self, r, cov, symbols=None):
158158
self.optimized_weights = self.optimized_unnormalized_weights[:-1] / np.sum(self.optimized_unnormalized_weights[:-1])
159159
self.optimized_costfunction = -self.optimized_sol.fun
160160
self.optimized_portfolio_yield = np.sum(self.optimized_weights * self.r)
161-
sqweights = np.matmul(
161+
sqweights = np.dot(
162162
np.expand_dims(self.optimized_weights, axis=1),
163163
np.expand_dims(self.optimized_weights, axis=0)
164164
)
@@ -212,7 +212,7 @@ def optimize(self, r, cov, symbols=None):
212212
self.optimized_weights = self.optimized_unnormalized_weights[:-1] / np.sum(self.optimized_unnormalized_weights[:-1])
213213
self.optimized_costfunction = -self.optimized_sol.fun
214214
self.optimized_portfolio_yield = np.sum(self.optimized_weights * self.r)
215-
sqweights = np.matmul(
215+
sqweights = np.dot(
216216
np.expand_dims(self.optimized_weights, axis=1),
217217
np.expand_dims(self.optimized_weights, axis=0)
218218
)

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def package_description():
2525

2626
setup(
2727
name='finsim',
28-
version="0.9.2a1",
28+
version="0.9.2a2",
2929
description="Financial simulation and inference",
3030
long_description=package_description(),
3131
long_description_content_type='text/markdown',

0 commit comments

Comments
 (0)