Package org.wkh.bateman.trade

Examples of org.wkh.bateman.trade.FixedPercentageAllocationStrategy


        asset = new Asset("FOO", series);

        account = new Account(new BigDecimal(1000), today.minusDays(6));

        conditions = new Conditions(BigDecimal.ZERO, BigDecimal.ZERO);
        moneyManager = new FixedPercentageAllocationStrategy(0.2, asset);
        session = new Session(account, conditions);

        buyTrigger = 0.25;
        sellTrigger = 1.0;
        stopLoss = 1.0;
View Full Code Here


        asset = new Asset("FOO", series);

        account = new Account(new BigDecimal(1000), today.minusDays(6));

        conditions = new Conditions(BigDecimal.ZERO, BigDecimal.ZERO);
        moneyManager = new FixedPercentageAllocationStrategy(0.2, asset);
        session = new Session(account, conditions);

        buyTrigger = 0.4;
        sellTrigger = 1.0;
        stopLoss = 0.25;
View Full Code Here

        final Asset asset = new Asset(symbol, series);

        final Conditions conditions = new Conditions(new BigDecimal(commissions), new BigDecimal(slippage));

        final MoneyManagementStrategy moneyManager = new FixedPercentageAllocationStrategy(allocation, asset);

        FitnessFunction fitness = new FitnessFunction() {
            public double evaluate(double[] x) {
                double buyTrigger = x[0];
                double sellTrigger = x[1];
View Full Code Here

        Asset asset = new Asset(symbol, series);

        Account account = new Account(new BigDecimal(initialBalance), today.minusDays(days));

        Conditions conditions = new Conditions(new BigDecimal(commission), new BigDecimal(slippage));
        MoneyManagementStrategy moneyManager = new FixedPercentageAllocationStrategy(accountAllocation, asset);

        BuyZoneModel instance = new BuyZoneModel(account, asset, conditions,
                moneyManager, buyTrigger, sellTrigger, stopLoss);

        Session session = instance.generateSignals(series.beginningOfSeries(), series.lastOfSeries());
View Full Code Here

TOP

Related Classes of org.wkh.bateman.trade.FixedPercentageAllocationStrategy

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.