Code Monkey home page Code Monkey logo

quantlib.jl's Introduction

QuantLib.jl

Build Status

This package aims to provide a pure Julia version of the popular open source library QuantLib (written in C++ and interfaced with other languages via SWIG). Right now the package is in an alpha state, but there is quite a bit of functionality already.

Install

using Pkg; Pkg.add("QuantLib")

Note: only supports versions of Julia 1.0 and up

The package essentially contains the main QuantLib module and two sub-modules for various time-based and math-based operations. Below is a fairly up-to-date status of what is included.

Documentation: http://quantlibjl.readthedocs.org/en/latest/

Math

Interpolations:

  • Backward Flat
  • Linear
  • Log Linear
  • Cubic Spline
  • BiCubic Spline (implemented with Dierckx)

Optimization methods:

  • Simplex
  • Levenberg Marquardt

Solvers:

  • Brent
  • Finite Differences
  • Newton

Time

Calendars (adopted from BusinessDays.jl and Ito.jl):

  • Target (basically a null calendar with basic holidays)
  • US Settlement Calendar
  • US NYSE Calendar
  • US NERC Calendar
  • UK Settlement Calendar
  • UK LSE Calendar
  • UK LME Calendar

Day Counters:

  • Actual 360
  • Actual 365
  • Bond Thirty 360
  • Euro Bond Thirty 360
  • ISMA Actual
  • ISDA Actual
  • AFBA Actual

Instruments

Bonds:

  • Fixed Rate Bond
  • Floating Rate Bond

Options:

  • Vanilla Option
  • Swaption
  • Nonstandard Swaption (used for Gaussian methods)

Swaps:

  • Vanilla Swap
  • Nonstandard Swap (used for Gaussian methods)
  • Credit Default Swap (partial)

Indexes

  • Ibor
  • Libor
  • Euribor
  • USD Libor
  • Euribor Swap ISDA

Methods

  • Finite Differences
  • Trinomial Tree
  • Tree Lattice 1D & 2D
  • Monte Carlo

Models

Short Rate:

  • Black Karasinski
  • Gaussian Short Rate (GSR)
  • Hull White
  • G2

Equity:

  • Bates Model
  • Heston Model

Market Models

  • Flat Vol

Pricing Engines

Bond:

  • Discounting Bond Engine
  • Tree Callable Fixed Rate Bond Engine
  • Black Callable Fixed Rate Bond Engine

Swap:

  • Discounting Swap Engine

Credit:

  • MidPoint CDS Engine

Swaptions:

  • Black Swaption Engine
  • Finite Differences Hull White Pricing Engine
  • Finite Differences G2 Pricing Engine
  • G2 Swaption Engine
  • Gaussian 1D Nonstandard Swaption Engine
  • Gaussian 1D Swaption Engine
  • Jamshidian Swaption Engine
  • Tree Swaption Engine

Vanilla:

  • Analytic European Engine (for black scholes)
  • Analytic Heston Engine
  • Barone Adesi Whaley Engine
  • Bates Engine
  • Binomial Engine
  • Bjerksund Stensland Approximation Engine
  • FD Vanilla Engine
  • Integral Engine
  • MonteCarlo American Engine
  • MonteCarlo European Engine

General:

  • Black Scholes Calculator
  • Black Formula
  • MonteCarlo Simulation
  • Lattice ShortRate Model Engine

Processes

  • Black Scholes Process
  • Ornstein Uhlenbeck Process
  • Gaussian Short Rate Process
  • Bates Process
  • Heston Process

Term Structures

Credit:

  • Piecewise Default Curve
  • Interpolated Hazard Rate Curve

Volatility:

  • Black Constant Vol
  • Constant Optionlet Volatility
  • Constant Swaption Volatility
  • Local Constant Vol

Yield:

  • Flat Forward
  • Fitted Bond Curve (various fitting methods)
  • Piecewise Yield Curve
  • Discount Curve

Example

Price a fixed rate Bond

using QuantLib
using Dates

settlement_date = Date(2008, 9, 18) # construct settlement date
# settings is a global singleton that contains global settings
set_eval_date!(settings, settlement_date - Dates.Day(3))

# settings that we will need to construct the yield curve
freq = QuantLib.Time.Semiannual()
tenor = QuantLib.Time.TenorPeriod(freq)
conv = QuantLib.Time.Unadjusted()
conv_depo = QuantLib.Time.ModifiedFollowing()
rule = QuantLib.Time.DateGenerationBackwards()
calendar = QuantLib.Time.USGovernmentBondCalendar()
dc_depo = QuantLib.Time.Actual365()
dc = QuantLib.Time.ISDAActualActual()
dc_bond = QuantLib.Time.ISMAActualActual()
fixing_days = 3

# build depos
depo_rates = [0.0096, 0.0145, 0.0194]
depo_tens = [Dates.Month(3), Dates.Month(6), Dates.Month(12)]

# build bonds
issue_dates = [Date(2005, 3, 15), Date(2005, 6, 15), Date(2006, 6, 30), Date(2002, 11, 15),
              Date(1987, 5, 15)]
mat_dates = [Date(2010, 8, 31), Date(2011, 8, 31), Date(2013, 8, 31), Date(2018, 8, 15),
            Date(2038, 5, 15)]

coupon_rates = [0.02375, 0.04625, 0.03125, 0.04000, 0.04500]
market_quotes = [100.390625, 106.21875, 100.59375, 101.6875, 102.140625]

