Code Monkey home page Code Monkey logo

hquantlib's People

Contributors

clefru avatar npezolano avatar paulrzcz avatar

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hquantlib's Issues

Build failure with GHC 8.2

Error: While constructing the build plan, the following exceptions were encountered:

In the dependencies for hquantlib-0.0.4.0:
    hmatrix must match >=0.17.0.0 && <0.19.0.0, but the stack configuration has no specified version
            (latest applicable is 0.18.0.0)
    hmatrix-gsl must match >=0.17.0.0 && <0.19.0.0, but the stack configuration has no specified version
                (latest applicable is 0.18.0.1)
    hmatrix-special must match >=0.4.0 && <0.5.0, but the stack configuration has no specified version
                    (latest applicable is 0.4.0.1)
needed since hquantlib-0.0.4.0 is a build target.

Blocked by haskell-numerics/hmatrix#232

Gaussian copula

return bivariate_normal_cdf_(invCumNormal_(x), invCumNormal_(y));

Copulas

Implement all copulas from QuantLib:
frankcopula.hpp
galamboscopula.hpp
gumbelcopula.hpp
independentcopula.hpp
marshallolkincopula.hpp
plackettcopula.hpp

Priceable type class

Instruments should implement a Priceable class.

The class should include net value to given date.

Copula type class

Copula to be extracted to single type class with instances of different copulas

GHC 8.0.1 crashes compiling hquantlib-0.0.3.2 on Linux/i586

A complete build log running on openSUSE:Tumbleweed is attached below.

