SCM

SCM Repository

[blotter] Log of /pkg/quantstrat/tests
ViewVC logotype

Log of /pkg/quantstrat/tests

View Directory Listing Directory Listing


Sticky Revision:

Revision 1736 - Directory Listing
Modified Fri Mar 25 20:40:30 2016 UTC (2 years, 11 months ago) by bodanker
Address issues w/osMaxPos and add tests (#6306)

R-Forge issue #6306 highlights two potential issues with osMasPos. I
cannot seem to trigger any bug via tests for the first problem:
  if(orderqty+pos > PosLimit[,"MaxPos"])
      orderqty <- PosLimit[,"MinPos"]-pos
which seems like it should be:
  if(orderqty-pos < PosLimit[,"MinPos"])
      orderqty <- PosLimit[,"MinPos"]+pos

The second error is most certainly a problem:
  orderqty <- pos #flatten position, don't cross through zero
should be
  orderqty <- -pos #flatten position, don't cross through zero
because we are buying to cover a short position.

Move the ruletype == "risk" and orderqty == "all" checks to the
beginning of the function, so we can throw an error for unsupported
combinations.

Replace "&" with "&&" inside if statements, so we get the benefit
of short-circuiting when the first isn't TRUE. This helps handle
orderside = NULL more gracefully.

Use as.integer(orderqty) to strip attributes (e.g. dim, xts stuff, etc)
that come from the position limit object when we are at position limits.

Add unit tests!

Revision 1723 - Directory Listing
Modified Fri Dec 11 14:53:33 2015 UTC (3 years, 3 months ago) by bodanker
Warn if replacing paramset distribution/constraint

add.distribution and add.distribution.constraint would silently replace
any distribution/constraint for the same strategy/paramset with the
same label. Keep current behavior, but throw warning to avoid surprise.

Also change test_package to only test paramset warnings, since test_bee
and test_blotter_break both currently fail, and testthat apparently
stops all tests after the first failure when running under R CMD check.

Revision 1340 - Directory Listing
Modified Fri Jan 4 16:48:15 2013 UTC (6 years, 2 months ago) by milktrader
uncommenting failing tests of unimplemented features

Revision 1337 - Directory Listing
Modified Thu Jan 3 16:46:35 2013 UTC (6 years, 2 months ago) by milktrader
putting try around test_package and have at least one failing test

Revision 1334 - Directory Listing
Modified Wed Jan 2 19:50:51 2013 UTC (6 years, 2 months ago) by milktrader
uncommented run-all and build now depends on tests passing

Revision 1330 - Directory Listing
Modified Sun Dec 30 18:58:15 2012 UTC (6 years, 2 months ago) by milktrader
commenting out run-all.R again, failing on other systems

Revision 1329 - Directory Listing
Modified Sun Dec 30 18:48:58 2012 UTC (6 years, 2 months ago) by milktrader
uncommented run-all.R

Revision 1314 - Directory Listing
Modified Fri Dec 21 14:51:26 2012 UTC (6 years, 3 months ago) by braverock
- revert r1313 and siuply comment out the run line in run-all until problems can be resolved

Revision 1313 - Directory Listing
Modified Fri Dec 21 14:41:01 2012 UTC (6 years, 3 months ago) by milktrader
moved run-all from tests to inst/tests to pass R CMD check

Revision 1291 - Directory Listing
Added Thu Dec 13 13:04:22 2012 UTC (6 years, 3 months ago) by milktrader
more testing framework infrastructure

Sort log by:

R-Forge@R-project.org
ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business University of Wisconsin - Madison Powered By FusionForge