# construct the deposit and fixed rate bond helpers
insts = Vector{BootstrapHelper}(undef, length(depo_rates) + length(issue_dates))
for i = 1:length(depo_rates)
  depo_quote = Quote(depo_rates[i])
  depo_tenor = QuantLib.Time.TenorPeriod(depo_tens[i])
  depo = DepositRateHelper(depo_quote, depo_tenor, fixing_days, calendar, conv_depo, true, dc_depo)
  insts[i] = depo
end

for i =1:length(coupon_rates)
  term_date = mat_dates[i]
  rate = coupon_rates[i]
  issue_date = issue_dates[i]
  market_quote = market_quotes[i]
  sched = QuantLib.Time.Schedule(issue_date, term_date, tenor, conv, conv, rule, true)
  bond = FixedRateBondHelper(Quote(market_quote), FixedRateBond(3, 100.0, sched, rate, dc_bond, conv,
                            100.0, issue_date, calendar, DiscountingBondEngine()))
  insts[i + length(depo_rates)] = bond
end

# Construct the Yield Curve
interp = QuantLib.Math.LogLinear()
trait = Discount()
bootstrap = IterativeBootstrap()
yts = PiecewiseYieldCurve(settlement_date, insts, dc, interp, trait, 0.00000000001, bootstrap)

# Build it
calculate!(yts)

# Build our Fixed Rate Bond
settlement_days = 3
face_amount = 100.0

fixed_schedule = QuantLib.Time.Schedule(Date(2007, 5, 15), Date(2017, 5, 15),
                QuantLib.Time.TenorPeriod(QuantLib.Time.Semiannual()), QuantLib.Time.Unadjusted(),
                QuantLib.Time.Unadjusted(), QuantLib.Time.DateGenerationBackwards(), false,
                QuantLib.Time.USGovernmentBondCalendar())

pe = DiscountingBondEngine(yts)

fixedrate_bond = FixedRateBond(settlement_days, face_amount, fixed_schedule, 0.045,
                  QuantLib.Time.ISMAActualActual(), QuantLib.Time.ModifiedFollowing(), 100.0,
                  Date(2007, 5, 15), fixed_schedule.cal, pe)

# Calculate NPV
npv(fixedrate_bond) # 107.66828913260542

quantlib.jl's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

quantlib.jl's Issues

Price bond with yield

I'm trying to price a fixed-rate coupon bond using the bond's yield. The code I'm using is the following:

using QuantLib, Dates

# Params
settlement_date = Date(2015, 1, 5)
maturity_date = Date(2025, 1, 1)
issue_date = Date(2010, 1, 1)
coupon_rate = 5 / 100
yild = 5 / 100
face = 100.0

# Run
set_eval_date!(settings, settlement_date)

fixed_schedule = QuantLib.Time.Schedule(issue_date, maturity_date, QuantLib.Time.TenorPeriod(QuantLib.Time.Semiannual()), QuantLib.Time.Unadjusted(), QuantLib.Time.Unadjusted(), QuantLib.Time.DateGenerationBackwards(), false, QuantLib.Time.USGovernmentBondCalendar());
ts = FlatForwardTermStructure(0, QuantLib.Time.USGovernmentBondCalendar(), Quote(yild), QuantLib.Time.ISMAActualActual(), CompoundedCompounding() , QuantLib.Time.Semiannual());

bond = FixedRateBond(0, face, fixed_schedule, coupon_rate, QuantLib.Time.ISMAActualActual(), QuantLib.Time.ModifiedFollowing(), face, issue_date, fixed_schedule.cal, DiscountingBondEngine(ts));
npv(bond)

This returns the following error: ERROR: negative time not allowed! Time fraction is -4.5. If I re-run the last two lines, the code works, however, and I get a price of 100. Am I doing something wrong in the first run of the code?

Issue with Dierckx

I'm unable to use QuantLib.jl due to some sort of problem with Dierckx or QuantLib itself.
I've tried the recommended fixed to manually install Dierckx, build, it, et cetera, to no avail.

