Skip to content

Commit 30539d1

Browse files
fixed tests (#4)
1 parent 1d616e6 commit 30539d1

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

test/runtests.jl

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
using FinancialDerivatives
22
using Test
33

4-
eu_put = AmericanOption(100.0, 90.0, 0.05, 0.3, 180/365, -1)
5-
eu_call = AmericanOption(100.0, 90.0, 0.05, 0.3, 180/365, 1)
4+
eu_put = EuropeanOption(100.0, 90.0, 0.05, 0.3, 180/365, -1)
5+
eu_call = EuropeanOption(100.0, 90.0, 0.05, 0.3, 180/365, 1)
66

77
am_put = AmericanOption(100.0, 90.0, 0.05, 0.3, 180/365, -1)
88
am_call = AmericanOption(100.0, 90.0, 0.05, 0.3, 180/365, 1)
@@ -43,6 +43,10 @@ end
4343

4444
ird = InterestRateDerivative(0.01875, 0.20, 0.01, 0.012, 180/365)
4545

46+
@testset "Black-Karasinski" begin
47+
@test isapprox(evaluate(ird, BlackKarasinski(), 2), [0.2, 0.2, 0.2, 0.2], atol=0.25)
48+
end
49+
4650
@testset "Brennan-Schwartz" begin
4751
@test isapprox(evaluate(ird, BrennanSchwartz(), 2), [0.2, 0.2, 0.2, 0.2], atol=0.25)
4852
end

0 commit comments

Comments
 (0)