Commit Graph

25 Commits

Author SHA1 Message Date
Eddie Hebert 75e60fdc91 Fixes number of bars to create covering date range in test.
There are only 6 trading days between the open and close specified
in test_perf test.

Also, removes getting the period_end off of the last trade,
since the test can now use the end date specified for the trading
environment.
2012-12-29 18:45:31 -05:00
Eddie Hebert ec745736ac Fixes period_start in test_perf test. 2012-12-28 13:48:47 -05:00
Eddie Hebert 50f4e1fff2 Fixes bug in test where period_end is too early.
Grabs period end before we remove trades.
2012-12-28 13:46:44 -05:00
Eddie Hebert 1c15e983dc Parameterizes test_tracker test with different days' events dropped.
So that the test ensures that perf messages are returned when
data is missing from the beginning, middle, and end of data.
2012-12-28 13:43:01 -05:00
Eddie Hebert 11fa56e5d9 Breaks up performance tracker tests.
The tests using performance tracker don't need the same setup
as the other performance module tests, breaking out so that
we don't call it needlessly.
2012-12-28 12:08:43 -05:00
Eddie Hebert f7e4f57425 Enables performance messages on days that have no trades.
Previously, on days that were trading days, but there with no
event data to process for that day, performance metrics were
not emitted, since the handling was based on having an event
trigger the daily performance metric.

Handled by grouping together performance messages, on market open,
for all days since the last market close.

Also, changes perf_tracker unit test to simulate missing data.

Taken from @richafrank's branch handling the same case.
2012-12-28 11:43:31 -05:00
Eddie Hebert b5867774e9 Reduces the the dataset size for performance tracker test.
So that the test is easier to debug and walk through on paper.

Also, removes randomly created dataset.
2012-12-27 18:39:22 -05:00
Eddie Hebert c436f85758 Removes random test invocation. 2012-12-27 18:39:22 -05:00
Richard Frank 54063854aa Forward-fill missing treasury data
To handle, for instance, Columbus Day (Oct 10),
on which there is no treasury data.

We're only forward-filling data now, and
no longer searching both back and forward in time.
2012-12-14 17:29:27 -05:00
Richard Frank 095f2dd65b Date bookkeeping fixes in perf and risk
Issues appeared when we were close to the end of our
historical data.

Yielding DONE event with both perf and risk messages now
2012-12-12 15:23:26 -05:00
Richard Frank e7b504f4ca Removed list of trading days since we already have an OrderedDict 2012-12-12 15:23:26 -05:00
Eddie Hebert 0617e53d69 Upgrades flake8 from 1.5 -> 1.6
Also, removes flake8 ignores, since the warnings that were
at odds with eachother now work.
2012-11-19 12:49:09 -05:00
Eddie Hebert d5697cdf0a Fixes under-incrementation of risk report.
We were only incrementing the risk report by one day, and never
checking to see if that day we incremented into was a trading day
or not.

We now increment by day until we are on a trading day.

With an assist from @twiecki on:

Adapted test_risk_compare_batch_iterative to work with fixed
iterative risk class.
2012-11-15 14:13:04 -05:00
Eddie Hebert 7904773d00 Updates flake8 to latest.
The latest flake8 release in now 1.5, which pulls in pep8: 1.3.4a0

The upgrade pep8 has changes to what it picks up as lint.
Making code base compatible, so that new devs can install pep8
from PyPI and not have friction over the version difference.

Currently using these ignores in the config file:

```
[pep8]
ignore = E124,E125,E126
```

Ignoring these since they are difficult to squash while maintaining
an 80 char line length, and appear spurious.
Should address later.

Updates Travis config, README, and pip requirements to reflect change.
2012-10-22 11:57:16 -04:00
Eddie Hebert 95ce2d90cf Removes unused constant and redirection of imports.
Removes TRANSFORM_TYPE from protocol, since it is unused.

Also, removes use of ndict as a member of protocol, since it's
import there was for the TRANSFORM_TYPE. Changed to
utils.protocol_utils instead.
2012-10-15 22:57:06 -04:00
fawce 16b0d71506 refactoring of algorithm to make it work for both batch style run method, and generator style consumption. removed the portfolio property from the data parameter. added set_slippage and set_commission methods to algorithm. removed timeout tracking. 2012-10-10 16:06:32 -04:00
Eddie Hebert bbf2317c57 Saving point for adding license files. 2012-10-08 17:32:40 -04:00
Eddie Hebert 0cd8931a5b Whitespace wrangling. According to PEP8 recommendations. 2012-10-03 13:20:26 -04:00
fawce aeb50da170 fixes for unit tests, back to 50/51 passing. 2012-08-07 14:42:43 -04:00
fawce 3d5e084b8d fixed logic bug in creation of sample date range. added assert. 2012-07-05 16:17:51 -04:00
fawce 069dbd1afe removed protocol cruft from transaction transform days. 2012-05-28 21:32:23 -04:00
Stephen Diehl 3ad1f250e6 Cleaned up OOP, first round. 2012-05-16 14:33:16 -04:00
Stephen Diehl e04415e63f Remove all namedicts. 2012-05-14 11:35:43 -04:00
Stephen Diehl 0d8eada763 More tests passing. 2012-05-10 17:10:09 -04:00
Stephen Diehl 62ec591d90 Moved the test folder. 2012-05-09 13:34:13 -04:00