mirror of
https://github.com/wassname/catalyst.git
synced 2026-06-27 21:51:37 +08:00
BUG: Use empyrical patches for persisting issue #126
The referenced issue was addressed via importing a set of patches for empyrical. However the same error occurs occasionally when calling the empyrical functions inside "/catalyst/finance/risk/period.py". This PR simply applies 2 of the same patches in period.py. I have only experienced problems with cum_returns and max_drawdown thus far, but it is likely the other patches may be needed.
This commit is contained in:
@@ -29,13 +29,15 @@ from .risk import check_entry
|
||||
from empyrical import (
|
||||
alpha_beta_aligned,
|
||||
annual_volatility,
|
||||
cum_returns,
|
||||
downside_risk,
|
||||
information_ratio,
|
||||
max_drawdown,
|
||||
sharpe_ratio,
|
||||
sortino_ratio
|
||||
)
|
||||
from catalyst.patches.stats import (
|
||||
max_drawdown,
|
||||
cum_returns,
|
||||
)
|
||||
|
||||
from catalyst.constants import LOG_LEVEL
|
||||
|
||||
|
||||
Reference in New Issue
Block a user