enjine-com / mcos

Implementation of Monte Carlo Optimization Selection from the paper "A Robust Estimator of the Efficient Frontier"
MIT License
55 stars 18 forks source link

21 jackknife resampling #41

Closed peterwhiteenjine closed 4 years ago

moneygeek commented 4 years ago

Can you update the tests?

On Thu, May 7, 2020 at 6:31 AM peterwhiteenjine notifications@github.com wrote:

@peterwhiteenjine commented on this pull request.

In mcos/observation_simulator.py https://github.com/enjine-com/mcos/pull/41#discussion_r421505449:

  • def init(self, mu: np.array, cov: np.array, n_observations: int):
  • self.mu = mu
  • self.cov = cov
  • self.n_observations = n_observations
  • def simulate(self) -> (np.array, np.array):
  • x = np.random.multivariate_normal(self.mu.flatten(), self.cov, size=self.n_observations)
  • idx = np.arange(len(x))
  • cov_hat = np.sum(np.cov(x[idx!=i], rowvar=False) for i in range(len(x)))/float(len(x) - 1)

True, there are still len(x) samples

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/enjine-com/mcos/pull/41#discussion_r421505449, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAXTIXN6JOP4XQ2GS3RTMQ3RQKZ4NANCNFSM4MMWCYGQ .