Package org.wkh.bateman.trade

Examples of org.wkh.bateman.trade.Account


        toyPrices.put(today.plusDays(1), new BigDecimal(10.1));
        toyPrices.put(today.plusDays(1).plusMinutes(1), new BigDecimal(9.5));
        series = new TimeSeries(toyPrices);
        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);
View Full Code Here


        toyPrices.put(today.plusMinutes(3), new BigDecimal(10.25));
        toyPrices.put(today.plusMinutes(4), new BigDecimal(11.5));
        series = new TimeSeries(toyPrices);
        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);
View Full Code Here

                double buyTrigger = x[0];
                double sellTrigger = x[1];
                double stopLoss = x[2];

                try {
                    Account account = new Account(new BigDecimal(initialBalance), DateTime.now().minusDays(days));

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

                    Session tradingSession = model.generateSignals(asset.getTimeSeries().beginningOfSeries(),
                            asset.getTimeSeries().lastOfSeries());
View Full Code Here

        System.out.println("Sell trigger: " + sellTrigger);
        System.out.println("Stop loss: " + stopLoss);

        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,
View Full Code Here

TOP

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

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.