mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-25 13:10:33 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9093be748e |
@@ -45,8 +45,6 @@ log = logbook.Logger('Risk Cumulative', level=LOG_LEVEL)
|
|||||||
choose_treasury = functools.partial(choose_treasury, lambda *args: '10year',
|
choose_treasury = functools.partial(choose_treasury, lambda *args: '10year',
|
||||||
compound=False)
|
compound=False)
|
||||||
|
|
||||||
warnings.filterwarnings('error')
|
|
||||||
|
|
||||||
|
|
||||||
class RiskMetricsCumulative(object):
|
class RiskMetricsCumulative(object):
|
||||||
"""
|
"""
|
||||||
@@ -146,6 +144,8 @@ class RiskMetricsCumulative(object):
|
|||||||
self.num_trading_days = 0
|
self.num_trading_days = 0
|
||||||
|
|
||||||
def update(self, dt, algorithm_returns, benchmark_returns, leverage):
|
def update(self, dt, algorithm_returns, benchmark_returns, leverage):
|
||||||
|
warnings.filterwarnings('error')
|
||||||
|
|
||||||
# Keep track of latest dt for use in to_dict and other methods
|
# Keep track of latest dt for use in to_dict and other methods
|
||||||
# that report current state.
|
# that report current state.
|
||||||
self.latest_dt = dt
|
self.latest_dt = dt
|
||||||
@@ -292,6 +292,8 @@ algorithm_returns ({algo_count}) in range {start} : {end} on {dt}"
|
|||||||
self.max_leverage = self.calculate_max_leverage()
|
self.max_leverage = self.calculate_max_leverage()
|
||||||
self.max_leverages[dt_loc] = self.max_leverage
|
self.max_leverages[dt_loc] = self.max_leverage
|
||||||
|
|
||||||
|
warnings.resetwarnings()
|
||||||
|
|
||||||
def to_dict(self):
|
def to_dict(self):
|
||||||
"""
|
"""
|
||||||
Creates a dictionary representing the state of the risk report.
|
Creates a dictionary representing the state of the risk report.
|
||||||
|
|||||||
@@ -2,6 +2,15 @@
|
|||||||
Release Notes
|
Release Notes
|
||||||
=============
|
=============
|
||||||
|
|
||||||
|
Version 0.3.8
|
||||||
|
^^^^^^^^^^^^^
|
||||||
|
**Release Date**: 2017-11-14
|
||||||
|
|
||||||
|
Bug Fixes
|
||||||
|
~~~~~~~~~
|
||||||
|
|
||||||
|
- Fixed a warning filter issue introduced with the latest release
|
||||||
|
|
||||||
Version 0.3.7
|
Version 0.3.7
|
||||||
^^^^^^^^^^^^^
|
^^^^^^^^^^^^^
|
||||||
**Release Date**: 2017-11-14
|
**Release Date**: 2017-11-14
|
||||||
|
|||||||
Reference in New Issue
Block a user