Package name.abuchen.portfolio

Examples of name.abuchen.portfolio.SecurityBuilder


        Taxonomy taxonomy = new TaxonomyBuilder() //
                        .addClassification("debt") //
                        .addTo(client);

        Security a = new SecurityBuilder() //
                        .addPrice("2010-01-01", 1000) //
                        .assign(taxonomy, "debt", Classification.ONE_HUNDRED_PERCENT / 2) //
                        .addTo(client);

        Portfolio portfolio = new PortfolioBuilder() //
View Full Code Here


    @Test
    public void testFifoBuySellTransactions()
    {
        Client client = new Client();

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

        Portfolio portfolio = new PortfolioBuilder() //
                        .buy(security, "2010-01-01", 109 * Values.Share.factor(), 314920) //
                        .sell(security, "2010-02-01", 15 * Values.Share.factor(), 53150) //
View Full Code Here

    @Test
    public void testThatRoundingDifferencesAreRemovedIfZeroSharesHeld()
    {
        Client client = new Client();

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

        Portfolio portfolio = new PortfolioBuilder() //
                        .buy(security, "2010-01-01", 10 * Values.Share.factor(), 1) //
                        .sell(security, "2010-02-01", 3 * Values.Share.factor(), 1) //
View Full Code Here

    @Test
    public void testWhenSharesHeldGoToZero()
    {
        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) //
View Full Code Here

TOP

Related Classes of name.abuchen.portfolio.SecurityBuilder

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.