LoadError: Dierckx is not properly installed. Please run Pkg.build("Dierckx")
Stacktrace:
[1] error(s::String)
@ Base .\error.jl:35
[2] top-level scope
@ ~localPath.julia\packages\Dierckx\ZTanR\src\Dierckx.jl:29
[3] include
@ .\Base.jl:419 [inlined]
[4] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::String)
@ Base .\loading.jl:1554
[5] top-level scope
@ stdin:1
in expression starting at ~localPath.julia\packages\Dierckx\ZTanR\src\Dierckx.jl:3
in expression starting at stdin:1
ERROR: LoadError: Failed to precompile Dierckx [39dd38d3-220a-591b-8e3c-4c3a8c710a94] to ~localPath.julia\compiled\v1.8\Dierckx\jl_7F84.tmp.
Stacktrace:
[1] error(s::String)
@ Base .\error.jl:35
[2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
@ Base .\loading.jl:1707
[3] compilecache
@ .\loading.jl:1651 [inlined]
[4] _require(pkg::Base.PkgId)
@ Base .\loading.jl:1337
[5] _require_prelocked(uuidkey::Base.PkgId)
@ Base .\loading.jl:1200
[6] macro expansion
@ .\loading.jl:1180 [inlined]
[7] macro expansion
@ .\lock.jl:223 [inlined]
[8] require(into::Module, mod::Symbol)
@ Base .\loading.jl:1144
[9] include(mod::Module, _path::String)
@ Base .\Base.jl:419
[10] include(x::String)
@ QuantLib ~localPath.julia\packages\QuantLib\9xmul\src\QuantLib.jl:3
[11] top-level scope
@ ~localPath.julia\packages\QuantLib\9xmul\src\QuantLib.jl:37
[12] include
@ .\Base.jl:419 [inlined]
[13] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::Nothing)
@ Base .\loading.jl:1554
[14] top-level scope
@ stdin:1
in expression starting at ~localPath.julia\packages\QuantLib\9xmul\src\math\Math.jl:2
in expression starting at ~localPath.julia\packages\QuantLib\9xmul\src\QuantLib.jl:3
in expression starting at stdin:1
ERROR: Failed to precompile QuantLib [96a2b5a2-274e-5d11-8b3e-35bccd200598] to ~localPath.julia\compiled\v1.8\QuantLib\jl_7ED9.tmp.
Stacktrace:
[1] error(s::String)
@ Base .\error.jl:35
[2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
@ Base .\loading.jl:1707
[3] compilecache
@ .\loading.jl:1651 [inlined]
[4] _require(pkg::Base.PkgId)
@ Base .\loading.jl:1337
[5] _require_prelocked(uuidkey::Base.PkgId)
@ Base .\loading.jl:1200
[6] macro expansion
@ .\loading.jl:1180 [inlined]
[7] macro expansion
@ .\lock.jl:223 [inlined]
[8] require(into::Module, mod::Symbol)
@ Base .\loading.jl:1144

Is this project still being maintained?

Just wondering if this project is still being maintained, since it has not been updated for a long time. If it is being maintained, when will it be compatible with Julia 1.0?

Backwards schedule bug?

I am getting wrong schedule output in couple of situations. Here is one example:

  using QuantLib
 
  effectiveDate = Date(2021,9,15)
  terminationDate =  Date(2032,9,1)
  convention = QuantLib.Time.Unadjusted()
  termDateConvention = QuantLib.Time.Unadjusted()
  cal = QuantLib.Time.TargetCalendar()
  tenor = QuantLib.Time.TenorPeriod(ql.Time.Monthly())
  
  QuantLib.Time.Schedule(effectiveDate,
                          terminationDate,
                          tenor,
                          convention,
                          termDateConvention,
                          QuantLib.Time.DateGenerationBackwards(), 
                          false,
                          cal).dates

The output starts as follows:

  134-element Vector{Date}:
   2021-09-15
   2021-09-01
   2021-10-01

I.e., there is one too many elements in the output vector (wrongly includes 2021-09-01). The issue lies in the function get_size. Instead of returning Int(ceil(ceil(Dates.value(td - ed) / 30) / Dates.value(p))), it looks like the function should return 12*(Dates.year(td) - Dates.year(ed)) + (Dates.month(td) - Dates.month(ed)) + 1

ERROR: Unsatisfiable requirements detected for package StatsBase

Hi,
I got an error when trying to install the most recent QuantLib version using Pkg (Julia 1.7.2, Win 11 64bit):

(@v1.7) pkg> add "https://github.com/pazzo83/QuantLib.jl"
    Updating git-repo `https://github.com/pazzo83/QuantLib.jl`
   Resolving package versions...
ERROR: Unsatisfiable requirements detected for package StatsBase [2913bbd2]:
 StatsBase [2913bbd2] log:
 ├─possible versions are: 0.24.0-0.33.16 or uninstalled
 ├─restricted to versions 0.32 by QuantLib [96a2b5a2], leaving only versions 0.32.0-0.32.2
 │ └─QuantLib [96a2b5a2] log:
 │   ├─possible versions are: 0.1.1 or uninstalled
 │   └─QuantLib [96a2b5a2] is fixed to version 0.1.1
 └─restricted by compatibility requirements with ValueAtRisk [a6faba0b] to versions: 0.33.0-0.33.16 — no versions left
   └─ValueAtRisk [a6faba0b] log:
     ├─possible versions are: 1.0.0 or uninstalled
     └─restricted to versions * by an explicit requirement, leaving only versions 1.0.0

Could you please check?
Thanks!

Unsatisfiable requirements detected for package StatsFuns

Hi,

I got an error when trying to install the most recent QuantLib version using Pkg on a blank Julia environment (Julia 1.3.1, Win 10 64bit):

PS C:\temp> julia
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.3.1 (2019-12-30)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

(v1.3) pkg> activate .
Activating new environment at `C:\temp\Project.toml`

(temp) pkg> add https://github.com/pazzo83/QuantLib.jl
  Updating registry at `C:\Users\xxxxx\.julia\registries\General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
  Updating git-repo `https://github.com/pazzo83/QuantLib.jl`
  Updating git-repo `https://github.com/pazzo83/QuantLib.jl`
 Resolving package versions...
ERROR: Unsatisfiable requirements detected for package StatsFuns [4c63d2b9]:
 StatsFuns [4c63d2b9] log:
 ├─possible versions are: [0.7.0-0.7.1, 0.8.0, 0.9.0-0.9.3] or uninstalled
 ├─restricted to versions 0.9 by QuantLib [96a2b5a2], leaving only versions 0.9.0-0.9.3
 │ └─QuantLib [96a2b5a2] log:
 │   ├─possible versions are: 0.1.0 or uninstalled
 │   └─QuantLib [96a2b5a2] is fixed to version 0.1.0
 └─restricted by compatibility requirements with SpecialFunctions [276daf66] to versions: [0.7.0-0.7.1, 0.8.0] or uninstalled — no versions left
   └─SpecialFunctions [276daf66] log:
     ├─possible versions are: [0.7.0-0.7.2, 0.8.0, 0.9.0, 0.10.0] or uninstalled
     └─restricted to versions 0.10 by QuantLib [96a2b5a2], leaving only versions 0.10.0
       └─QuantLib [96a2b5a2] log: see above

(temp) pkg>

Could you please check?
Thanks!

Possible Roadmap or future plans?

It would be very fortunate to have a Roadmap of features that are missing, as well as the current scope of the next releases! Not only for the users of the library, but for people interested in contributing, such as myself.

Looking forward to helping expand the library! (maybe some Portfolio Allocation or risk modules would be very interesting!)

Precompile error in Julia 1.3.

julia> using Pkg

julia> Pkg.clone("https://github.com/pazzo83/QuantLib.jl.git")
┌ Warning: Pkg.clone is only kept for legacy CI script reasons, please use add
└ @ Pkg.API D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Pkg\src\API.jl:664
Cloning git-repo https://github.com/pazzo83/QuantLib.jl.git
Updating git-repo https://github.com/pazzo83/QuantLib.jl.git
Resolving package versions...
Updating C:\Users\abhis\.julia\environments\v1.3\Project.toml
[96a2b5a2] ~ QuantLib v0.1.1 ⇒ v0.1.1 [C:\Users\abhis\.julia\dev\QuantLib]
Updating C:\Users\abhis\.julia\environments\v1.3\Manifest.toml
[96a2b5a2] ~ QuantLib v0.1.1 ⇒ v0.1.1 [C:\Users\abhis\.julia\dev\QuantLib]

julia> using QuantLib
[ Info: Precompiling QuantLib [96a2b5a2-274e-5d11-8b3e-35bccd200598]
ERROR: LoadError: Dierckx is not properly installed. Please run Pkg.build("Dierckx")
Stacktrace:
[1] error(::String) at .\error.jl:33
[2] top-level scope at C:\Users\abhis.julia\packages\Dierckx\ZTanR\src\Dierckx.jl:29
[3] include at .\boot.jl:328 [inlined]
[4] include_relative(::Module, ::String) at .\loading.jl:1105
[5] include(::Module, ::String) at .\Base.jl:31
[6] top-level scope at none:2
[7] eval at .\boot.jl:330 [inlined]
[8] eval(::Expr) at .\client.jl:425
[9] top-level scope at .\none:3
in expression starting at C:\Users\abhis.julia\packages\Dierckx\ZTanR\src\Dierckx.jl:26
ERROR: LoadError: LoadError: Failed to precompile Dierckx [39dd38d3-220a-591b-8e3c-4c3a8c710a94] to C:\Users\abhis.julia\compiled\v1.3\Dierckx\R6rOy_3zdO0.ji.
Stacktrace:
[1] error(::String) at .\error.jl:33
[2] compilecache(::Base.PkgId, ::String) at .\loading.jl:1283
[3] _require(::Base.PkgId) at .\loading.jl:1024
[4] require(::Base.PkgId) at .\loading.jl:922
[5] require(::Module, ::Symbol) at .\loading.jl:917
[6] include at .\boot.jl:328 [inlined]
[7] include_relative(::Module, ::String) at .\loading.jl:1105
[8] include at .\Base.jl:31 [inlined]
[9] include(::String) at C:\Users\abhis.julia\dev\QuantLib\src\QuantLib.jl:3
[10] top-level scope at C:\Users\abhis.julia\dev\QuantLib\src\QuantLib.jl:37
[11] include at .\boot.jl:328 [inlined]
[12] include_relative(::Module, ::String) at .\loading.jl:1105
[13] include(::Module, ::String) at .\Base.jl:31
[14] top-level scope at none:2
[15] eval at .\boot.jl:330 [inlined]
[16] eval(::Expr) at .\client.jl:425
[17] top-level scope at .\none:3
in expression starting at C:\Users\abhis.julia\dev\QuantLib\src\math\Math.jl:4
in expression starting at C:\Users\abhis.julia\dev\QuantLib\src\QuantLib.jl:37
ERROR: Failed to precompile QuantLib [96a2b5a2-274e-5d11-8b3e-35bccd200598] to C:\Users\abhis.julia\compiled\v1.3\QuantLib\UVyJK_3zdO0.ji.
Stacktrace:
[1] error(::String) at .\error.jl:33
[2] compilecache(::Base.PkgId, ::String) at .\loading.jl:1283
[3] _require(::Base.PkgId) at .\loading.jl:1024
[4] require(::Base.PkgId) at .\loading.jl:922
[5] require(::Module, ::Symbol) at .\loading.jl:917

error on runtest

Error is occur in test case bonds.jl, In Windows

Error message is that

Test Failed
Expression: clean_price(callableBond) == 96.46794584230872
Evaluated: 96.46794584230878 == 96.46794584230872

in c++ version of Quantlib
clean price of callableBond is 96.46794584230875

check Plz

Correct Julia patterns?

Hi,

This is going to be an odd question.

I'm comfortable with the original QuantLib C++ projects and all the patterns that it uses (and there are a lot of them), e.g. the LazyObject. I'm starting out with a new MIT-licensed actuarial library and I want to write it in Julia, but borrowing many of the concepts from QuantLib. But I also want to follow propery Julia patterns. I don't know enough Julia yet to know what those correct patterns are. So I'd like to know whether you consider this QuantLib.jl to be correctly implemented according to the latest Julia standards. If so, that would be great and I'd be able to use it as a base for my project (which I hope you don't mind).

thanks

getting started, Failed to precompile Distributions

New to julia, trying out the QuantLib package. It doesn't seem to install.

# ./julia
               _
   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: https://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?help" for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.5.2 (2017-05-06 16:34 UTC)
 _/ |\__'_|_|_|\__'_|  |  Official http://julialang.org/ release
|__/                   |  x86_64-pc-linux-gnu

julia> 

julia> Pkg.clone("https://github.com/pazzo83/QuantLib.jl.git")
INFO: Cloning QuantLib from https://github.com/pazzo83/QuantLib.jl.git
INFO: Computing changes...
INFO: Cloning cache of BinDeps from https://github.com/JuliaLang/BinDeps.jl.git
INFO: Cloning cache of Calculus from https://github.com/johnmyleswhite/Calculus.jl.git
INFO: Cloning cache of Compat from https://github.com/JuliaLang/Compat.jl.git
INFO: Cloning cache of DataStructures from https://github.com/JuliaCollections/DataStructures.jl.git
INFO: Cloning cache of Dierckx from https://github.com/kbarbary/Dierckx.jl.git
INFO: Cloning cache of Distributions from https://github.com/JuliaStats/Distributions.jl.git
INFO: Cloning cache of PDMats from https://github.com/JuliaStats/PDMats.jl.git
INFO: Cloning cache of QuadGK from https://github.com/JuliaMath/QuadGK.jl.git
INFO: Cloning cache of Rmath from https://github.com/JuliaStats/Rmath.jl.git
INFO: Cloning cache of SHA from https://github.com/staticfloat/SHA.jl.git
INFO: Cloning cache of Sobol from https://github.com/stevengj/Sobol.jl.git
INFO: Cloning cache of SpecialFunctions from https://github.com/JuliaMath/SpecialFunctions.jl.git
INFO: Cloning cache of StatsBase from https://github.com/JuliaStats/StatsBase.jl.git
INFO: Cloning cache of StatsFuns from https://github.com/JuliaStats/StatsFuns.jl.git
INFO: Cloning cache of URIParser from https://github.com/JuliaWeb/URIParser.jl.git
INFO: Installing BinDeps v0.6.0
INFO: Installing Calculus v0.2.2
INFO: Installing Compat v0.26.0
INFO: Installing DataStructures v0.5.3
INFO: Installing Dierckx v0.2.1
INFO: Installing Distributions v0.13.0
INFO: Installing PDMats v0.7.0
INFO: Installing QuadGK v0.1.2
INFO: Installing Rmath v0.1.6
INFO: Installing SHA v0.3.3
INFO: Installing Sobol v0.2.2
INFO: Installing SpecialFunctions v0.1.1
INFO: Installing StatsBase v0.16.0
INFO: Installing StatsFuns v0.5.0
INFO: Installing URIParser v0.1.8
INFO: Building Dierckx
ifort -c -fPIC -O3  bispeu.f -o bispeu.o
make: ifort: Command not found
Makefile:13: recipe for target 'bispeu.o' failed
make: *** [bispeu.o] Error 127
gfortran -c -fPIC -O3  bispeu.f -o bispeu.o
gfortran -c -fPIC -O3  bispev.f -o bispev.o
gfortran -c -fPIC -O3  clocur.f -o clocur.o
gfortran -c -fPIC -O3  cocosp.f -o cocosp.o
gfortran -c -fPIC -O3  concon.f -o concon.o
gfortran -c -fPIC -O3  concur.f -o concur.o
gfortran -c -fPIC -O3  cualde.f -o cualde.o
gfortran -c -fPIC -O3  curev.f -o curev.o
gfortran -c -fPIC -O3  curfit.f -o curfit.o
gfortran -c -fPIC -O3  dblint.f -o dblint.o
gfortran -c -fPIC -O3  evapol.f -o evapol.o
gfortran -c -fPIC -O3  fourco.f -o fourco.o
gfortran -c -fPIC -O3  fpader.f -o fpader.o
gfortran -c -fPIC -O3  fpadno.f -o fpadno.o
gfortran -c -fPIC -O3  fpadpo.f -o fpadpo.o
gfortran -c -fPIC -O3  fpback.f -o fpback.o
gfortran -c -fPIC -O3  fpbacp.f -o fpbacp.o
gfortran -c -fPIC -O3  fpbfout.f -o fpbfout.o
gfortran -c -fPIC -O3  fpbisp.f -o fpbisp.o
gfortran -c -fPIC -O3  fpbspl.f -o fpbspl.o
gfortran -c -fPIC -O3  fpchec.f -o fpchec.o
gfortran -c -fPIC -O3  fpched.f -o fpched.o
gfortran -c -fPIC -O3  fpchep.f -o fpchep.o
gfortran -c -fPIC -O3  fpclos.f -o fpclos.o
gfortran -c -fPIC -O3  fpcoco.f -o fpcoco.o
gfortran -c -fPIC -O3  fpcons.f -o fpcons.o
gfortran -c -fPIC -O3  fpcosp.f -o fpcosp.o
gfortran -c -fPIC -O3  fpcsin.f -o fpcsin.o
gfortran -c -fPIC -O3  fpcurf.f -o fpcurf.o
gfortran -c -fPIC -O3  fpcuro.f -o fpcuro.o
gfortran -c -fPIC -O3  fpcyt1.f -o fpcyt1.o
gfortran -c -fPIC -O3  fpcyt2.f -o fpcyt2.o
gfortran -c -fPIC -O3  fpdeno.f -o fpdeno.o
gfortran -c -fPIC -O3  fpdisc.f -o fpdisc.o
gfortran -c -fPIC -O3  fpfrno.f -o fpfrno.o
gfortran -c -fPIC -O3  fpgivs.f -o fpgivs.o
gfortran -c -fPIC -O3  fpgrdi.f -o fpgrdi.o
gfortran -c -fPIC -O3  fpgrpa.f -o fpgrpa.o
gfortran -c -fPIC -O3  fpgrre.f -o fpgrre.o
gfortran -c -fPIC -O3  fpgrsp.f -o fpgrsp.o
gfortran -c -fPIC -O3  fpinst.f -o fpinst.o
gfortran -c -fPIC -O3  fpintb.f -o fpintb.o
gfortran -c -fPIC -O3  fpknot.f -o fpknot.o
gfortran -c -fPIC -O3  fpopdi.f -o fpopdi.o
gfortran -c -fPIC -O3  fpopsp.f -o fpopsp.o
gfortran -c -fPIC -O3  fporde.f -o fporde.o
gfortran -c -fPIC -O3  fppara.f -o fppara.o
gfortran -c -fPIC -O3  fppasu.f -o fppasu.o
gfortran -c -fPIC -O3  fpperi.f -o fpperi.o
gfortran -c -fPIC -O3  fppocu.f -o fppocu.o
gfortran -c -fPIC -O3  fppogr.f -o fppogr.o
gfortran -c -fPIC -O3  fppola.f -o fppola.o
gfortran -c -fPIC -O3  fprank.f -o fprank.o
gfortran -c -fPIC -O3  fprati.f -o fprati.o
gfortran -c -fPIC -O3  fpregr.f -o fpregr.o
gfortran -c -fPIC -O3  fprota.f -o fprota.o
gfortran -c -fPIC -O3  fprppo.f -o fprppo.o
gfortran -c -fPIC -O3  fprpsp.f -o fprpsp.o
gfortran -c -fPIC -O3  fpseno.f -o fpseno.o
gfortran -c -fPIC -O3  fpspgr.f -o fpspgr.o
gfortran -c -fPIC -O3  fpsphe.f -o fpsphe.o
gfortran -c -fPIC -O3  fpsuev.f -o fpsuev.o
gfortran -c -fPIC -O3  fpsurf.f -o fpsurf.o
gfortran -c -fPIC -O3  fpsysy.f -o fpsysy.o
gfortran -c -fPIC -O3  fptrnp.f -o fptrnp.o
gfortran -c -fPIC -O3  fptrpe.f -o fptrpe.o
gfortran -c -fPIC -O3  insert.f -o insert.o
gfortran -c -fPIC -O3  parcur.f -o parcur.o
gfortran -c -fPIC -O3  parder.f -o parder.o
gfortran -c -fPIC -O3  pardeu.f -o pardeu.o
gfortran -c -fPIC -O3  parsur.f -o parsur.o
gfortran -c -fPIC -O3  percur.f -o percur.o
gfortran -c -fPIC -O3  pogrid.f -o pogrid.o
gfortran -c -fPIC -O3  polar.f -o polar.o
gfortran -c -fPIC -O3  profil.f -o profil.o
gfortran -c -fPIC -O3  regrid.f -o regrid.o
gfortran -c -fPIC -O3  spalde.f -o spalde.o
gfortran -c -fPIC -O3  spgrid.f -o spgrid.o
gfortran -c -fPIC -O3  sphere.f -o sphere.o
gfortran -c -fPIC -O3  splder.f -o splder.o
gfortran -c -fPIC -O3  splev.f -o splev.o
gfortran -c -fPIC -O3  splint.f -o splint.o
gfortran -c -fPIC -O3  sproot.f -o sproot.o
gfortran -c -fPIC -O3  surev.f -o surev.o
gfortran -c -fPIC -O3  surfit.f -o surfit.o
gfortran -o libddierckx.so -shared bispeu.o bispev.o clocur.o cocosp.o concon.o concur.o cualde.o curev.o curfit.o dblint.o evapol.o fourco.o fpader.o fpadno.o fpadpo.o fpback.o fpbacp.o fpbfout.o fpbisp.o fpbspl.o fpchec.o fpched.o fpchep.o fpclos.o fpcoco.o fpcons.o fpcosp.o fpcsin.o fpcurf.o fpcuro.o fpcyt1.o fpcyt2.o fpdeno.o fpdisc.o fpfrno.o fpgivs.o fpgrdi.o fpgrpa.o fpgrre.o fpgrsp.o fpinst.o fpintb.o fpknot.o fpopdi.o fpopsp.o fporde.o fppara.o fppasu.o fpperi.o fppocu.o fppogr.o fppola.o fprank.o fprati.o fpregr.o fprota.o fprppo.o fprpsp.o fpseno.o fpspgr.o fpsphe.o fpsuev.o fpsurf.o fpsysy.o fptrnp.o fptrpe.o insert.o parcur.o parder.o pardeu.o parsur.o percur.o pogrid.o polar.o profil.o regrid.o spalde.o spgrid.o sphere.o splder.o splev.o splint.o sproot.o surev.o surfit.o
INFO: Building Rmath
INFO: Attempting to Create directory /root/.julia/v0.5/Rmath/deps/downloads
INFO: Downloading file https://github.com/JuliaLang/Rmath-julia/archive/v0.1.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   127    0   127    0     0    415      0 --:--:-- --:--:-- --:--:--   416
100  165k  100  165k    0     0   303k      0 --:--:-- --:--:-- --:--:--  303k
INFO: Done downloading file https://github.com/JuliaLang/Rmath-julia/archive/v0.1.tar.gz
INFO: Attempting to Create directory /root/.julia/v0.5/Rmath/deps/src
INFO: Attempting to Create directory /root/.julia/v0.5/Rmath/deps
INFO: Directory /root/.julia/v0.5/Rmath/deps already created
INFO: Attempting to Create directory /root/.julia/v0.5/Rmath/deps/usr/lib
INFO: Changing Directory to /root/.julia/v0.5/Rmath/deps/src/Rmath-julia-0.1
make -C src
make[1]: Entering directory '/root/.julia/v0.5/Rmath/deps/src/Rmath-julia-0.1/src'
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c bd0.c -o bd0.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c dnbeta.c -o dnbeta.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c i1mach.c -o i1mach.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c pnbinom.c -o pnbinom.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c qlnorm.c -o qlnorm.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c rgeom.c -o rgeom.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c bessel_i.c -o bessel_i.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c dnbinom.c -o dnbinom.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c imax2.c -o imax2.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c pnchisq.c -o pnchisq.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c qlogis.c -o qlogis.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c rhyper.c -o rhyper.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c bessel_j.c -o bessel_j.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c dnchisq.c -o dnchisq.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c imin2.c -o imin2.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c pnf.c -o pnf.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c qnbeta.c -o qnbeta.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c rlnorm.c -o rlnorm.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c bessel_k.c -o bessel_k.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c dnf.c -o dnf.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c lbeta.c -o lbeta.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c pnorm.c -o pnorm.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c qnbinom.c -o qnbinom.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c rlogis.c -o rlogis.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c bessel_y.c -o bessel_y.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c dnorm.c -o dnorm.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c lgamma.c -o lgamma.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c pnt.c -o pnt.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c qnchisq.c -o qnchisq.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c rmultinom.c -o rmultinom.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c beta.c -o beta.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c dnt.c -o dnt.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c lgammacor.c -o lgammacor.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c polygamma.c -o polygamma.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c qnf.c -o qnf.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c rnbinom.c -o rnbinom.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c chebyshev.c -o chebyshev.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c dpois.c -o dpois.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c log1p.c -o log1p.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c ppois.c -o ppois.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c qnorm.c -o qnorm.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c rnchisq.c -o rnchisq.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c choose.c -o choose.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c dt.c -o dt.o
dt.c: In function ‘dt’:
dt.c:80:44: warning: ‘ax’ may be used uninitialized in this function [-Wmaybe-uninitialized]
     double I_sqrt_ = (lrg_x2n ? sqrt(n)/ax : exp(-l_x2n));
                                            ^
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c mlutils.c -o mlutils.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c pt.c -o pt.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c qnt.c -o qnt.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c rnorm.c -o rnorm.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c d1mach.c -o d1mach.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c dunif.c -o dunif.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c pbeta.c -o pbeta.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c ptukey.c -o ptukey.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c qpois.c -o qpois.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c rpois.c -o rpois.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c dbeta.c -o dbeta.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c dweibull.c -o dweibull.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c pbinom.c -o pbinom.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c punif.c -o punif.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c qt.c -o qt.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c rt.c -o rt.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c dbinom.c -o dbinom.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c expm1.c -o expm1.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c pcauchy.c -o pcauchy.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c pweibull.c -o pweibull.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c qtukey.c -o qtukey.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c runif.c -o runif.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c dcauchy.c -o dcauchy.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c fmax2.c -o fmax2.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c pchisq.c -o pchisq.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c qbeta.c -o qbeta.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c qunif.c -o qunif.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c rweibull.c -o rweibull.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c dchisq.c -o dchisq.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c fmin2.c -o fmin2.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c pexp.c -o pexp.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c qbinom.c -o qbinom.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c qweibull.c -o qweibull.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c dexp.c -o dexp.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c fprec.c -o fprec.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c pf.c -o pf.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c qcauchy.c -o qcauchy.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c rbeta.c -o rbeta.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c sign.c -o sign.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c df.c -o df.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c fround.c -o fround.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c pgamma.c -o pgamma.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c qchisq.c -o qchisq.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c rbinom.c -o rbinom.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c signrank.c -o signrank.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c dgamma.c -o dgamma.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c fsign.c -o fsign.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c pgeom.c -o pgeom.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c qexp.c -o qexp.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c rcauchy.c -o rcauchy.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c dgeom.c -o dgeom.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c ftrunc.c -o ftrunc.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c phyper.c -o phyper.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c qf.c -o qf.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c rchisq.c -o rchisq.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c stirlerr.c -o stirlerr.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c dhyper.c -o dhyper.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c gamma.c -o gamma.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c plnorm.c -o plnorm.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c qgamma.c -o qgamma.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c rexp.c -o rexp.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c toms708.c -o toms708.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c dlnorm.c -o dlnorm.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c gamma_cody.c -o gamma_cody.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c plogis.c -o plogis.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c qgeom.c -o qgeom.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c rf.c -o rf.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c wilcox.c -o wilcox.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c dlogis.c -o dlogis.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c gammalims.c -o gammalims.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c pnbeta.c -o pnbeta.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c qhyper.c -o qhyper.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c rgamma.c -o rgamma.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c librandom.c -o librandom.o
gcc  -Wall -O3 -fPIC -DMATHLIB_STANDALONE -I/root/.julia/v0.5/Rmath/deps/dSFMT   -std=gnu99 -I../include -DNDEBUG -c randmtzig.c -o randmtzig.o
randmtzig.c: In function ‘gv_randi’:
randmtzig.c:92:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     return *((uint64_t *) &r) & 0x000fffffffffffff;
     ^
randmtzig.c: In function ‘randi’:
randmtzig.c:104:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     return *((uint64_t *) &r) & 0x000fffffffffffff;
     ^
rm -rf libRmath-julia.so
gcc   -shared -o libRmath-julia.so bd0.o dnbeta.o i1mach.o pnbinom.o qlnorm.o rgeom.o bessel_i.o dnbinom.o imax2.o pnchisq.o qlogis.o rhyper.o bessel_j.o dnchisq.o imin2.o pnf.o qnbeta.o rlnorm.o bessel_k.o dnf.o lbeta.o pnorm.o qnbinom.o rlogis.o bessel_y.o dnorm.o lgamma.o pnt.o qnchisq.o rmultinom.o beta.o dnt.o lgammacor.o polygamma.o qnf.o rnbinom.o chebyshev.o dpois.o log1p.o ppois.o qnorm.o rnchisq.o choose.o dt.o mlutils.o pt.o qnt.o rnorm.o d1mach.o dunif.o pbeta.o ptukey.o qpois.o rpois.o dbeta.o dweibull.o pbinom.o punif.o qt.o rt.o dbinom.o expm1.o pcauchy.o pweibull.o qtukey.o runif.o dcauchy.o fmax2.o pchisq.o qbeta.o qunif.o rweibull.o dchisq.o fmin2.o pexp.o qbinom.o qweibull.o dexp.o fprec.o pf.o qcauchy.o rbeta.o sign.o df.o fround.o pgamma.o qchisq.o rbinom.o signrank.o dgamma.o fsign.o pgeom.o qexp.o rcauchy.o dgeom.o ftrunc.o phyper.o qf.o rchisq.o stirlerr.o dhyper.o gamma.o plnorm.o qgamma.o rexp.o toms708.o dlnorm.o gamma_cody.o plogis.o qgeom.o rf.o wilcox.o dlogis.o gammalims.o pnbeta.o qhyper.o rgamma.o librandom.o randmtzig.o -L/root/vol/julia-f4c6c9d4bb/bin/../lib/julia -ldSFMT
make[1]: Leaving directory '/root/.julia/v0.5/Rmath/deps/src/Rmath-julia-0.1/src'
INFO: Changing Directory to /root/.julia/v0.5/Rmath/deps/src/Rmath-julia-0.1

julia> using QuantLib
INFO: Precompiling module Dierckx.
INFO: Precompiling module Distributions.
ERROR: LoadError: LoadError: LoadError: Failed to precompile Distributions to /root/.julia/lib/v0.5/Distributions.ji.
 in compilecache(::String) at ./loading.jl:593
 in require(::Symbol) at ./loading.jl:422
 in include_from_node1(::String) at ./loading.jl:488 (repeats 3 times)
 in eval(::Module, ::Any) at ./boot.jl:234
 in require(::Symbol) at ./loading.jl:415
while loading /root/.julia/v0.5/QuantLib/src/math/distributions.jl, in expression starting on line 2
while loading /root/.julia/v0.5/QuantLib/src/math/Math.jl, in expression starting on line 116
while loading /root/.julia/v0.5/QuantLib/src/QuantLib.jl, in expression starting on line 36

julia> 

main2 in bond_test_code.jl

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!

Use expm1

Just because my eye fell on it, julia has expm1(x) which is numerically stable for exp(x)-1 as for example in the Ornstein-Uhlenbeck code, (1.0 - exp(-2.0 * process.speed * dt))

Build Yield Term Structure Fitting Methods with ZeroCouponBonds

Hi, @pazzo83!

I've been trying to fit a Yield Term Structure using BondHelpers in the last couple of days.

As I went into the documentation I noticed that FittedBondCurve type recieves an Vector{BondHelper} argument and BondHelper type receives a FixedRateBond type and a Quote::Float64.

Everything went fine as I Fitted a Yts using maturity dates and Pair Yield Bonds (With regular coupon payment). I started to struggle when I tryied to use a Bullet Bond to fit the YTS.

If the Bullet Maturity is higher than 1 month, I can easily describe it as as FixedRateBond with a TenorPeriod(1 month,QuantLib.Time.Once()) and the program still works.

On the other hand, if the Bullet Maturity Date is lower than 1 month, I cannot set a TenorPeriod in days. I actually tryied to do that, but it seems that on schedule.jl the function get_size doesn't have an implementation like get_size(p::Dates.Day, ed::Date, td::Date) and results in an error.

Is there any workaround to deal with Bullets with maturity lower than 1 month? I tryied an alternative solution using ZeroCouponBond(), but it seems that BondHelpers() do not accept them.

ERROR: MethodError: Cannot convert an object of type ZeroCouponBond{QuantLib.Time.USGovernmentBondCalendar,DiscountingBondEngine{NullYieldTermStructure}} to an object of type BondHelper

Register as official Julia package

In my oppinion this package is very useful for a larger audience (at least it was very useful for me), therefore it would be great if you can register it as an official Julia package.

test error at test/swaptions.jl:93

Hi, I have just downloaded the package and run test in a clean environment. All tests pass but the last one. I am on Julia 1.6.1.

If I replay the swaptions.jl file , I get this error

julia> QuantLib.Math.is_close(npv(bermudanSwaption), 14.11010300956427)
false

due to

npv(bermudanSwaption)
14.110397004348162

Where do you think is the problem? with the npv(bermudanSwaption) code , or with the test constant?

Cross-currency swap

Hi @pazzo83

This package looks great and will be a good inspiration for me and my team.

I also considered QuantLib originally, but we are based in Asia and one of the most important swaps in this part of the world for institutional investors would be cross-currency swaps. I may have misunderstood, but it wasn't clear how QuantLib would handle cross-currency swaps. For example, see the "Further Developments" sections here:

It indicates an initial design flaw with QuantLib. Could this (or has this) been corrected with JQuantLib?

For our internal work, we value instruments not with a simple float, but with a type that has units, e.g. 10usd, 20sgd, etc.

Best regards,
Eric

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.