math.finance: adding some tests.

db4
John Benediktsson 2012-05-04 10:06:24 -07:00
parent 0a187f6609
commit cbf022454b
1 changed files with 12 additions and 2 deletions

View File

@ -1,11 +1,21 @@
USING: kernel math math.functions math.finance tools.test ;
USING: kernel math math.functions math.finance sequences
tools.test ;
IN: math.finance.tests
[ { 1 2 3 4 } ] [ { 1 2 3 4 5 } 1 ema ] unit-test
[ { 1 2 3 4 5 } ] [ { 1 2 3 4 5 } 1 ema ] unit-test
[ { 1+1/2 2+1/2 3+1/2 4+1/2 } ] [ { 1 2 3 4 5 } 2 ema ] unit-test
[ { 2 3 4 } ] [ { 1 2 3 4 5 } 3 ema ] unit-test
[ { 2 4 } ] [ { 1 3 5 } 2 sma ] unit-test
[ { 2 3 4 5 } ] [ 6 iota 2 dema ] unit-test
[ t ] [ 6 iota 2 [ dema ] [ 1 gdema ] 2bi = ] unit-test
[ { 3 4 5 } ] [ 6 iota 2 tema ] unit-test
[ { 6 7 8 9 } ] [ 10 iota 3 tema ] unit-test
[ { 1 3 1 } ] [ { 1 3 2 6 3 } 2 momentum ] unit-test
[ 4+1/6 ] [ 100 semimonthly ] unit-test