mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-23 12:50:22 +08:00
ENH: Annualize information ratio.
Use annualized values for information, so that it is calculated using the same units as sharpe, etc.
This commit is contained in:
@@ -238,6 +238,9 @@ class AnswerKey(object):
|
||||
'CUMULATIVE_SORTINO': DataIndex(
|
||||
'Sim Cumulative', 'V', 4, 254),
|
||||
|
||||
'CUMULATIVE_INFORMATION': DataIndex(
|
||||
'Sim Cumulative', 'Y', 4, 254),
|
||||
|
||||
}
|
||||
|
||||
def __init__(self):
|
||||
@@ -300,4 +303,6 @@ RISK_CUMULATIVE = pd.DataFrame({
|
||||
'downside_risk': pd.Series(dict(zip(
|
||||
DATES, ANSWER_KEY.CUMULATIVE_DOWNSIDE_RISK))),
|
||||
'sortino': pd.Series(dict(zip(
|
||||
DATES, ANSWER_KEY.CUMULATIVE_SORTINO)))})
|
||||
DATES, ANSWER_KEY.CUMULATIVE_SORTINO))),
|
||||
'information': pd.Series(dict(zip(
|
||||
DATES, ANSWER_KEY.CUMULATIVE_INFORMATION)))})
|
||||
|
||||
@@ -86,3 +86,11 @@ class TestRisk(unittest.TestCase):
|
||||
value,
|
||||
decimal=2,
|
||||
err_msg="Mismatch at %s" % (dt,))
|
||||
|
||||
def test_information_06(self):
|
||||
for dt, value in answer_key.RISK_CUMULATIVE.information.iterkv():
|
||||
np.testing.assert_almost_equal(
|
||||
self.cumulative_metrics_06.metrics.information[dt],
|
||||
value,
|
||||
decimal=2,
|
||||
err_msg="Mismatch at %s" % (dt,))
|
||||
|
||||
Reference in New Issue
Block a user