Package org.jquantlib.instruments

Examples of org.jquantlib.instruments.CashOrNothingPayoff


                        // option to check
                        if (kk==0) {
                            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);
                        }
View Full Code Here


            //DXDstrike_ = ......; // TODO: code review :: please verify against QL/C++ code
        }

        // binary cash-or-nothing payoff ?
        if (strikedTypePayoff instanceof CashOrNothingPayoff) {
            final CashOrNothingPayoff coo = (CashOrNothingPayoff) strikedTypePayoff;
            K = coo.getCashPayoff();
            DKDstrike = 0.0;
        }

        // binary asset-or-nothing payoff ?
        if (strikedTypePayoff instanceof AssetOrNothingPayoff) {
View Full Code Here

        strike = strikedTypePayoff.strike();
        mu = Math.log(dividendDiscount / discount) / variance - 0.5;

        // binary cash-or-nothing payoff ?
        if (strikedTypePayoff instanceof CashOrNothingPayoff) {
            final CashOrNothingPayoff coo = (CashOrNothingPayoff) strikedTypePayoff;
            K = coo.getCashPayoff();
            DKDstrike = 0.0;
        }
        // binary asset-or-nothing payoff ?
        else if (strikedTypePayoff instanceof AssetOrNothingPayoff) {
            K = forward;
View Full Code Here

        private final class CashOrNothingPayoffVisitor implements Visitor<Payoff> {

            @Override
            public final void visit(final Payoff o) {
                final CashOrNothingPayoff payoff = (CashOrNothingPayoff)o;
                black.alpha = black.dAlpha_dD1 = 0.0;
                black.x = payoff.getCashPayoff();
                black.dx_dStrike = 0.0;
                final Option.Type optionType = payoff.optionType();
                if (optionType == Option.Type.Call) {
                    black.beta = black.cum_d2;
                    black.dBeta_dD2 = black.n_d2;
                } else if (optionType == Option.Type.Put) {
                    black.beta = 1.0 - black.cum_d2;
View Full Code Here

            //DXDstrike_ = ......; // TODO: code review :: please verify against QL/C++ code
        }

        // binary cash-or-nothing payoff ?
        if (strikedTypePayoff instanceof CashOrNothingPayoff) {
            final CashOrNothingPayoff coo = (CashOrNothingPayoff) strikedTypePayoff;
            K = coo.getCashPayoff();
            DKDstrike = 0.0;
        }

        // binary asset-or-nothing payoff ?
        if (strikedTypePayoff instanceof AssetOrNothingPayoff) {
View Full Code Here

        strike = strikedTypePayoff.strike();
        mu = Math.log(dividendDiscount / discount) / variance - 0.5;

        // binary cash-or-nothing payoff ?
        if (strikedTypePayoff instanceof CashOrNothingPayoff) {
            final CashOrNothingPayoff coo = (CashOrNothingPayoff) strikedTypePayoff;
            K = coo.getCashPayoff();
            DKDstrike = 0.0;
        }
        // binary asset-or-nothing payoff ?
        else if (strikedTypePayoff instanceof AssetOrNothingPayoff) {
            K = forward;
View Full Code Here

        private final class CashOrNothingPayoffVisitor implements Visitor<Payoff> {

            @Override
            public final void visit(final Payoff o) {
                final CashOrNothingPayoff payoff = (CashOrNothingPayoff)o;
                black.alpha = black.dAlpha_dD1 = 0.0;
                black.x = payoff.getCashPayoff();
                black.dx_dStrike = 0.0;
                final Option.Type optionType = payoff.optionType();
                if (optionType == Option.Type.Call) {
                    black.beta = black.cum_d2;
                    black.dBeta_dD2 = black.n_d2;
                } else if (optionType == Option.Type.Put) {
                    black.beta = 1.0 - black.cum_d2;
View Full Code Here

                        // option to check
                        if (kk==0) {
                            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);
                        }
View Full Code Here

                                    StrikedTypePayoff payoff = null;
                                    // option to check
                                    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);
                                    }
View Full Code Here

TOP

Related Classes of org.jquantlib.instruments.CashOrNothingPayoff

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.