Examples of PortfolioBuilder


Examples of name.abuchen.portfolio.PortfolioBuilder

        Client client = new Client();

        Security security = new SecurityBuilder() //
                        .addTo(client);

        Portfolio portfolio = new PortfolioBuilder() //
                        .buy(security, "2010-01-01", 100 * Values.Share.factor(), 314920) //
                        .sell(security, "2010-02-01", 100 * Values.Share.factor(), 53150) //
                        .buy(security, "2010-03-01", 50 * Values.Share.factor(), 168492) //
                        .sell(security, "2010-04-01", 50 * Values.Share.factor(), 53150) //
                        .addTo(client);
View Full Code Here

Examples of name.abuchen.portfolio.PortfolioBuilder

                    .addTo(client);

    @Test
    public void testBuyIsPreferredOverSell()
    {
        Portfolio portfolio = new PortfolioBuilder() //
                        .sell(security, "2010-01-01", 100, 100) //
                        .buy(security, "2010-01-01", 100, 100) //
                        .addTo(client);

        List<PortfolioTransaction> list = portfolio.getTransactions();
View Full Code Here

Examples of name.abuchen.portfolio.PortfolioBuilder

    }

    @Test
    public void testBuyIsPreferredOverSell2()
    {
        Portfolio portfolio = new PortfolioBuilder() //
                        .buy(security, "2010-01-01", 100, 100) //
                        .sell(security, "2010-01-01", 100, 100) //
                        .addTo(client);

        List<PortfolioTransaction> list = portfolio.getTransactions();
View Full Code Here

Examples of name.abuchen.portfolio.PortfolioBuilder

    }

    @Test
    public void testTwoInboundTransactionsStay()
    {
        Portfolio portfolio = new PortfolioBuilder() //
                        .buy(security, "2010-01-01", 1, 100) //
                        .buy(security, "2010-01-01", 2, 100) //
                        .addTo(client);

        List<PortfolioTransaction> list = portfolio.getTransactions();
View Full Code Here

Examples of name.abuchen.portfolio.PortfolioBuilder

    }

    @Test
    public void testThatDatePreceedsType()
    {
        Portfolio portfolio = new PortfolioBuilder() //
                        .sell(security, "2010-01-01", 100, 100) //
                        .buy(security, "2010-01-02", 100, 100) //
                        .addTo(client);

        List<PortfolioTransaction> list = portfolio.getTransactions();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.