Should I be using BinomialVanillaEngine or
BinomialConvertibleEngine? The CPP example uses BinomialConvertibleEngine and
that is what I used in the Java example, but the code you show below is BinomialVanillaEngine?
From: Tito Ingargiola
[mailto:[hidden email]]
Sent: Tuesday, June 10, 2008 7:29 AM
To: Rich Christy (Sky Road LLC); [hidden email]
Subject: Re: [Quantlib-users] Java Convertible Bond Example
Hi,
Judging from the following chunk from options.i,
"additiveeqpbinomialtree" or "eqp" should work...
else if (s
== "eqp" || s == "additiveeqpbinomialtree")
return new BinomialVanillaEnginePtr(
new BinomialVanillaEngine<AdditiveEQPBinomialTree>(
bsProcess,steps));
Note also that in the EquityOption.java example, the following works fine:
europeanOption.setPricingEngine(
new BinomialVanillaEngine(stochasticProcess,
"AdditiveEQPBinomialTree", timeSteps));
Perhaps you could share the troublesome code and I could see if it works in my
environment? Regards,
Tito.
"Rich Christy (Sky Road LLC)" <[hidden email]>
wrote:
Hi,
I took the ConvertibleBond.cpp example and created a Java
example from that one. The one problem I am having is trying to run the
Additive equiprobabilities method. Each time I do, I get the following
exception. Since the method just requires the correct spelling of the
method to be passed into the BinomialConvertibleEngine’s constructor, I am
curious what it should be for Java API.
Thanks,
Rich
Exception in thread "main"
java.lang.RuntimeException: unknown binomial engine type:
additiveeqpbinomialtree
at org.quantlib.QuantLibJNI.new_BinomialConvertibleEngine(Native Method)
at org.quantlib.BinomialConvertibleEngine.<init>(BinomialConvertibleEngine.java:37)
at org.quantlib.examples.ConvertibleBonds.printNPV(ConvertibleBonds.java:226)
at org.quantlib.examples.ConvertibleBonds.main(ConvertibleBonds.java:180)
Sky Road LLC Email Disclaimer
This message and any attachment transmitted with it (collectively, this
“Emailâ€) may contain confidential or privileged information. It is for the
sole use of the intended recipient(s). Any unauthorized review, use or disclosure
is prohibited. If you are not the intended recipient, please advise the sender
by reply email and destroy all copies of this Email. The information in this
Email is not intended to replace a recipient’s own internal processes for
evaluating a transaction. This Email should not be regarded as (i) a
recommendation to buy or refrain from buying any security; (ii) an offer to
sell or solicitation of an offer to buy any security; or (iii) an official
confirmation of any transaction. Sky Road cannot guarantee that the
transmission and content of this Email is secure or error-free. Sky Road does
not represent that this Email is accurate, uncorrupted, or free of viruses or
other harmful code.
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
| Free forum by Nabble | Edit this page |