factor/extra/math/finance/finance-tests.factor

22 lines
589 B
Factor
Raw Normal View History

2012-05-04 13:06:24 -04:00
USING: kernel math math.functions math.finance sequences
tools.test ;
2008-09-23 13:33:36 -04:00
IN: math.finance.tests
2012-05-04 13:06:24 -04:00
[ { 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
2008-09-23 13:33:36 -04:00
[ { 2 4 } ] [ { 1 3 5 } 2 sma ] unit-test
2012-05-04 13:06:24 -04:00
[ { 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
2008-09-23 13:33:36 -04:00
[ { 1 3 1 } ] [ { 1 3 2 6 3 } 2 momentum ] unit-test
2008-12-07 09:39:16 -05:00
[ 4+1/6 ] [ 100 semimonthly ] unit-test