Skip to content

Commit

Permalink
Allow calculation of Expected returns in Taxonomy View
Browse files Browse the repository at this point in the history
Feature: in asset allocation view, assign estimates of expected returns
to asset classes and securities; overall portfolio return (weighted
average) is calculated and displayed

Issue: #1231
  • Loading branch information
Chris Reimold authored and buchen committed Nov 14, 2019
1 parent 7bd1e57 commit c5bf9f1
Show file tree
Hide file tree
Showing 9 changed files with 445 additions and 3 deletions.
Expand Up @@ -158,6 +158,12 @@ public class Messages extends NLS
public static String ColumnEntryValue;
public static String ColumnErrorMessages;
public static String ColumnExchangeRate;
public static String ColumnExpectedReturn;
public static String ColumnExpectedReturn_MenuLabel;
public static String ColumnExpectedReturn_Description;
public static String ColumnExpectedReturn_Tooltip_NotInUse;
public static String ColumnExpectedReturn_Tooltip_InUse;
public static String ColumnExpectedReturn_Tooltip_TotalPortfolioReturn;
public static String ColumnExDate;
public static String ColumnExitValue;
public static String ColumnFeedURLHistoric;
Expand Down
Expand Up @@ -357,6 +357,18 @@ ColumnExchangeRate = Exchange Rate

ColumnExitValue = Exit value

ColumnExpectedReturn = Expected return

ColumnExpectedReturn_Description = You may provide here your estimation of an expected return for some or all asset class and/or securities. From this, an estimated overall portfolio expected return is calculated (as weighted average) and displayed in the first row.\n\nPotential sources for return estimations can be e.g. historical returns of asset classes, yield to maturity for bonds or bond ETFs, estimates published for the current year by investment firms, or your own estimates.

ColumnExpectedReturn_MenuLabel = Expected return

ColumnExpectedReturn_Tooltip_InUse = This row is currently used in the calculation of overall portfolio expected returns.

ColumnExpectedReturn_Tooltip_NotInUse = This row is currently not used in the calculation of overall portfolio expected returns. Double-click to edit.

ColumnExpectedReturn_Tooltip_TotalPortfolioReturn = Calculated expected return of overall portfolio

ColumnFeedURLHistoric = URL (historic quotes)

ColumnFeedURLLatest = URL (latest quotes)
Expand Down
Expand Up @@ -355,6 +355,18 @@ ColumnExchangeRate = Wechselkurs

ColumnExitValue = Ausstiegspreis

ColumnExpectedReturn = Erwartete Rendite

ColumnExpectedReturn_Description = Sie k\u00F6nnen hier Ihre Sch\u00E4tzungen der (langfristig) erwarteten Rendite f\u00FCr Assetklassen und/oder einzelne Wertpapiere vergeben. Daraus wird eine erwartete Gesamtportfoliorendite (als gewichteter Durchschnitt) errechnet und in der Zeile "Asset Allocation" angezeigt.\n\nM\u00F6gliche Quellen f\u00FCr Sch\u00E4tzungen erwarteter Renditen:\n- Historische Renditen der Assetklassen (z.B. in Kommer, Ferri, ...)\n- Anleihen: Endf\u00E4lligkeitsrendite (YTM) minus Kosten f\u00FCr Anleihen-ETFs, oder Endf\u00E4lligkeitsrendite f\u00FCr Einzelanleihen\n- Sch\u00E4tzungen von Investmenth\u00E4usern f\u00FCr das jeweils aktuelle Jahr (basierend auf aktuellen Bewertungen) findet man mit Suchen wie z.B. "capital market assumptions for major asset classes 2019" (Achtung: Angaben sind oft nach Inflation, d.h. real statt nominal)\n- Eigene Sch\u00E4tzungen

ColumnExpectedReturn_MenuLabel = Erwartete Rendite

ColumnExpectedReturn_Tooltip_InUse = Diese Zeile wird bei der Berechnung der Gesamt-Portfoliorendite miteinbezogen.

ColumnExpectedReturn_Tooltip_NotInUse = Diese Zeile wird derzeit nicht f\u00FCr die Berechnung der erwarteten Gesamtrenditen des Portfolios verwendet. Doppelklick zum bearbeiten.

ColumnExpectedReturn_Tooltip_TotalPortfolioReturn = Errechnete erwartete Gesamtrendite des Portfolios

ColumnFeedURLHistoric = URL (historische Kurse)

ColumnFeedURLLatest = URL (aktueller Kurs)
Expand Down
Expand Up @@ -309,6 +309,18 @@ ColumnExDate = Fecha de ejecuci\u00F3n

ColumnExchangeRate = Tipo de cambio

ColumnExpectedReturn = Rendimiento esperado

ColumnExpectedReturn_Description = Puede proporcionar aqu\u00ED su estimaci\u00F3n de un rendimiento esperado para algunos o todos los activos y / o valores. A partir de esto, se calcula un rendimiento esperado estimado de la cartera general (como promedio ponderado) y se muestra en la primera fila.\n\nLas fuentes potenciales para las estimaciones de rendimiento pueden ser rendimientos hist\u00F3ricos de clases de activos, rendimiento al vencimiento de bonos o ETF de bonos, estimaciones publicadas para el a\u00F1o en curso por empresas de inversi\u00F3n o sus propias estimaciones.

ColumnExpectedReturn_MenuLabel = Rendimiento esperado

ColumnExpectedReturn_Tooltip_InUse = Esta fila se utiliza actualmente en el c\u00E1lculo de los rendimientos esperados de la cartera general.

ColumnExpectedReturn_Tooltip_NotInUse = Esta fila no se utiliza actualmente en el c\u00E1lculo de los rendimientos esperados de la cartera general. Doble click para editar.

ColumnExpectedReturn_Tooltip_TotalPortfolioReturn = Rentabilidad esperada calculada de la cartera general

ColumnFeedURLHistoric = URL (cotizaciones hist\u00F3ricas)

ColumnFeedURLLatest = URL (\u00FAltimas cotizaciones)
Expand Down
Expand Up @@ -349,6 +349,18 @@ ColumnExchangeRate = Wisselkoers

ColumnExitValue = Waarde afsluiten

ColumnExpectedReturn = Verwachte terugkomst

ColumnExpectedReturn_Description = U kunt hier uw schatting geven van een verwacht rendement voor sommige of alle activaklassen en / of effecten. Hieruit wordt een geschat totaal verwacht rendement van de portefeuille berekend (als gewogen gemiddelde) en weergegeven in de eerste rij.\n\nPotenti\u00EBle bronnen voor rendementsschattingen kunnen historische rendementen van activaklassen, rendement tot looptijd van obligaties of obligatie-ETF's, schattingen die voor het lopende jaar door beleggingsondernemingen zijn gepubliceerd, of uw eigen schattingen zijn.
ColumnExpectedReturn_MenuLabel = Verwachte terugkomst
ColumnExpectedReturn_Tooltip_InUse = Deze rij wordt momenteel gebruikt bij de berekening van het verwachte verwachte rendement van de portefeuille.
ColumnExpectedReturn_Tooltip_NotInUse = Deze rij wordt momenteel niet gebruikt bij de berekening van het verwachte verwachte rendement van de portefeuille. Dubbelklik om te bewerken.
ColumnExpectedReturn_Tooltip_TotalPortfolioReturn = Berekend verwacht rendement van de totale portefeuille
ColumnFeedURLHistoric = URL (historische koersen)
ColumnFeedURLLatest = URL (laatste koers)
Expand Down
Expand Up @@ -18,12 +18,25 @@ public class StringToCurrencyConverter implements IValidatingConverter<String, L
private final int factor;

public StringToCurrencyConverter(Values<?> type)
{
this(type, false);
}

public StringToCurrencyConverter(Values<?> type, boolean acceptNegativeValues)
{
this.factor = type.factor();

StringBuilder patternString = new StringBuilder();
patternString.append("^("); //$NON-NLS-1$

if (acceptNegativeValues)
patternString.append("-?"); //$NON-NLS-1$

DecimalFormatSymbols symbols = new DecimalFormatSymbols();
pattern = Pattern.compile("^([\\d" + symbols.getGroupingSeparator() + "]*)(" //$NON-NLS-1$ //$NON-NLS-2$
+ symbols.getDecimalSeparator() + "(\\d*))?$"); //$NON-NLS-1$
patternString.append("[\\d").append(symbols.getGroupingSeparator()).append("]*)(") //$NON-NLS-1$ //$NON-NLS-2$
.append(symbols.getDecimalSeparator()).append("(\\d*))?$"); //$NON-NLS-1$

pattern = Pattern.compile(patternString.toString());
full = new DecimalFormat("#,###"); //$NON-NLS-1$
}

Expand Down Expand Up @@ -67,6 +80,7 @@ private long convertToLong(String part) throws ParseException

String strBefore = m.group(1);
Number before = strBefore.trim().length() > 0 ? full.parse(strBefore) : Long.valueOf(0);
boolean isNegative = strBefore.contains("-"); //$NON-NLS-1$

String strAfter = m.group(3);
long after = 0;
Expand All @@ -83,6 +97,7 @@ private long convertToLong(String part) throws ParseException
after *= 10;
}

return before.longValue() * factor + after;
// For negative numbers: subtract decimal digits instead of adding them
return before.longValue() * factor + (isNegative ? -after : after);
}
}

0 comments on commit c5bf9f1

Please sign in to comment.