Package name.abuchen.portfolio.snapshot

Examples of name.abuchen.portfolio.snapshot.PerformanceIndex


        item.configure(series);
    }

    private void addSecurityPerformance(DataSeries item, Security security, List<Exception> warnings)
    {
        PerformanceIndex securityIndex = (PerformanceIndex) dataCache.get(security.getUUID());

        if (securityIndex == null)
        {
            securityIndex = PerformanceIndex.forInvestment(getClient(), security, getReportingPeriod(), warnings);
            dataCache.put(security.getUUID(), securityIndex);
        }

        if (aggregationPeriod != null)
            securityIndex = Aggregation.aggregate(securityIndex, aggregationPeriod);

        ILineSeries series = chart.addDateSeries(securityIndex.getDates(), //
                        securityIndex.getAccumulatedPercentage(), //
                        item.getLabel());
        item.configure(series);
    }
View Full Code Here


        item.configure(series);
    }

    private void addPortfolio(DataSeries item, Portfolio portfolio, List<Exception> warnings)
    {
        PerformanceIndex portfolioIndex = (PerformanceIndex) dataCache.get(portfolio);

        if (portfolioIndex == null)
        {
            portfolioIndex = PerformanceIndex.forPortfolio(getClient(), portfolio, getReportingPeriod(), warnings);
            dataCache.put(portfolio, portfolioIndex);
        }

        if (aggregationPeriod != null)
            portfolioIndex = Aggregation.aggregate(portfolioIndex, aggregationPeriod);

        ILineSeries series = chart.addDateSeries(portfolioIndex.getDates(), //
                        portfolioIndex.getAccumulatedPercentage(), //
                        portfolio.getName());
        item.configure(series);
    }
View Full Code Here

        item.configure(series);
    }

    private void addAccount(DataSeries item, Account account, List<Exception> warnings)
    {
        PerformanceIndex accountIndex = (PerformanceIndex) dataCache.get(account);

        if (accountIndex == null)
        {
            accountIndex = PerformanceIndex.forAccount(getClient(), account, getReportingPeriod(), warnings);
            dataCache.put(account, accountIndex);
        }

        if (aggregationPeriod != null)
            accountIndex = Aggregation.aggregate(accountIndex, aggregationPeriod);

        ILineSeries series = chart.addDateSeries(accountIndex.getDates(), //
                        accountIndex.getAccumulatedPercentage(), //
                        account.getName());
        item.configure(series);
    }
View Full Code Here

        item.configure(series);
    }

    private void addClassification(DataSeries item, Classification classification, List<Exception> warnings)
    {
        PerformanceIndex index = (PerformanceIndex) dataCache.get(classification);

        if (index == null)
        {
            index = PerformanceIndex.forClassification(getClient(), classification, getReportingPeriod(), warnings);
            dataCache.put(classification, index);
        }

        if (aggregationPeriod != null)
            index = Aggregation.aggregate(index, aggregationPeriod);

        ILineSeries series = chart.addDateSeries(index.getDates(), //
                        index.getAccumulatedPercentage(), //
                        item.getLabel());
        item.configure(series);
    }
View Full Code Here

                    AbstractCSVExporter exporter = new AbstractCSVExporter()
                    {
                        @Override
                        protected void writeToFile(File file) throws IOException
                        {
                            PerformanceIndex index = (PerformanceIndex) dataCache.get(instance);
                            if (aggregationPeriod != null)
                                index = Aggregation.aggregate(index, aggregationPeriod);
                            index.exportTo(file);
                        }

                        @Override
                        protected Control getControl()
                        {
View Full Code Here

TOP

Related Classes of name.abuchen.portfolio.snapshot.PerformanceIndex

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.