mhallsmoore / qstrader

QuantStart.com - QSTrader backtesting simulation engine.
https://www.quantstart.com/qstrader/
MIT License
2.93k stars 855 forks source link

Increase test coverage #175

Closed ryankennedyio closed 7 years ago

coveralls commented 7 years ago

Coverage Status

Coverage increased (+1.2%) to 65.199% when pulling 14f457939a3cc1bd92e5ca2fd80677f75c60e996 on ryankennedyio:increase_test_coverage into 2714ae4b95b362e31a450cda1f0a711777659fce on mhallsmoore:master.

ryankennedyio commented 7 years ago

I'm going to be pushing a stack of changes up to this branch, so might not be worth merging until coverage is back into the 90%'s

coveralls commented 7 years ago

Coverage Status

Coverage increased (+1.4%) to 65.378% when pulling 3ee7572a6067eb93694e9a02289e6e2819b611f9 on ryankennedyio:increase_test_coverage into 2714ae4b95b362e31a450cda1f0a711777659fce on mhallsmoore:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+1.4%) to 65.396% when pulling f00500744aa83dbda731f02799d21f8b3c044f5c on ryankennedyio:increase_test_coverage into 2714ae4b95b362e31a450cda1f0a711777659fce on mhallsmoore:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+3.0%) to 66.945% when pulling ace5b291fd90f5372bb866a695d810985a130b5e on ryankennedyio:increase_test_coverage into 2714ae4b95b362e31a450cda1f0a711777659fce on mhallsmoore:master.

ryankennedyio commented 7 years ago

Ahhhhhh nooooooo, precision errors with the sharpe of monthly liquidation backtest in different versions of python... Any ideas @mhallsmoore ?

mhallsmoore commented 7 years ago

This may be due to an error I just fixed, regarding how prices were imported out-of-order in a pandas DataFrame.

I could try merging this in and seeing if I can fix the problem - or should I wait until you've written more tests?

ryankennedyio commented 7 years ago

@mhallsmoore I think just merge it in. I will write more tests over the top of https://github.com/mhallsmoore/qstrader/pull/177 once that has been merged into master.

I didn't want to go too far ahead with a failing CI build.

mhallsmoore commented 7 years ago

Ryan,

Rather than mucking around with rebasing from the current master, I've added your code in manually to another pull request, so I'll close this one.

Thanks for providing the unit tests for the rebalance code though!

Interestingly enough my branch was still failing in the same way this was (the precision issues between 2.7.x and 3.x.x). It turned out that the error was due to my use of PriceParser in the rebalance class. I've fixed it now (in the other Pull Request) and results are now consistent across both.

Mike.