Coder Social home page Coder Social logo

jquantlib's Introduction

JQuantLib is a free, open-source, comprehensive framework for quantitative finance, written in 100% Java. It provides "quants" and Java application developers several mathematical and statistical tools needed for the valuation of shares, options, futures, swaps, and other financial instruments.

JQuantLib is based on QuantLib, which is written in C++, aiming to be a complete rewrite of QuantLib, offering features Java developers expect to find. JQuantLib aims to be fast, correct, strongly typed, well-documented, and user-friendly.

JQuantLib does its best efforts to mimic as close as possible the API exposed by QuantLib, offering a smooth transition path for developers and organizations willing to employ financial applications written in Java whilst keeping commitment to high performance and low latency.

More info: http://www.jquantlib.org

Quick guide for the impatient

On a Unix-like console

# branch from Github with git
git clone http://github.com/frgomes/jquantlib

# run demo number 9 (EquityOptions)
cd jquantlib
./sbt clean samples/run     # or simply `sbt clean samples/run` if you have SBT installed

For impatient developers

More info: http://www.jquantlib.org/en/latest/developersguide.html

Modules

Main modules

  • jquantlib -- main module, which resembles QuantLib/C++
  • jquantlib-helpers -- helper classes
  • jquantlib-contrib -- 3rd party contributions
  • jquantlib-samples -- sample code

Related software

  • jquantlib-ooplugin -- OpenOffice Calc plugin (outdated, not maintained)

-- Richard Gomes

jquantlib's People

Contributors

frgomes 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jquantlib's Issues

FixedRateBondHelper issue

I have a problem with FixedRateBondHelper . The following lines of code are almost the same as the ones at which I am making reference, but adapted for a single bond case. The code breaks with the error

"Exception in thread "main" java.lang.UnsupportedOperationException: Work in progress
at org.jquantlib.QL.validateExperimentalMode(QL.java:391)
at org.jquantlib.termstructures.yieldcurves.FixedRateBondHelper.(FixedRateBondHelper.java:104)".

Furthermore, I have tried the entire code (allowing for multiple bonds) but the exception arises at the same way.

Thanks in advance

	Date settlementDate = new Date(14, 5, 2018);
	new Settings().setEvaluationDate(settlementDate);

	double redemption = 100;
	final double zc3mQuote = 0.0096;
	final double zc6mQuote = 0.0145;
	final double zc1yQuote = 0.0194;

	final Quote zc3mRate = new SimpleQuote(zc3mQuote);
	final Quote zc6mRate = new SimpleQuote(zc6mQuote);
	final Quote zc1yRate = new SimpleQuote(zc1yQuote);

	final DayCounter zcBondsDayCounter = new Actual365Fixed();

	final int fixingDays = 3;
	final int settlementDays = 3;
	final Calendar calendar = new Target();

	final RateHelper zc3m = new DepositRateHelper(new Handle<Quote>(zc3mRate), new Period(3, TimeUnit.Months),
			fixingDays, calendar, BusinessDayConvention.ModifiedFollowing, true, zcBondsDayCounter);
	final RateHelper zc6m = new DepositRateHelper(new Handle<Quote>(zc6mRate), new Period(6, TimeUnit.Months),
			fixingDays, calendar, BusinessDayConvention.ModifiedFollowing, true, zcBondsDayCounter);
	final RateHelper zc1y = new DepositRateHelper(new Handle<Quote>(zc1yRate), new Period(1, TimeUnit.Years),
			fixingDays, calendar, BusinessDayConvention.ModifiedFollowing, true, zcBondsDayCounter);

	final Date issueDate = new Date(15, Month.March, 2018);
	final Date maturity = new Date(15, Month.March, 2020);

	final double couponRate = 0.02;
	final double marketQuote = 106.21875;

	final List<SimpleQuote> quote = new ArrayList<SimpleQuote>();
	final List<RelinkableHandle<Quote>> quoteHandle = new ArrayList<RelinkableHandle<Quote>>();
	final SimpleQuote sq = new SimpleQuote(marketQuote);
	final RelinkableHandle<Quote> handle = new RelinkableHandle<Quote>(sq);
	quote.add(sq);
	quoteHandle.add(handle);
	System.out.println(quoteHandle.get(0));

	final Schedule schedule = new Schedule(issueDate, maturity, new Period(Frequency.Semiannual),
			new UnitedStates(UnitedStates.Market.GOVERNMENTBOND), BusinessDayConvention.Unadjusted,
			BusinessDayConvention.Unadjusted, DateGeneration.Rule.Backward, false);
	

	final FixedRateBondHelper bondHelper = new FixedRateBondHelper(quoteHandle.get(0), settlementDays, 100.0,
			schedule, new double[] { couponRate }, new ActualActual(ActualActual.Convention.Bond),
			BusinessDayConvention.Unadjusted, redemption, issueDate);

Use Case Example

Hello,

Thank you for all the effort that you are making in creating a Java Quantlib library. I'm trying to use your library for options pricing and I don't find any example that could help me!
May you please publish some use cases that could be useful for anyone willing to use your library!

Best regards,
Ramzi Chaaben.

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.