Package org.jquantlib.model

Examples of org.jquantlib.model.TermStructureFittingParameter$NumericalImpl


    // overrides OneFactorModel
    //

    @Override
    public Lattice tree(final TimeGrid grid) {
        final TermStructureFittingParameter phi = new TermStructureFittingParameter(termStructureConsistentModelClass.termStructure());
        // needed to activate the above constructor
        final ShortRateDynamics numericDynamics = (new Dynamics(phi, a(), sigma()));
        final TrinomialTree trinomial = new TrinomialTree(numericDynamics.process(), grid, true);
        final ShortRateTree numericTree = new OneFactorModel.ShortRateTree(trinomial, numericDynamics, grid);

        // typedef TermStructureFittingParameter::NumericalImpl NumericalImpl;
        final TermStructureFittingParameter.NumericalImpl impl = (TermStructureFittingParameter.NumericalImpl) phi.implementation();
        impl.reset();
        for (int /* @Size */i = 0; i < (grid.size() - 1); i++) {
            final double /* @Real */discountBond = termStructureConsistentModelClass.termStructure().currentLink().discount(grid.at(i + 1));
            final Array statePrices = numericTree.statePrices(i);
            final int /* @Size */size = numericTree.size(i);
View Full Code Here


    }

    @Override
    public Lattice tree(final TimeGrid grid){
        final TermStructureFittingParameter phi = new TermStructureFittingParameter(termstructureConsistentModel.termStructure());
        final Dynamics numericDynamics =  new Dynamics(phi, theta(), k(), sigma(), x0());
        final TrinomialTree trinominal = new TrinomialTree(numericDynamics.process(), grid, true);
        final TermStructureFittingParameter.NumericalImpl impl = (TermStructureFittingParameter.NumericalImpl)phi.implementation();
        return new OneFactorModel.ShortRateTree(trinominal, numericDynamics, impl, grid);
    }
View Full Code Here

    }

    @Override
    public Lattice tree(final TimeGrid grid){
        final TermStructureFittingParameter phi = new TermStructureFittingParameter(termstructureConsistentModel.termStructure());
        final Dynamics numericDynamics =  new Dynamics(phi, theta(), k(), sigma(), x0());
        final TrinomialTree trinominal = new TrinomialTree(numericDynamics.process(), grid, true);
        final TermStructureFittingParameter.NumericalImpl impl = (TermStructureFittingParameter.NumericalImpl)phi.implementation();
        return new OneFactorModel.ShortRateTree(trinominal, numericDynamics, impl, grid);
    }
View Full Code Here

    // overrides OneFactorModel
    //

    @Override
    public Lattice tree(final TimeGrid grid) {
        final TermStructureFittingParameter phi = new TermStructureFittingParameter(termStructureConsistentModelClass.termStructure());
        // needed to activate the above constructor
        final ShortRateDynamics numericDynamics = (new Dynamics(phi, a(), sigma()));
        final TrinomialTree trinomial = new TrinomialTree(numericDynamics.process(), grid, true);
        final ShortRateTree numericTree = new OneFactorModel.ShortRateTree(trinomial, numericDynamics, grid);

        // typedef TermStructureFittingParameter::NumericalImpl NumericalImpl;
        final TermStructureFittingParameter.NumericalImpl impl = (TermStructureFittingParameter.NumericalImpl) phi.implementation();
        impl.reset();
        for (int /* @Size */i = 0; i < (grid.size() - 1); i++) {
            final double /* @Real */discountBond = termStructureConsistentModelClass.termStructure().currentLink().discount(grid.at(i + 1));
            final Array statePrices = numericTree.statePrices(i);
            final int /* @Size */size = numericTree.size(i);
View Full Code Here

        throw new LibraryException(no_defined_process_for_bk); // QA:[RG]::verified
    }

    @Override
    public Lattice tree(final TimeGrid grid) {
        final TermStructureFittingParameter phi = new TermStructureFittingParameter(termstructureConsistentModel.termStructure());
        final ShortRateDynamics numericDynamics = (new Dynamics(phi, a(), sigma()));
        final TrinomialTree trinomial = new TrinomialTree(numericDynamics.process(), grid, true);
        final ShortRateTree numericTree = null;//new ShortRateTree(trinomial, numericDynamics, grid);

        final TermStructureFittingParameter.NumericalImpl impl = (TermStructureFittingParameter.NumericalImpl) (phi.implementation());
        impl.reset();
        double /* @Real */value = 1.0;
        final double /* @Real */vMin = -50.0;
        final double /* @Real */vMax = 50.0;
        for (int /* @Size */i = 0; i < (grid.size() - 1); i++) {
View Full Code Here

TOP

Related Classes of org.jquantlib.model.TermStructureFittingParameter$NumericalImpl

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.