SCM

SCM Repository

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

Log of /pkg/quantstrat/inst

View Directory Listing Directory Listing


Sticky Revision:

Revision 1738 - Directory Listing
Modified Sat Mar 26 14:35:13 2016 UTC (2 years, 9 months ago) by bodanker
Refactor osMaxPos

Attempt to simplify function logic to make it easier to reason about.

Use as.numeric instead of as.integer to strip attributes because some
instruments allow fractional shares (e.g. mutual funds, foreign
exchange). Thanks to Brian for the correction.

Add tests for max clip size check. Refactor tests so they're easier to
change if we need to update them. It should also help avoid copy/paste
errors (e.g. the "flatten long w/orderqty = 'all'" test under "long
position, ruletype != 'risk'" incorrectly used orderside="short" instead
of orderside="long").

Revision 1737 - Directory Listing
Modified Sat Mar 26 00:42:04 2016 UTC (2 years, 9 months ago) by bodanker
Set ruletype="" for non-risk tests

Copy/paste error resulted in ruletype="risk" for tests that were
supposed to tests non-risk ruletypes.


Revision 1736 - Directory Listing
Modified Fri Mar 25 20:40:30 2016 UTC (2 years, 9 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 1726 - Directory Listing
Modified Mon Dec 14 13:09:43 2015 UTC (3 years, 1 month ago) by bodanker
Remove non-passing test

Remove test_bee, since many tests currently fail, and it did not *run*
as-of the revisions in which it was committed, where the commit log
says all tests were *passing*.

I.e., as-of r1381 the tests did not *run* due to errors. That's not to
say the tests were *failing*. The tests could not pass/fail because
subscript out of bounds errors prevented the tests from running.

Revision 1723 - Directory Listing
Modified Fri Dec 11 14:53:33 2015 UTC (3 years, 1 month 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 1722 - Directory Listing
Modified Fri Dec 11 14:44:38 2015 UTC (3 years, 1 month ago) by bodanker
Remove "tests" that don't test anything

All the test_* files were essentially verbatim copies of the demo
test template. Therefore, they all failed and prevented any other
tests from running.

Also remove unnecessary files prepend.sh and (the very dangerous)
nuke_environments.R.

Revision 1515 - Directory Listing
Modified Thu Oct 3 08:11:20 2013 UTC (5 years, 3 months ago) by erastus
- luxor source/load path wrangling, moved ES data for forthcoming load()ing via http, other small fixes

Revision 1390 - Directory Listing
Modified Thu Feb 7 17:26:39 2013 UTC (5 years, 11 months ago) by milktrader
blotter test added to quantstrat framework for now

Revision 1381 - Directory Listing
Modified Wed Jan 23 17:23:02 2013 UTC (5 years, 11 months ago) by milktrader
adding txns in test_bee and all 52 tests passing

Revision 1379 - Directory Listing
Modified Tue Jan 22 03:37:17 2013 UTC (5 years, 11 months ago) by milktrader
bee.R has all passing tests but not verified results

Revision 1377 - Directory Listing
Modified Tue Jan 22 00:17:25 2013 UTC (5 years, 11 months ago) by milktrader
fixed path for test scripts

Revision 1375 - Directory Listing
Modified Mon Jan 21 23:20:44 2013 UTC (5 years, 11 months ago) by milktrader
revamped test script templates

Revision 1370 - Directory Listing
Modified Thu Jan 17 20:58:10 2013 UTC (6 years ago) by milktrader
all demos have 2 commented out test blocks that authors will need to uncomment

Revision 1369 - Directory Listing
Modified Thu Jan 17 20:10:15 2013 UTC (6 years ago) by milktrader
adding test files for every demo

Revision 1368 - Directory Listing
Modified Thu Jan 17 13:45:20 2013 UTC (6 years ago) by milktrader
removed tradeStat stubbed stats and testing of them

Revision 1360 - Directory Listing
Modified Tue Jan 15 15:08:58 2013 UTC (6 years ago) by milktrader
added more nuke weaponry to nuke_environments

Revision 1358 - Directory Listing
Modified Tue Jan 15 14:52:28 2013 UTC (6 years ago) by milktrader
moved GBPUSD dir to inst/extdata and modified refs to /data in luxor* files

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

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

Revision 1336 - Directory Listing
Modified Thu Jan 3 12:59:52 2013 UTC (6 years ago) by milktrader
changed one test to include tolerance level and commented out last test

Revision 1335 - Directory Listing
Modified Thu Jan 3 04:10:44 2013 UTC (6 years ago) by milktrader
added 2 suites of tests for yellow, removed aqua and test_book

Revision 1333 - Directory Listing
Modified Wed Jan 2 19:47:40 2013 UTC (6 years ago) by milktrader
took out timezone setting lines in blue and aqua

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

Revision 1328 - Directory Listing
Modified Sun Dec 30 18:29:27 2012 UTC (6 years ago) by milktrader
cleaning up dead functions in tests

Revision 1327 - Directory Listing
Modified Sun Dec 30 18:22:05 2012 UTC (6 years ago) by milktrader
extra paren in blue

Revision 1326 - Directory Listing
Modified Sun Dec 30 18:03:43 2012 UTC (6 years ago) by milktrader
blue.R TZ management code

Revision 1325 - Directory Listing
Modified Sun Dec 30 16:42:08 2012 UTC (6 years ago) by milktrader
changed params to 10 30 for blue and moved rules around

Revision 1320 - Directory Listing
Modified Sat Dec 22 15:17:36 2012 UTC (6 years ago) by milktrader
changed spx to UTC and capturing user TZ in blue

Revision 1319 - Directory Listing
Modified Sat Dec 22 06:56:34 2012 UTC (6 years ago) by milktrader
fixed timezone issue with spx.rda and blue.R

Revision 1314 - Directory Listing
Modified Fri Dec 21 14:51:26 2012 UTC (6 years 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 ago) by milktrader
moved run-all from tests to inst/tests to pass R CMD check

Revision 1302 - Directory Listing
Modified Tue Dec 18 13:19:40 2012 UTC (6 years, 1 month ago) by milktrader
reworking framework and adding nuke_environments

Revision 1301 - Directory Listing
Modified Mon Dec 17 15:00:15 2012 UTC (6 years, 1 month ago) by milktrader
renamed and refactored cross_test.R to blue.R

Revision 1299 - Directory Listing
Modified Sun Dec 16 16:14:37 2012 UTC (6 years, 1 month ago) by milktrader
added cross_test system for inter-platform testing

Revision 1298 - Directory Listing
Modified Fri Dec 14 20:37:15 2012 UTC (6 years, 1 month ago) by braverock
- fix case

Revision 1295 - Directory Listing
Modified Thu Dec 13 15:36:59 2012 UTC (6 years, 1 month ago) by milktrader
using spx.rda and commented out 8 tests

Revision 1293 - Directory Listing
Modified Thu Dec 13 13:33:34 2012 UTC (6 years, 1 month ago) by milktrader
re-adding files with .R

Revision 1292 - Directory Listing
Modified Thu Dec 13 13:31:21 2012 UTC (6 years, 1 month ago) by milktrader
cleanup .r and .R mess

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

Revision 1289 - Directory Listing
Modified Thu Dec 13 02:10:48 2012 UTC (6 years, 1 month ago) by milktrader
added KFactor, RINAindex, TimeinMarket, BuyandHold

Revision 1288 - Directory Listing
Modified Wed Dec 12 23:04:25 2012 UTC (6 years, 1 month ago) by milktrader
commented out environment cleanup code

Revision 1287 - Directory Listing
Modified Wed Dec 12 22:47:25 2012 UTC (6 years, 1 month ago) by milktrader
added tests for bee and moved to inst/tests

Revision 222 - Directory Listing
Added Tue Feb 2 03:25:09 2010 UTC (8 years, 11 months ago) by peter_carl
- first draft of strategy framework

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