2cfa771a3207863a4dab8219e3ab12d42837ab35,pypfopt/black_litterman.py,BlackLittermanModel,bl_returns,#BlackLittermanModel#,261

Before Change


        // Solve the linear system rather thatn invert everything
        A = tau_sigma_inv + P_omega_inv @ self.P
        b = tau_sigma_inv.dot(self.pi) + P_omega_inv.dot(self.Q)
        x = np.linalg.solve(A, b)
        return pd.Series(x.flatten(), index=self.tickers)

    def bl_cov(self):
        

After Change


        if self._A is None:
            self._A = (self.P @ self._tau_sigma_P) + self.omega
        b = self.Q - self.P @ self.pi
        post_rets = self.pi + self._tau_sigma_P @ np.linalg.solve(self._A, b)
        return pd.Series(post_rets.flatten(), index=self.tickers)

    def bl_cov(self):
        
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: robertmartin8/PyPortfolioOpt
Commit Name: 2cfa771a3207863a4dab8219e3ab12d42837ab35
Time: 2020-02-25
Author: martin.robertandrew@gmail.com
File Name: pypfopt/black_litterman.py
Class Name: BlackLittermanModel
Method Name: bl_returns


Project Name: scipy/scipy
Commit Name: 7ece73fd454209e91d50c70cc87e391f252d73ee
Time: 2015-02-21
Author: pav@iki.fi
File Name: benchmarks/benchmarks/linalg_solve_toeplitz.py
Class Name: SolveToeplitz
Method Name: time_solve_toeplitz


Project Name: scipy/scipy
Commit Name: 3e4fbf576924a6cfc7748db2036101ac5530adf2
Time: 2014-05-15
Author: andyfaff@gmail.com
File Name: scipy/optimize/tests/test__differential_evolution.py
Class Name: TestDifferentialEvolutionSolver
Method Name: test_rosen


Project Name: scipy/scipy
Commit Name: debca1233604a3be1526412e85c8471b07f4b157
Time: 2014-05-15
Author: andyfaff@gmail.com
File Name: scipy/optimize/_differentialevolution.py
Class Name:
Method Name: differential_evolution