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 #385 among other things #395

Merged
merged 11 commits into from
Jun 30, 2017
Merged

Fix #385 among other things #395

merged 11 commits into from
Jun 30, 2017

Conversation

twiecki
Copy link
Contributor

@twiecki twiecki commented Jun 29, 2017

There were some problems after updating pandas and pymc3 3.1.

@twiecki twiecki requested a review from gusgordon June 29, 2017 22:31
@@ -166,7 +165,7 @@ def test_max_median_exposure(self, positions, expected):
])
def test_detect_intraday(self, positions, transactions, expected):
detected = detect_intraday(positions, transactions, threshold=0.25)
assert_equal(detected, expected)
assert detected == expected
Copy link
Contributor

@gusgordon gusgordon Jun 30, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we use assert here and not one of the pandas assertion functions?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like assert_equal was removed.

@@ -53,11 +53,11 @@
'scipy>=0.14.0',
'seaborn>=0.7.1',
'pandas-datareader>=0.2',
'empyrical>=0.2.2'
'empyrical>=0.3.0'
]

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we also want to pin versions instead of using >=? The current pandas issues were due to this, but there are advantages/problems with both >= and ==.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe you're right.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My instinct is to allow a range. Otherwise every environment/application that uses pyfolio must use exactly this version of empyrical. This means we couldn't install zipline with a newer version of empyrical on our research platform, if we wanted newer empyrical features. If we can trust the maintainers of empyrical to keep its API backwards compatible, then we should be ok 😉 .

I'm not sure what the pandas issues were, though, so I might be off base here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense, thanks @richafrank

@@ -26,7 +26,7 @@ class PositionsTestCase(TestCase):
test_returns = read_csv(
gzip.open(
__location__ + '/test_data/test_returns.csv.gz'),
index_col=0, parse_dates=True)
index_col=0, parse_dates=True).iloc[4:]
Copy link
Contributor

@gusgordon gusgordon Jun 30, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why skip the first 4 rows for only the returns CSV, but not the positions or transactions CSVs?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

those were all 0's. it was part of me tracking down a problem but I think the problem was somewhere else so we can try removing this again.

@gusgordon
Copy link
Contributor

Looks great, thank you @twiecki!

@twiecki twiecki mentioned this pull request Jun 30, 2017
@gusgordon gusgordon merged commit f0e8afc into master Jun 30, 2017
@gusgordon gusgordon mentioned this pull request Jun 30, 2017
@twiecki twiecki deleted the issue_385_workaround branch July 1, 2017 07:44
@twiecki
Copy link
Contributor Author

twiecki commented Jul 1, 2017

Should probably cut a new release. @richafrank anyone who can help with that?

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.

4 participants