Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX refactor annual_return to return CAGR. Removes returns_style para… #234

Closed
wants to merge 3 commits into from

Conversation

justinlent
Copy link
Contributor

…meter from signature.

@twiecki
Copy link
Contributor

twiecki commented Dec 3, 2015

Still a bunch of tests calling the old signature:

======================================================================
ERROR: test_annual_ret_0 (pyfolio.tests.test_timeseries.TestStats)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/miniconda/envs/testenv/lib/python2.7/site-packages/nose_parameterized/parameterized.py", line 365, in standalone_func
    return func(*(a + p.args), **p.kwargs)
  File "/home/travis/build/quantopian/pyfolio/pyfolio/tests/test_timeseries.py", line 252, in test_annual_ret
    style=style, period=period),
TypeError: annual_return() got an unexpected keyword argument 'style'
======================================================================
ERROR: test_annual_ret_1 (pyfolio.tests.test_timeseries.TestStats)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/miniconda/envs/testenv/lib/python2.7/site-packages/nose_parameterized/parameterized.py", line 365, in standalone_func
    return func(*(a + p.args), **p.kwargs)
  File "/home/travis/build/quantopian/pyfolio/pyfolio/tests/test_timeseries.py", line 252, in test_annual_ret
    style=style, period=period),
TypeError: annual_return() got an unexpected keyword argument 'style'
======================================================================
ERROR: test_annual_ret_2 (pyfolio.tests.test_timeseries.TestStats)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/miniconda/envs/testenv/lib/python2.7/site-packages/nose_parameterized/parameterized.py", line 365, in standalone_func
    return func(*(a + p.args), **p.kwargs)
  File "/home/travis/build/quantopian/pyfolio/pyfolio/tests/test_timeseries.py", line 252, in test_annual_ret
    style=style, period=period),
TypeError: annual_return() got an unexpected keyword argument 'style'
======================================================================
ERROR: test_annual_ret_3 (pyfolio.tests.test_timeseries.TestStats)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/miniconda/envs/testenv/lib/python2.7/site-packages/nose_parameterized/parameterized.py", line 365, in standalone_func
    return func(*(a + p.args), **p.kwargs)
  File "/home/travis/build/quantopian/pyfolio/pyfolio/tests/test_timeseries.py", line 252, in test_annual_ret
    style=style, period=period),
TypeError: annual_return() got an unexpected keyword argument 'style'
======================================================================
ERROR: test_annual_ret_4 (pyfolio.tests.test_timeseries.TestStats)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/miniconda/envs/testenv/lib/python2.7/site-packages/nose_parameterized/parameterized.py", line 365, in standalone_func
    return func(*(a + p.args), **p.kwargs)
  File "/home/travis/build/quantopian/pyfolio/pyfolio/tests/test_timeseries.py", line 252, in test_annual_ret
    style=style, period=period),
TypeError: annual_return() got an unexpected keyword argument 'style'
======================================================================
ERROR: test_annual_ret_5 (pyfolio.tests.test_timeseries.TestStats)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/miniconda/envs/testenv/lib/python2.7/site-packages/nose_parameterized/parameterized.py", line 365, in standalone_func
    return func(*(a + p.args), **p.kwargs)
  File "/home/travis/build/quantopian/pyfolio/pyfolio/tests/test_timeseries.py", line 252, in test_annual_ret
    style=style, period=period),
TypeError: annual_return() got an unexpected keyword argument 'style'
======================================================================
ERROR: test_annual_ret_6 (pyfolio.tests.test_timeseries.TestStats)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/miniconda/envs/testenv/lib/python2.7/site-packages/nose_parameterized/parameterized.py", line 365, in standalone_func
    return func(*(a + p.args), **p.kwargs)
  File "/home/travis/build/quantopian/pyfolio/pyfolio/tests/test_timeseries.py", line 252, in test_annual_ret
    style=style, period=period),
TypeError: annual_return() got an unexpected keyword argument 'style'
======================================================================
ERROR: test_annual_ret_7 (pyfolio.tests.test_timeseries.TestStats)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/miniconda/envs/testenv/lib/python2.7/site-packages/nose_parameterized/parameterized.py", line 365, in standalone_func
    return func(*(a + p.args), **p.kwargs)
  File "/home/travis/build/quantopian/pyfolio/pyfolio/tests/test_timeseries.py", line 252, in test_annual_ret
    style=style, period=period),
TypeError: annual_return() got an unexpected keyword argument 'style'
======================================================================
ERROR: test_calmar_0 (pyfolio.tests.test_timeseries.TestStats)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/miniconda/envs/testenv/lib/python2.7/site-packages/nose_parameterized/parameterized.py", line 365, in standalone_func
    return func(*(a + p.args), **p.kwargs)
  File "/home/travis/build/quantopian/pyfolio/pyfolio/tests/test_timeseries.py", line 318, in test_calmar
    returns_style=returns_style),
TypeError: calmar_ratio() got an unexpected keyword argument 'returns_style'
======================================================================
ERROR: test_calmar_1 (pyfolio.tests.test_timeseries.TestStats)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/miniconda/envs/testenv/lib/python2.7/site-packages/nose_parameterized/parameterized.py", line 365, in standalone_func
    return func(*(a + p.args), **p.kwargs)
  File "/home/travis/build/quantopian/pyfolio/pyfolio/tests/test_timeseries.py", line 318, in test_calmar
    returns_style=returns_style),
TypeError: calmar_ratio() got an unexpected keyword argument 'returns_style'
----------------------------------------------------------------------

@justinlent
Copy link
Contributor Author

@twiecki when convenient, can you do a quick review and then feel free to merge if it looks good.

@twiecki
Copy link
Contributor

twiecki commented Dec 8, 2015

Merged with 9275dbb.

@twiecki twiecki closed this Dec 8, 2015
@twiecki twiecki deleted the annual_return_refactor branch December 8, 2015 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants