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 deprecations and remove Bayesian models #608
Conversation
DOC: fix docstring for rolling volatility
Delete duplicated useless code
…use different sector_dict using monkey_patch.
…o quantopian-fix_deprs # Conflicts: # pyfolio/tests/test_perf_attrib.py
(cherry picked from commit 3a8faa9)
@huaiweicheng Let me know if you need help. |
@twiecki Some other work cost me some time. Will continue in near days. |
fix some bugs in pandas==0.25.0
pyfolio/tests/test_round_trips.py
Outdated
@@ -39,7 +39,7 @@ class RoundTripTestCase(TestCase): | |||
], | |||
columns=['amount', 'price', 'symbol'], | |||
index=dates_intraday[[0, 2]]) | |||
.rename_axis('dt', axis='index') | |||
.rename('dt', axis='index') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might be wrong. revert it.
pyfolio/tests/test_round_trips.py
Outdated
@@ -53,7 +53,7 @@ class RoundTripTestCase(TestCase): | |||
], | |||
columns=['amount', 'price', 'symbol'], | |||
index=dates_intraday[[0, 4]]) | |||
.rename_axis('dt', axis='index') | |||
.rename('dt', axis='index') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might be wrong. revert it.
@twiecki Reverting the above codes and I have passed all the test right now. Did you have any suggestions? (fyi, never used round_trip before and not familiar with that part) |
@huaiweicheng Want to do another PR with that fix? |
@twiecki Sorry to get you late. Of course I'll do. |
fix_deprs: revert wrong push
@twiecki python3.7 works. python2.7 did not pass. I notice the failed reason is that the difference of nan & 0. Could you help locating that? |
@twiecki I find another problem. The
code in line 650 of plotting.py makes the precision to 1 which is to small. My suggestion is that precision should be at least 2 or 3. |
We did it @huaiweicheng!! Thanks so much for your help. |
@richafrank Probably should have looped you in before merging, but this fixes a bunch of stuff that breaks under new pandas (but keeps it running on 0.18) and removes a bunch of stuff which we don't need anymore. Mainly the Bayes tearsheet and the risk tearsheet (superseded by the perf_attrib tearsheet). |
Thanks, fixed on master.
…On Thu, Sep 19, 2019 at 5:20 AM Weicheng Huai ***@***.***> wrote:
@twiecki <https://github.com/twiecki> I find another problem. The
for column in perf_stats.columns:
for stat, value in perf_stats[column].iteritems():
if stat in STAT_FUNCS_PCT:
perf_stats.loc[stat, column] = str(np.round(value * 100,
1)) + '%
code in line 650 of plotting.py makes the precision to 1 which is to
small. My suggestion is that precision should be at least 2 or 3.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#608?email_source=notifications&email_token=AAFETGDU7423JVS5VXN4AETQKM75XA5CNFSM4IL6APBKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7CZ7KY#issuecomment-533045163>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAFETGB2I2576OPB5MOV3H3QKM75XANCNFSM4IL6APBA>
.
|
Hi, twiecki. How about adding turnover_denom para in create_txn_tear_sheet function? turnover_denom is one para in create_returns_tear_sheet but not in create_txn_tear_sheet which is weird. I could do the PR. |
Is this a feature you need? But yes, I'd probably merge a PR with that,
thanks for offering.
…On Sun, Sep 22, 2019, 21:22 Weicheng Huai ***@***.***> wrote:
Hi, twiecki. How about adding turnover_denom para in create_txn_tear_sheet
function? turnover_denom is one para in create_returns_tear_sheet but not
in create_txn_tear_sheet which is weird. I could do the PR.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#608?email_source=notifications&email_token=AAFETGBQCH27RLHFG6ROAKDQLAK6XA5CNFSM4IL6APBKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7JTXXI#issuecomment-533937117>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAFETGFDKWTUOJS7AU6TJ3TQLAK6XANCNFSM4IL6APBA>
.
|
@twiecki Yeah. I use the create_returns_tear_sheet to produce a brief summary data of returns, ratios, turnovers and so on. The turnover_denom param I set it to 'portfolio_value'. Meanwhile I use create_txn_tear_sheet to generate the report, I find it has no turnover_denom param. Thus, the turnover data generated by create_returns_tear_sheet and the plot generated by create_txn_tear_sheet does not match. I open a new PR #618, which locate the problem. And also, it fix some small issues such as useless params. |
If I spent some time to reincorporate the bayesian module - would you be open to this? It was super useful. |
This fixes a whole bunch of stuff that caused tests to break under more recent python and pandas. It also removes the bayesian module, it's just making tests slow, is difficult to install, and we don't have time to maintain it properly.