Package org.jquantlib.instruments

Examples of org.jquantlib.instruments.AssetOrNothingPayoff


                            payoff = new PlainVanillaPayoff(type, strike);
                        } else if (kk==1) {
                            //FIXME check constructor
                            payoff = new CashOrNothingPayoff(type, strike, 100);
                        } else if (kk==2) {
                            payoff = new AssetOrNothingPayoff(type, strike);
                        } else if (kk==3) {
                            payoff = new GapPayoff(type, strike, 100);
                        }

                        final BlackScholesMertonProcess stochProcess = new BlackScholesMertonProcess(
View Full Code Here


            DKDstrike = 0.0;
        }

        // binary asset-or-nothing payoff ?
        if (strikedTypePayoff instanceof AssetOrNothingPayoff) {
            final AssetOrNothingPayoff aoo = (AssetOrNothingPayoff) strikedTypePayoff;
            if (inTheMoney) {
                K = spot;
                DKDstrike = 0.0;
            } else {
                K = aoo.strike();
                DKDstrike = 1.0;
            }
        }
    }
View Full Code Here

        private final class AssetOrNothingPayoffVisitor implements Visitor<Payoff> {

            @Override
            public void visit(final Payoff o) {
                final AssetOrNothingPayoff payoff = (AssetOrNothingPayoff)o;
                black.beta = black.dBeta_dD2 = 0.0;
                final Option.Type optionType = payoff.optionType();
                if (optionType == Option.Type.Call) {
                    black.alpha = black.cum_d1;
                    black.dAlpha_dD1 = black.n_d1;
                } else if (optionType == Option.Type.Put) {
                    black.alpha = 1.0 - black.cum_d1;
View Full Code Here

            DKDstrike = 0.0;
        }

        // binary asset-or-nothing payoff ?
        if (strikedTypePayoff instanceof AssetOrNothingPayoff) {
            final AssetOrNothingPayoff aoo = (AssetOrNothingPayoff) strikedTypePayoff;
            if (inTheMoney) {
                K = spot;
                DKDstrike = 0.0;
            } else {
                K = aoo.strike();
                DKDstrike = 1.0;
            }
        }
    }
View Full Code Here

        private final class AssetOrNothingPayoffVisitor implements Visitor<Payoff> {

            @Override
            public void visit(final Payoff o) {
                final AssetOrNothingPayoff payoff = (AssetOrNothingPayoff)o;
                black.beta = black.dBeta_dD2 = 0.0;
                final Option.Type optionType = payoff.optionType();
                if (optionType == Option.Type.Call) {
                    black.alpha = black.cum_d1;
                    black.dAlpha_dD1 = black.n_d1;
                } else if (optionType == Option.Type.Put) {
                    black.alpha = 1.0 - black.cum_d1;
View Full Code Here

                            payoff = new PlainVanillaPayoff(type, strike);
                        } else if (kk==1) {
                            //FIXME check constructor
                            payoff = new CashOrNothingPayoff(type, strike, 100);
                        } else if (kk==2) {
                            payoff = new AssetOrNothingPayoff(type, strike);
                        } else if (kk==3) {
                            payoff = new GapPayoff(type, strike, 100);
                        }

                        final BlackScholesMertonProcess stochProcess = new BlackScholesMertonProcess(
View Full Code Here

                                    if (kk == 0) {
                                        payoff = new PlainVanillaPayoff(type, strike);
                                    } else if (kk == 1) {
                                        payoff = new CashOrNothingPayoff(type, strike, 100.0);
                                    } else if (kk == 2) {
                                        payoff = new AssetOrNothingPayoff(type, strike);
                                    } else if (kk == 3) {
                                        payoff = new GapPayoff(type, strike, 100.0);
                                    }
                                    final EuropeanOption option = new EuropeanOption(payoff, exercise);
                                    option.setPricingEngine(engine);
View Full Code Here

TOP

Related Classes of org.jquantlib.instruments.AssetOrNothingPayoff

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.