[   79s] + cd hquantlib-0.0.3.2
[   79s] ++ ghc --info
[   79s] ++ grep '"Booter version","8.0.1"'
[   79s] + '[' '!' ' ,("Booter version","8.0.1")' ']'
[   79s] + '[' -x Setup ']'
[   79s] + ghc --make -no-user-package-db Setup
[   79s] [1 of 1] Compiling Main             ( Setup.hs, Setup.o )
[   79s] 
[   79s] Setup.hs:4:1: warning: [-Wdeprecations]
[   79s]     Module `System.Cmd' is deprecated: Use "System.Process" instead
[   79s] Linking Setup ...
[   85s] + LANG=en_US.utf8
[   85s] + ./Setup configure -v --prefix=/usr --libdir=/usr/lib --docdir=/usr/share/doc/packages/ghc-hquantlib '--libsubdir=$compiler/$pkgkey' '--datasubdir=$pkgid' --ghc -p --enable-shared --htmldir=/usr/share/doc/ghc-8.0.1/html/libraries/hquantlib-0.0.3.2 --global
[   85s] Configuring hquantlib-0.0.3.2...
[   85s] Flags chosen: optimize=True
[   85s] Dependency base >3 && <5: using base-4.9.0.0
[   85s] Dependency containers >=0.5.0.0 && <0.6.0.0: using containers-0.5.7.1
[   85s] Dependency hmatrix >=0.17.0.0 && <0.18.0.0: using hmatrix-0.17.0.2
[   85s] Dependency hmatrix-gsl >=0.17.0.0 && <0.18.0.0: using hmatrix-gsl-0.17.0.0
[   85s] Dependency hmatrix-special >=0.4.0 && <0.5.0: using hmatrix-special-0.4.0.0
[   85s] Dependency hquantlib -any: using hquantlib-0.0.3.2
[   85s] Dependency mersenne-random >=1.0.0.1 && <2.0.0.0: using
[   85s] mersenne-random-1.0.0.1
[   85s] Dependency parallel >=3.2.0.0 && <3.3.0.0: using parallel-3.2.1.0
[   85s] Dependency statistics >=0.13.0.0 && <0.14.0.0: using statistics-0.13.3.0
[   85s] Dependency time >=1.4.0.0 && <1.7.0.0: using time-1.6.0.1
[   85s] Dependency vector >=0.11.0.0 && <0.12.0.0: using vector-0.11.0.0
[   85s] Dependency vector-algorithms >=0.7.0.0 && <0.8.0.0: using
[   85s] vector-algorithms-0.7.0.1
[   85s] Using Cabal-1.24.0.0 compiled by ghc-8.0
[   85s] Using compiler: ghc-8.0.1
[   85s] Using install prefix: /usr
[   85s] Binaries installed in: /usr/bin
[   85s] Libraries installed in:
[   85s] /usr/lib/ghc-8.0.1/hquantlib-0.0.3.2-DGOjZhUWsx7JCqVskspgqk
[   85s] Private binaries installed in: /usr/libexec
[   85s] Data files installed in: /usr/share/hquantlib-0.0.3.2
[   85s] Documentation installed in: /usr/share/doc/packages/ghc-hquantlib
[   85s] Configuration files installed in: /usr/etc
[   85s] No alex found
[   85s] Using ar found on system at: /usr/bin/ar
[   85s] No c2hs found
[   85s] No cpphs found
[   85s] Using gcc version 6 found on system at: /usr/bin/gcc
[   85s] Using ghc version 8.0.1 found on system at: /usr/bin/ghc
[   85s] Using ghc-pkg version 8.0.1 found on system at: /usr/bin/ghc-pkg
[   85s] No ghcjs found
[   85s] No ghcjs-pkg found
[   85s] No greencard found
[   85s] Using haddock version 2.17.2 found on system at: /usr/bin/haddock
[   85s] No happy found
[   85s] Using haskell-suite found on system at: haskell-suite-dummy-location
[   85s] Using haskell-suite-pkg found on system at: haskell-suite-pkg-dummy-location
[   85s] No hmake found
[   85s] Using hpc version 0.67 found on system at: /usr/bin/hpc
[   85s] Using hsc2hs version 0.68 found on system at: /usr/bin/hsc2hs
[   85s] No hscolour found
[   85s] No jhc found
[   85s] Using ld found on system at: /usr/bin/ld
[   85s] No lhc found
[   85s] No lhc-pkg found
[   85s] Using pkg-config version 0.29.1 found on system at: /usr/bin/pkg-config
[   85s] Using strip version 2.27 found on system at: /usr/bin/strip
[   85s] Using tar found on system at: /bin/tar
[   85s] No uhc found
[   85s] + '[' -x Setup ']'
[   85s] + LANG=en_US.utf8
[   85s] + ./Setup build -j8 -v
[   85s] Component build order: library, executable 'mctest'
[   85s] creating dist/build
[   85s] creating dist/build/autogen
[   85s] Building hquantlib-0.0.3.2...
[   85s] /usr/bin/ghc-pkg init dist/package.conf.inplace
[   85s] Preprocessing library hquantlib-0.0.3.2...
[   85s] Building library...
[   85s] creating dist/build
[   86s] /usr/bin/ghc --make -fbuilding-cabal-package -O -j8 -static -dynamic-too -dynosuf dyn_o -dynhisuf dyn_hi -outputdir dist/build -odir dist/build -hidir dist/build -stubdir dist/build -i -idist/build -isrc -idist/build/autogen -Idist/build/autogen -Idist/build -optP-include -optPdist/build/autogen/cabal_macros.h -this-unit-id hquantlib-0.0.3.2-DGOjZhUWsx7JCqVskspgqk -hide-all-packages -no-user-package-db -package-db dist/package.conf.inplace -package-id base-4.9.0.0 -package-id containers-0.5.7.1 -package-id hmatrix-0.17.0.2-HoBfYSJ1dMG9PoVkmbcnW2 -package-id hmatrix-gsl-0.17.0.0-4Eh4xqEHBmz83ZPjsogqwV -package-id hmatrix-special-0.4.0.0-GLR2wIwDLUVDLrfKLLIx2A -package-id mersenne-random-1.0.0.1-I3NVEvNvCsKId8PGpN9jQk -package-id parallel-3.2.1.0-6VcN0yUHtcs831TgbJiSSi -package-id statistics-0.13.3.0-9SRGA4XmgTO9cXlxqXSCQb -package-id time-1.6.0.1 -package-id vector-0.11.0.0-BEDZb5o2QOhGbIm6ky7rl6 -package-id vector-algorithms-0.7.0.1-8R8UpWgvBC926XMxBjYPpx -XHaskell2010 QuantLib QuantLib.Event QuantLib.Instruments QuantLib.Currencies QuantLib.Stochastic QuantLib.Priceable QuantLib.PricingEngines QuantLib.PricingEngines.BlackFormula QuantLib.Quotes QuantLib.Time QuantLib.TimeSeries QuantLib.Money QuantLib.Math QuantLib.Math.Copulas QuantLib.Models QuantLib.Models.Volatility QuantLib.Prices QuantLib.Position QuantLib.Options QuantLib.Methods.MonteCarlo QuantLib.Currencies.America QuantLib.Currencies.Europe QuantLib.Instruments.Instrument QuantLib.Instruments.Stock QuantLib.Stochastic.Discretize QuantLib.Stochastic.Process QuantLib.Stochastic.Random QuantLib.Currency QuantLib.Time.Date QuantLib.Time.DayCounter QuantLib.Math.InverseNormal -Wall -funbox-strict-fields -O2 -fspec-constr -fdicts-cheap
[   86s] [ 1 of 31] Compiling QuantLib.Math.Copulas ( src/QuantLib/Math/Copulas.hs, dist/build/QuantLib/Math/Copulas.o )
[   99s] 
[   99s] <no location info>: error:
[   99s]     <command line>: can't load .so/.DLL for: /usr/lib/ghc-8.0.1/hmatrix-special-0.4.0.0-GLR2wIwDLUVDLrfKLLIx2A/libHShmatrix-special-0.4.0.0-GLR2wIwDLUVDLrfKLLIx2A-ghc8.0.1.so (/usr/lib/ghc-8.0.1/hmatrix-special-0.4.0.0-GLR2wIwDLUVDLrfKLLIx2A/libHShmatrix-special-0.4.0.0-GLR2wIwDLUVDLrfKLLIx2A-ghc8.0.1.so: undefined symbol: gsl_sf_legendre_array_size)
[   99s] [ 2 of 31] Compiling QuantLib.Math.InverseNormal ( src/QuantLib/Math/InverseNormal.hs, dist/build/QuantLib/Math/InverseNormal.o )
[   99s] 
[   99s] <no location info>: error:
[   99s]     ghc: panic! (the 'impossible' happened)
[   99s]   (GHC version 8.0.1 for i386-unknown-linux):
[   99s]    Dynamic linker not initialised
[   99s] 
[   99s] Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
[   99s] 
[   99s] [ 3 of 31] Compiling QuantLib.Options ( src/QuantLib/Options.hs, dist/build/QuantLib/Options.o )
[   99s] [ 4 of 31] Compiling QuantLib.PricingEngines.BlackFormula ( src/QuantLib/PricingEngines/BlackFormula.hs, dist/build/QuantLib/PricingEngines/BlackFormula.o )
[   99s] 
[   99s] <no location info>: error:
[   99s]     ghc: panic! (the 'impossible' happened)
[   99s]   (GHC version 8.0.1 for i386-unknown-linux):
[   99s]    Dynamic linker not initialised
[   99s] 
[   99s] Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
[   99s] 
[   99s] [ 6 of 31] Compiling QuantLib.Priceable ( src/QuantLib/Priceable.hs, dist/build/QuantLib/Priceable.o )
[   99s] [11 of 31] Compiling QuantLib.Currency ( src/QuantLib/Currency.hs, dist/build/QuantLib/Currency.o )
[   99s] [12 of 31] Compiling QuantLib.Currencies.Europe ( src/QuantLib/Currencies/Europe.hs, dist/build/QuantLib/Currencies/Europe.o )
[   99s] [13 of 31] Compiling QuantLib.Currencies.America ( src/QuantLib/Currencies/America.hs, dist/build/QuantLib/Currencies/America.o )
[   99s] [14 of 31] Compiling QuantLib.Currencies ( src/QuantLib/Currencies.hs, dist/build/QuantLib/Currencies.o )
[   99s] [15 of 31] Compiling QuantLib.Instruments.Instrument ( src/QuantLib/Instruments/Instrument.hs, dist/build/QuantLib/Instruments/Instrument.o )
[   99s] [16 of 31] Compiling QuantLib.Instruments.Stock ( src/QuantLib/Instruments/Stock.hs, dist/build/QuantLib/Instruments/Stock.o )
[  100s] [17 of 31] Compiling QuantLib.Instruments ( src/QuantLib/Instruments.hs, dist/build/QuantLib/Instruments.o )
[  100s] [18 of 31] Compiling QuantLib.Time.Date ( src/QuantLib/Time/Date.hs, dist/build/QuantLib/Time/Date.o )
[  100s] [19 of 31] Compiling QuantLib.Time.DayCounter ( src/QuantLib/Time/DayCounter.hs, dist/build/QuantLib/Time/DayCounter.o )
[  101s] [20 of 31] Compiling QuantLib.Time    ( src/QuantLib/Time.hs, dist/build/QuantLib/Time.o )
[  101s] [22 of 31] Compiling QuantLib.Prices  ( src/QuantLib/Prices.hs, dist/build/QuantLib/Prices.o )
[  101s] [23 of 31] Compiling QuantLib.Event   ( src/QuantLib/Event.hs, dist/build/QuantLib/Event.o )
[  101s] [24 of 31] Compiling QuantLib.PricingEngines ( src/QuantLib/PricingEngines.hs, dist/build/QuantLib/PricingEngines.o )
[  101s] [25 of 31] Compiling QuantLib.TimeSeries ( src/QuantLib/TimeSeries.hs, dist/build/QuantLib/TimeSeries.o )
[  101s] [26 of 31] Compiling QuantLib.Models.Volatility ( src/QuantLib/Models/Volatility.hs, dist/build/QuantLib/Models/Volatility.o )
[  101s] 
[  101s] <no location info>: error:
[  101s]     ghc: panic! (the 'impossible' happened)
[  101s]   (GHC version 8.0.1 for i386-unknown-linux):
[  101s]    Dynamic linker not initialised
[  101s] 
[  101s] Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
[  101s] 
[  101s] [28 of 31] Compiling QuantLib.Position ( src/QuantLib/Position.hs, dist/build/QuantLib/Position.o )
[  101s] [29 of 31] Compiling QuantLib.Money   ( src/QuantLib/Money.hs, dist/build/QuantLib/Money.o )
[  101s] error: Bad exit status from /var/tmp/rpm-tmp.SWPysm (%build)

Compatibility with hs-linear-algebra package

"Hello Pavel,

I just tried to install hquantlib-0.0.2.0 and it fails because because:
gsl-random-0.4.3 requires vector versions < 0.8
hmatrix-0.13.0.0 requires vector >= 0.8

When I try to install an earlier version of hmatrix without this
constraint, namely, hmatrix-0.11.1.0 (still compatible with
hquantlib constraint) it fails due to duplicate instance
declarations in lib/Numeric/Vector.hs:44:10

I suspect that there is an inconsistency with Pat Perry's
hs-linear-algebra package, which is installed on my system,
together with later versions of hmatrix.

The upper bound constraint on gsl-random seems to
be the main problem, and it is not clear why this is needed
(gsl-random is not a vector package?).

Anyway, I wonder if you know about this problem and
perhaps you have found a work-around?

Thanks,
Dominick"

Shard Quantlib.Time into it's own package?

Hi,
We frequently run into a need to compute business days with respect to various calendars. The Quantlib.Time looks great for this task but the hmatrix dependency is prohibitive for compiling to GHCJS / ARM / iOS.

Any chance you'd consider making it a separate package?

Husler-Reiss copula

pow(x,cumNormal_(1.0/theta_+0.5_theta__log(-log(x)/-log(y))))pow(y,cumNormal(1.0/theta_+0.5_theta_*log(-log(y)/-log(x))));

Distribution type class

The probability distribution should be promoted in the package. I did not find any appropriate package with CDF supports.

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.