def tracking_error_a(r, r_bm, period): try: return sample_check(( 0, 1, ), 3)(api.tracking_error_a)(r, r_bm, period) except AssertionError: return ERROR_VAL
def periods_neg_prop(r): try: return sample_check((0, ), 1)(api.periods_neg_prop)(r) except AssertionError: return ERROR_VAL
def periods_pos(r): try: return sample_check((0, ), 1)(api.periods_pos)(r) except AssertionError: return np.nan
def return_a(p, t): try: return sample_check((0, ), 4)(api.return_a)(p, t) except AssertionError: return ERROR_VAL
def accumulative_return(p): try: return sample_check((0, ), 2)(api.accumulative_return)(p) except AssertionError: return ERROR_VAL
def value_at_risk(r, m=1000, alpha=0.05): try: return sample_check((0, ), 2)(api.value_at_risk)(r, m, alpha) except AssertionError: return ERROR_VAL
def standard_deviation(r): try: return sample_check((0, ), 3)(api.standard_deviation)(r) except AssertionError: return ERROR_VAL