pazzo83 / QuantLib.jl

Quantlib implementation in pure Julia
Other
137 stars 42 forks source link

main2 in bond_test_code.jl #3

Closed EricForgy closed 8 years ago

EricForgy commented 8 years ago
julia> versioninfo()
Julia Version 0.4.2
Commit bb73f34 (2015-12-06 21:47 UTC)
Platform Info:
  System: Windows (x86_64-w64-mingw32)
  CPU: Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.3

Hi @pazzo83 ,

I'm just starting to kick things around a little and tried bond_test_code.jl. main() and main3() run fine, but got the following error on main2():

julia> main2()
ERROR: MethodError: `npv` has no method matching npv(::QuantLib.ZeroCouponBond{Int64,QuantLib.DiscountingBondEngine{QuantLib.PiecewiseYieldCurve{Int64,QuantLib.BootstrapHelper,QuantLib.Time.ISDAActualActual,QuantLib.Math.LogInterpolation,QuantLib.Discount,QuantLib.IterativeBootstrap}}}, ::QuantLib.DiscountingBondEngine{QuantLib.PiecewiseYieldCurve{Int64,QuantLib.BootstrapHelper,QuantLib.Time.ISDAActualActual,QuantLib.Math.LogInterpolation,QuantLib.Discount,QuantLib.IterativeBootstrap}})
Closest candidates are:
  npv{B<:QuantLib.Bond}(::B<:QuantLib.Bond)
  npv(::QuantLib.Instrument)
 in main2 at C:\Users\Eric Forgy\.julia\v0.4\QuantLib\examples\bond_test_code.jl:424

I'll have a look, but wanted to let you know.

Cheers!

pazzo83 commented 8 years ago

Ah yes, thank you! I had forgotten about that method, its functionality is basically encapsulated in main3 (how do you like my test function names!). I'll comment that whole method out.

EricForgy commented 8 years ago

Cool. Makes sense. Thanks :)