Package name.abuchen.portfolio.model

Examples of name.abuchen.portfolio.model.Account.addTransaction()


    public void testDepositPlusInterest()
    {
        Client client = new Client();

        Account account = new Account();
        account.addTransaction(new AccountTransaction(Dates.date(2010, Calendar.JANUARY, 1), null,
                        AccountTransaction.Type.DEPOSIT, 100000));
        account.addTransaction(new AccountTransaction(Dates.date(2011, Calendar.JUNE, 1), null,
                        AccountTransaction.Type.INTEREST, 5000));
        client.addAccount(account);
View Full Code Here


        Client client = new Client();

        Account account = new Account();
        account.addTransaction(new AccountTransaction(Dates.date(2010, Calendar.JANUARY, 1), null,
                        AccountTransaction.Type.DEPOSIT, 100000));
        account.addTransaction(new AccountTransaction(Dates.date(2011, Calendar.JUNE, 1), null,
                        AccountTransaction.Type.INTEREST, 5000));
        client.addAccount(account);

        ClientPerformanceSnapshot snapshot = new ClientPerformanceSnapshot(client, startDate, endDate);
        assertNotNull(snapshot);
View Full Code Here

    public void testDepositPlusInterestFirstDay()
    {
        Client client = new Client();

        Account account = new Account();
        account.addTransaction(new AccountTransaction(Dates.date(2010, Calendar.JANUARY, 1), null,
                        AccountTransaction.Type.DEPOSIT, 100000));
        account.addTransaction(new AccountTransaction(Dates.date(2010, Calendar.DECEMBER, 31), null,
                        AccountTransaction.Type.INTEREST, 5000));
        client.addAccount(account);
View Full Code Here

        Client client = new Client();

        Account account = new Account();
        account.addTransaction(new AccountTransaction(Dates.date(2010, Calendar.JANUARY, 1), null,
                        AccountTransaction.Type.DEPOSIT, 100000));
        account.addTransaction(new AccountTransaction(Dates.date(2010, Calendar.DECEMBER, 31), null,
                        AccountTransaction.Type.INTEREST, 5000));
        client.addAccount(account);

        ClientPerformanceSnapshot snapshot = new ClientPerformanceSnapshot(client, startDate, endDate);
View Full Code Here

    public void testDepositPlusInterestLastDay()
    {
        Client client = new Client();

        Account account = new Account();
        account.addTransaction(new AccountTransaction(Dates.date(2010, Calendar.JANUARY, 1), null,
                        AccountTransaction.Type.DEPOSIT, 100000));
        account.addTransaction(new AccountTransaction(Dates.date(2011, Calendar.DECEMBER, 31), null,
                        AccountTransaction.Type.INTEREST, 5000));
        client.addAccount(account);
View Full Code Here

        Client client = new Client();

        Account account = new Account();
        account.addTransaction(new AccountTransaction(Dates.date(2010, Calendar.JANUARY, 1), null,
                        AccountTransaction.Type.DEPOSIT, 100000));
        account.addTransaction(new AccountTransaction(Dates.date(2011, Calendar.DECEMBER, 31), null,
                        AccountTransaction.Type.INTEREST, 5000));
        client.addAccount(account);

        ClientPerformanceSnapshot snapshot = new ClientPerformanceSnapshot(client, startDate, endDate);
View Full Code Here

        portfolio.addTransaction(new PortfolioTransaction(Dates.date(2010, Calendar.JANUARY, 1), security,
                        PortfolioTransaction.Type.BUY, 10, 100, 0, 0));
        client.addPortfolio(portfolio);

        Account account = new Account();
        account.addTransaction(new AccountTransaction(Dates.date(2011, Calendar.JANUARY, 31), security,
                        AccountTransaction.Type.INTEREST, 5000));
        client.addAccount(account);

        ClientPerformanceSnapshot snapshot = new ClientPerformanceSnapshot(client, startDate, endDate);
View Full Code Here

                {
                    switch (t.getType())
                    {
                        case DIVIDENDS:
                            long amount = value(t.getAmount(), weight);
                            pseudoAccount.addTransaction(new AccountTransaction(t.getDate(), t.getSecurity(),
                                            AccountTransaction.Type.DIVIDENDS, amount));
                            pseudoAccount.addTransaction(new AccountTransaction(t.getDate(), t.getSecurity(),
                                            AccountTransaction.Type.REMOVAL, amount));
                            break;
                        case BUY:
View Full Code Here

                    {
                        case DIVIDENDS:
                            long amount = value(t.getAmount(), weight);
                            pseudoAccount.addTransaction(new AccountTransaction(t.getDate(), t.getSecurity(),
                                            AccountTransaction.Type.DIVIDENDS, amount));
                            pseudoAccount.addTransaction(new AccountTransaction(t.getDate(), t.getSecurity(),
                                            AccountTransaction.Type.REMOVAL, amount));
                            break;
                        case BUY:
                        case TRANSFER_IN:
                        case SELL:
View Full Code Here

            switch (t.getType())
            {
                case SELL:
                case TRANSFER_IN:
                case DIVIDENDS:
                    pseudoAccount.addTransaction(new AccountTransaction(t.getDate(), t.getSecurity(),
                                    AccountTransaction.Type.DEPOSIT, amount));
                    break;
                case BUY:
                case TRANSFER_OUT:
                    pseudoAccount.addTransaction(new AccountTransaction(t.getDate(), t.getSecurity(),
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.