-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #78 from JuliaQuant/ib-test-cleanup
test: cleanup trailing space in test cases
- Loading branch information
Showing
7 changed files
with
39 additions
and
51 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,26 @@ | ||
using MarketData | ||
|
||
facts("Levels") do | ||
|
||
context("floor pivots") do | ||
@fact floorpivots(ohlc)["r3"].values[1] --> roughly(123.310, atol=.01) # values verified by various website calculators | ||
@fact floorpivots(ohlc)["r2"].values[1] --> roughly(119.52, atol=.01) | ||
@fact floorpivots(ohlc)["r1"].values[1] --> roughly(115.73, atol=.01) | ||
@fact floorpivots(ohlc)["pivot"].values[1] --> roughly(108.71, atol=.01) | ||
@fact floorpivots(ohlc)["s1"].values[1] --> roughly(104.92, atol=.01) | ||
@fact floorpivots(ohlc)["s2"].values[1] --> roughly(97.900, atol=.01) | ||
@fact floorpivots(ohlc)["s3"].values[1] --> roughly(94.110, atol=.01) | ||
@fact floorpivots(ohlc)["r2"].values[1] --> roughly(119.52, atol=.01) | ||
@fact floorpivots(ohlc)["r1"].values[1] --> roughly(115.73, atol=.01) | ||
@fact floorpivots(ohlc)["pivot"].values[1] --> roughly(108.71, atol=.01) | ||
@fact floorpivots(ohlc)["s1"].values[1] --> roughly(104.92, atol=.01) | ||
@fact floorpivots(ohlc)["s2"].values[1] --> roughly(97.900, atol=.01) | ||
@fact floorpivots(ohlc)["s3"].values[1] --> roughly(94.110, atol=.01) | ||
@fact floorpivots(ohlc).timestamp[end] --> Date(2001,12,31) | ||
end | ||
end | ||
|
||
context("woodiespivots") do | ||
# # @fact_approx_eq 97.37500000000001 value(wr4)[2] # values NEED to be verified with online calculators | ||
# # @fact_approx_eq 88.62500000000001 value(ws4)[2] | ||
@fact woodiespivots(ohlc)["r3"].values[1] --> roughly(124.465, atol=.01) | ||
@fact woodiespivots(ohlc)["r2"].values[1] --> roughly(118.480, atol=.01) | ||
@fact woodiespivots(ohlc)["r1"].values[1] --> roughly(113.655, atol=.01) | ||
@fact woodiespivots(ohlc)["pivot"].values[1] --> roughly(107.670, atol=.01) | ||
@fact woodiespivots(ohlc)["s1"].values[1] --> roughly(102.845, atol=.01) | ||
@fact woodiespivots(ohlc)["s2"].values[1] --> roughly(96.8625, atol=.01) | ||
@fact woodiespivots(ohlc)["s3"].values[1] --> roughly(92.035, atol=.01) | ||
# # @fact_approx_eq 97.37500000000001 value(wr4)[2] # values NEED to be verified with online calculators | ||
# # @fact_approx_eq 88.62500000000001 value(ws4)[2] | ||
@fact woodiespivots(ohlc)["r3"].values[1] --> roughly(124.465, atol=.01) | ||
@fact woodiespivots(ohlc)["r2"].values[1] --> roughly(118.480, atol=.01) | ||
@fact woodiespivots(ohlc)["r1"].values[1] --> roughly(113.655, atol=.01) | ||
@fact woodiespivots(ohlc)["pivot"].values[1] --> roughly(107.670, atol=.01) | ||
@fact woodiespivots(ohlc)["s1"].values[1] --> roughly(102.845, atol=.01) | ||
@fact woodiespivots(ohlc)["s2"].values[1] --> roughly(96.8625, atol=.01) | ||
@fact woodiespivots(ohlc)["s3"].values[1] --> roughly(92.035, atol=.01) | ||
@fact woodiespivots(ohlc).timestamp[end] --> Date(2001,12,31) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
using MarketTechnicals, MarketData, FactCheck | ||
|
||
facts("Momentum") do | ||
|
||
context("rsi") do | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
using FactCheck, MarketTechnicals | ||
using FactCheck | ||
using MarketData | ||
using MarketTechnicals | ||
|
||
include("candlesticks.jl") | ||
include("levels.jl") | ||
include("movingaverages.jl") | ||
include("momentum.jl") | ||
include("volatility.jl") | ||
include("candlesticks.jl") | ||
include("levels.jl") | ||
include("movingaverages.jl") | ||
include("momentum.jl") | ||
include("volatility.jl") | ||
include("volume.jl") | ||
|
||
exitstatus() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,32 @@ | ||
using MarketData | ||
|
||
facts("Volatility") do | ||
|
||
context("bollinger_bands") do | ||
@fact bollingerbands(cl)["up"].values[1] --> roughly(117.3251, atol=.01) # TTR default uses sample=FALSE and value 117.3251 | ||
@fact bollingerbands(cl)["down"].values[1] --> roughly(89.39392, atol=.01) # TTR default uses sample=FALSE and value 89.39392 | ||
@fact bollingerbands(cl)["mean"].values[1] --> roughly(103.3595, atol=.01) # TTR 103.3595 | ||
@fact bollingerbands(cl).timestamp[1] --> Date(2000,1,31) | ||
@fact bollingerbands(cl)["mean"].values[1] --> roughly(103.3595, atol=.01) # TTR 103.3595 | ||
@fact bollingerbands(cl).timestamp[1] --> Date(2000,1,31) | ||
@fact bollingerbands(cl).timestamp[end] --> Date(2001,12,31) | ||
end | ||
|
||
context("truerange") do | ||
@fact truerange(ohlc).values[end] --> roughly(0.83, atol=.01) # TTR 0.83 | ||
@fact truerange(ohlc).timestamp[end] --> Date(2001,12,31) | ||
end | ||
|
||
context("atr") do | ||
@fact atr(ohlc).values[1] --> roughly(8.343571428571428) # TTR value 8.343571 | ||
@fact atr(ohlc).values[end] --> roughly(0.9664561242651976) # TTR value 0.9664561 | ||
@fact atr(ohlc).timestamp[1] --> Date(2000,1,24) | ||
end | ||
|
||
# context("keltner_bands") do | ||
# @fact keltnerbands(ohlc)["kma"].values[end] --> roughly(21.42) # needs confirmation | ||
# @fact keltnerbandb(ohlc)["kup"].values[end] --> roughly(22.32) # needs confirmation | ||
# @fact keltnerbands(ohlc)["kdn"].values[end] --> roughly(20.52) # needs confirmation | ||
# @fact keltnerbands(ohlc)["kma"].values[end] --> roughly(21.42) # needs confirmation | ||
# @fact keltnerbandb(ohlc)["kup"].values[end] --> roughly(22.32) # needs confirmation | ||
# @fact keltnerbands(ohlc)["kdn"].values[end] --> roughly(20.52) # needs confirmation | ||
# @fact keltnerbands(ohlc).timestamp[1] --> Date(2000,1,14) | ||
# end | ||
|
||
# context("chaikin_volatility") do | ||
# @fact chk --> 17.0466 | ||
# @fact chk --> 17.0466 | ||
# end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters