operations_research/OR_HTML_04/markowitz.html
dschlueter b7af2f1d9a Version 04 als eigenes Repository
Erster Commit des Strangs "Optimierte Entscheidungsfindung mit Python"
(Version 04). Die Historie der 71 Commits bis zur Trennung bleibt im
uebergeordneten Repository OR_mit_Python liegen, das ab jetzt nur noch
Version_03 (eingefroren) verwaltet und Version_04/ ignoriert.

Bewusst kein "git subtree split": Der Pfad Version_04/ existiert erst seit
der Verzeichnistrennung, ein Split braechte daher nur 7 der 41 einschlaegigen
Commits - eine Teilhistorie, die vollstaendig aussieht und es nicht ist.

Stand: 5 Teile, 23 Kapitel, 5 Anhaenge, 292 Abschnitte, 703 Querverweise,
325 Indexmarken, 73 Beispielprogramme, 32 SVGs, 4 Plotly-Figuren,
25 Notebooks, PDF mit 715 Seiten.

Zusaetzlich in diesem Commit:

* pyproject.toml mit Abhaengigkeitsgruppen finance, large-scale, api,
  figures, dev, empfehlungen. Die abgedruckte requirements.txt bleibt
  unveraendert daneben bestehen. ortools steht in der Grundausstattung,
  highspy erst in [large-scale] - so kann der HiGHS-Symbolkonflikt bei der
  schlanken Installation gar nicht erst auftreten.

* Dabei zwei Funde: graphviz wird von erzeuge_architektur_diagramme.py
  importiert, fehlt aber in requirements.txt (jetzt in [figures]); pymoo
  steht in requirements.txt, wird aber von keinem Programm importiert,
  sondern nur im Kapitel Metaheuristiken empfohlen (jetzt in
  [empfehlungen]).

* NEUER_TITEL.md nach Kritik_und_Verbesserungsvorschlaege/ verschoben - es
  ist die Vorlage des Titelblatts, kein Bestandteil des Werks. Die beiden
  Fundstellen in PROGRESS.md und erzeuge_titelseite.py nachgezogen.

* PROGRESS.md nannte noch den Untertitel der ersten Fassung; auf den
  tatsaechlichen aus erzeuge_titelseite.py korrigiert.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-08 01:20:09 +02:00

1107 lines
205 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!doctype html>
<html lang="de">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Kapitel 19: Die moderne Portfoliotheorie nach Markowitz · Optimierte Entscheidungsfindung mit Python</title>
<script>
(function () {
try {
var t = localStorage.getItem("or-theme");
if (t) document.documentElement.setAttribute("data-theme", t);
} catch (e) {}
})();
</script>
<link rel="stylesheet" href="assets/highlight.css" />
<link rel="stylesheet" href="katex/katex.min.css" />
<script defer="" src="katex/katex.min.js"></script>
<script>document.addEventListener("DOMContentLoaded", function () {
var mathElements = document.getElementsByClassName("math");
var macros = [];
for (var i = 0; i < mathElements.length; i++) {
var texText = mathElements[i].firstChild;
if (mathElements[i].tagName == "SPAN") {
katex.render(texText.data, mathElements[i], {
displayMode: mathElements[i].classList.contains('display'),
throwOnError: false,
macros: macros,
fleqn: false
});
}}
// Der Browser springt zu einem #anker in der URL schon beim ersten Rendern
// an, BEVOR die KaTeX-Formeln oben im Text ihre finale Hoehe bekommen -
// durch den Reflow landet der Anker danach zu weit unten. Nach dem
// Formel-Rendering hier erneut zum Anker springen, das behebt es.
if (location.hash) {
var ziel = document.getElementById(decodeURIComponent(location.hash.slice(1)));
if (ziel) ziel.scrollIntoView({behavior: "instant", block: "start"});
}
});
</script>
<link rel="stylesheet" href="assets/site.css" />
</head>
<body>
<svg style="display:none" aria-hidden="true"><symbol id="icon-menu" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round">
<line x1="3" y1="6" x2="21" y2="6"/><line x1="3" y1="12" x2="21" y2="12"/><line x1="3" y1="18" x2="21" y2="18"/>
</symbol>
<symbol id="icon-search" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round">
<circle cx="11" cy="11" r="7"/><line x1="21" y1="21" x2="16.2" y2="16.2"/>
</symbol>
<symbol id="icon-sun" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round">
<circle cx="12" cy="12" r="4.5"/>
<line x1="12" y1="1.5" x2="12" y2="4"/><line x1="12" y1="20" x2="12" y2="22.5"/>
<line x1="1.5" y1="12" x2="4" y2="12"/><line x1="20" y1="12" x2="22.5" y2="12"/>
<line x1="4.5" y1="4.5" x2="6.2" y2="6.2"/><line x1="17.8" y1="17.8" x2="19.5" y2="19.5"/>
<line x1="19.5" y1="4.5" x2="17.8" y2="6.2"/><line x1="6.2" y1="17.8" x2="4.5" y2="19.5"/>
</symbol>
<symbol id="icon-moon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M20 14.5A8.5 8.5 0 1 1 9.5 4a6.8 6.8 0 0 0 10.5 10.5z"/>
</symbol>
<symbol id="icon-chevron-left" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<polyline points="15 4 7 12 15 20"/>
</symbol>
<symbol id="icon-chevron-right" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<polyline points="9 4 17 12 9 20"/>
</symbol>
<symbol id="icon-check" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<polyline points="4 13 9.5 18.5 20 6"/>
</symbol>
<symbol id="icon-external-link" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M18 13.5V19a1.5 1.5 0 0 1-1.5 1.5H5A1.5 1.5 0 0 1 3.5 19V7A1.5 1.5 0 0 1 5 5.5h5.5"/>
<polyline points="14.5 3.5 20.5 3.5 20.5 9.5"/><line x1="11" y1="13" x2="20" y2="4"/>
</symbol>
<symbol id="icon-book" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M4 5.5A2 2 0 0 1 6 4h6v16H6a2 2 0 0 0-2 1.5z"/>
<path d="M20 5.5A2 2 0 0 0 18 4h-6v16h6a2 2 0 0 1 2 1.5z"/>
</symbol>
<symbol id="icon-copy" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<rect x="9" y="9" width="13" height="13" rx="2"/><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/>
</symbol>
<symbol id="icon-download" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M12 3v12"/><polyline points="7 10 12 15 17 10"/><path d="M4 19.5h16"/>
</symbol></svg>
<header class="site-header">
<button type="button" class="icon-btn" id="sidebar-toggle" aria-label="Menü öffnen"><svg class="icon" aria-hidden="true"><use href="#icon-menu"></use></svg></button>
<a class="brand" href="index.html"><svg class="icon" aria-hidden="true"><use href="#icon-book"></use></svg> <span>Optimierte Entscheidungsfindung mit Python</span></a>
<div class="site-search">
<input id="suche-eingabe" type="search" placeholder="Suchen …" aria-label="Suche" autocomplete="off" />
<svg class="icon such-icon" aria-hidden="true"><use href="#icon-search"></use></svg>
<div id="suche-ergebnisse" class="suche-ergebnisse" hidden></div>
</div>
<button type="button" class="icon-btn" id="theme-toggle" aria-label="Darstellung umschalten">
<svg class="icon icon-sun" aria-hidden="true"><use href="#icon-sun"></use></svg><svg class="icon icon-moon" aria-hidden="true"><use href="#icon-moon"></use></svg>
</button>
</header>
<div class="site-body">
<div class="sidebar-overlay" id="sidebar-overlay" hidden></div>
<nav class="sidebar" id="sidebar" aria-label="Kapitelnavigation"><div class="sidebar-inhalt"><details class="sidebar-gruppe"><summary>Einstieg</summary><ul><li data-kapitel="vorwort.html"><a href="vorwort.html"><span class="fortschritt-haken"><svg class="icon" aria-hidden="true"><use href="#icon-check"></use></svg></span><span>Vorwort & Lesehilfe</span></a></li><li data-kapitel="notation.html"><a href="notation.html"><span class="fortschritt-haken"><svg class="icon" aria-hidden="true"><use href="#icon-check"></use></svg></span><span>Notation & Abkürzungen</span></a></li></ul></details><details class="sidebar-gruppe"><summary>Teil I: Grundlagen des Operations Research</summary><ul><li data-kapitel="einfuehrung.html"><a href="einfuehrung.html"><span class="fortschritt-haken"><svg class="icon" aria-hidden="true"><use href="#icon-check"></use></svg></span><span>Kapitel 1: Einführung in Operations Research — Vom Ursprung zur mathematischen Entscheidungsfindung</span></a></li><li data-kapitel="fundament.html"><a href="fundament.html"><span class="fortschritt-haken"><svg class="icon" aria-hidden="true"><use href="#icon-check"></use></svg></span><span>Kapitel 2: Das mathematische Fundament — Vektoren, Matrizen, Konvexität</span></a></li><li data-kapitel="oekosystem.html"><a href="oekosystem.html"><span class="fortschritt-haken"><svg class="icon" aria-hidden="true"><use href="#icon-check"></use></svg></span><span>Kapitel 3: Das Python-Ökosystem für OR — Solver, Bindings und Modellierungsschichten</span></a></li><li data-kapitel="modellierung.html"><a href="modellierung.html"><span class="fortschritt-haken"><svg class="icon" aria-hidden="true"><use href="#icon-check"></use></svg></span><span>Kapitel 4: Vom Management-Wunsch zum Modell</span></a></li></ul></details><details class="sidebar-gruppe"><summary>Teil II: Die Kernverfahren der deterministischen Optimierung</summary><ul><li data-kapitel="lp.html"><a href="lp.html"><span class="fortschritt-haken"><svg class="icon" aria-hidden="true"><use href="#icon-check"></use></svg></span><span>Kapitel 5: Lineare Programmierung — Simplex, Dualität und Schattenpreise</span></a></li><li data-kapitel="milp.html"><a href="milp.html"><span class="fortschritt-haken"><svg class="icon" aria-hidden="true"><use href="#icon-check"></use></svg></span><span>Kapitel 6: Gemischt-ganzzahlige Optimierung — Diskrete Entscheidungen und Branch-and-Bound</span></a></li><li data-kapitel="cpsat.html"><a href="cpsat.html"><span class="fortschritt-haken"><svg class="icon" aria-hidden="true"><use href="#icon-check"></use></svg></span><span>Kapitel 7: Constraint Programming mit CP-SAT — Logik, Scheduling und Zuweisung</span></a></li><li data-kapitel="graphen.html"><a href="graphen.html"><span class="fortschritt-haken"><svg class="icon" aria-hidden="true"><use href="#icon-check"></use></svg></span><span>Kapitel 8: Graphen, Flüsse und Touren — Min-Cost-Flow, Matching und VRP</span></a></li><li data-kapitel="metaheuristiken.html"><a href="metaheuristiken.html"><span class="fortschritt-haken"><svg class="icon" aria-hidden="true"><use href="#icon-check"></use></svg></span><span>Kapitel 9: Metaheuristiken — wenn der exakte Solver aussteigt</span></a></li><li data-kapitel="dekomposition.html"><a href="dekomposition.html"><span class="fortschritt-haken"><svg class="icon" aria-hidden="true"><use href="#icon-check"></use></svg></span><span>Kapitel 10: Spaltengenerierung — das Modell umbauen statt die Lösung raten</span></a></li></ul></details><details class="sidebar-gruppe"><summary>Teil III: Nichtlinearität, Unsicherheit und mehrperiodige Dynamik</summary><ul><li data-kapitel="qp-nlp.html"><a href="qp-nlp.html"><span class="fortschritt-haken"><svg class="icon" aria-hidden="true"><use href="#icon-check"></use></svg></span><span>Kapitel 11: Quadratische und nichtlineare Optimierung — KKT, Lagrange, Konvexität</span></a></li><li data-kapitel="unsicherheit.html"><a href="unsicherheit.html"><span class="fortschritt-haken"><svg class="icon" aria-hidden="true"><use href="#icon-check"></use></svg></span><span>Kapitel 12: Optimierung unter Unsicherheit — Monte-Carlo, Stochastik, Robustheit</span></a></li><li data-kapitel="dynamische-programmierung.html"><a href="dynamische-programmierung.html"><span class="fortschritt-haken"><svg class="icon" aria-hidden="true"><use href="#icon-check"></use></svg></span><span>Kapitel 13: Dynamische Programmierung — Die Bellman-Gleichung und Order-Execution</span></a></li><li data-kapitel="mehrziel.html"><a href="mehrziel.html"><span class="fortschritt-haken"><svg class="icon" aria-hidden="true"><use href="#icon-check"></use></svg></span><span>Kapitel 14: Mehrere Ziele — Pareto-Fronten statt Gewichte</span></a></li><li data-kapitel="prognose.html"><a href="prognose.html"><span class="fortschritt-haken"><svg class="icon" aria-hidden="true"><use href="#icon-check"></use></svg></span><span>Kapitel 15: Predict-then-Optimize — die bessere Prognose, die schlechtere Entscheidung</span></a></li></ul></details><details class="sidebar-gruppe" open><summary>Teil IV: Anwendungen — Energiewirtschaft und Finanzmärkte</summary><ul><li data-kapitel="bruecke.html"><a href="bruecke.html"><span class="fortschritt-haken"><svg class="icon" aria-hidden="true"><use href="#icon-check"></use></svg></span><span>Kapitel 16: Die Strukturbrücke — dieselbe Mathematik, zwei Welten</span></a></li><li data-kapitel="supplychain.html"><a href="supplychain.html"><span class="fortschritt-haken"><svg class="icon" aria-hidden="true"><use href="#icon-check"></use></svg></span><span>Kapitel 17: Supply-Chain und Energieeinsatz unter Unsicherheit</span></a></li><li data-kapitel="finanzdaten.html"><a href="finanzdaten.html"><span class="fortschritt-haken"><svg class="icon" aria-hidden="true"><use href="#icon-check"></use></svg></span><span>Kapitel 18: Finanzdaten-Modellierung — Renditen, Kovarianz und Shrinkage</span></a></li><li data-kapitel="markowitz.html" class="aktiv"><a href="markowitz.html"><span class="fortschritt-haken"><svg class="icon" aria-hidden="true"><use href="#icon-check"></use></svg></span><span>Kapitel 19: Die moderne Portfoliotheorie nach Markowitz</span></a></li><li data-kapitel="cvar.html"><a href="cvar.html"><span class="fortschritt-haken"><svg class="icon" aria-hidden="true"><use href="#icon-check"></use></svg></span><span>Kapitel 20: Tail-Risiko, CVaR und Transaktionskosten</span></a></li><li data-kapitel="handelsmaschine.html"><a href="handelsmaschine.html"><span class="fortschritt-haken"><svg class="icon" aria-hidden="true"><use href="#icon-check"></use></svg></span><span>Kapitel 21: Die vollständige quantitative Handelsmaschine</span></a></li></ul></details><details class="sidebar-gruppe"><summary>Teil V: Praxis</summary><ul><li data-kapitel="praxisfallen.html"><a href="praxisfallen.html"><span class="fortschritt-haken"><svg class="icon" aria-hidden="true"><use href="#icon-check"></use></svg></span><span>Kapitel 22: Praxisfallen und der Weg zum produktiven Einsatz</span></a></li><li data-kapitel="testing.html"><a href="testing.html"><span class="fortschritt-haken"><svg class="icon" aria-hidden="true"><use href="#icon-check"></use></svg></span><span>Kapitel 23: Testen, Messen, Ausliefern</span></a></li><li data-kapitel="projektwerkstatt.html"><a href="projektwerkstatt.html"><span class="fortschritt-haken"><svg class="icon" aria-hidden="true"><use href="#icon-check"></use></svg></span><span>Projektwerkstatt</span></a></li></ul></details><details class="sidebar-gruppe"><summary>Anhänge</summary><ul><li data-kapitel="anhang-loesungen.html"><a href="anhang-loesungen.html"><span class="fortschritt-haken"><svg class="icon" aria-hidden="true"><use href="#icon-check"></use></svg></span><span>Anhang A: Lösungen zu allen Übungsaufgaben</span></a></li><li data-kapitel="anhang-modellierungsmuster.html"><a href="anhang-modellierungsmuster.html"><span class="fortschritt-haken"><svg class="icon" aria-hidden="true"><use href="#icon-check"></use></svg></span><span>Anhang B: Katalog der Modellierungsmuster</span></a></li><li data-kapitel="anhang-fehlerdiagnose.html"><a href="anhang-fehlerdiagnose.html"><span class="fortschritt-haken"><svg class="icon" aria-hidden="true"><use href="#icon-check"></use></svg></span><span>Anhang C: Fehlerdiagnose-Handbuch</span></a></li><li data-kapitel="anhang-spickzettel.html"><a href="anhang-spickzettel.html"><span class="fortschritt-haken"><svg class="icon" aria-hidden="true"><use href="#icon-check"></use></svg></span><span>Anhang D: Spickzettel der Solver</span></a></li><li data-kapitel="anhang-glossar-literatur.html"><a href="anhang-glossar-literatur.html"><span class="fortschritt-haken"><svg class="icon" aria-hidden="true"><use href="#icon-check"></use></svg></span><span>Anhang E: Glossar und Literatur</span></a></li></ul></details><ul class="sidebar-extra"><li><a href="programme.html"><svg class="icon" aria-hidden="true"><use href="#icon-book"></use></svg> Beispielprogramme</a></li><li><a href="stichwortverzeichnis.html"><svg class="icon" aria-hidden="true"><use href="#icon-search"></use></svg> Stichwortverzeichnis</a></li><li><a href="gesamtdokument.html"><svg class="icon" aria-hidden="true"><use href="#icon-external-link"></use></svg> Gesamtdokument (eine Seite)</a></li><li><a href="Operations_Research_mit_Python_Version_04.pdf" download><svg class="icon" aria-hidden="true"><use href="#icon-download"></use></svg> Download als PDF</a></li></ul></div></nav>
<main class="content">
<nav class="breadcrumb" aria-label="Breadcrumb"><a href="index.html">Start</a> <span>Teil IV</span> <span>Kapitel 19: Die moderne Portfoliotheorie nach Markowitz</span></nav>
<nav class="prev-next"><a class="prev-next-knopf prev-next-prev" href="finanzdaten.html"><svg class="icon" aria-hidden="true"><use href="#icon-chevron-left"></use></svg><span><small>Zurück</small>Kapitel 18: Finanzdaten-Modellierung — Renditen, Kovarianz und Shrinkage</span></a><a class="prev-next-knopf prev-next-next" href="cvar.html"><span><small>Weiter</small>Kapitel 20: Tail-Risiko, CVaR und Transaktionskosten</span><svg class="icon" aria-hidden="true"><use href="#icon-chevron-right"></use></svg></a></nav>
<article>
<h1 id="kap-markowitz">Kapitel 19: Die moderne Portfoliotheorie nach Markowitz</h1>
<div class="card card-blick">
<blockquote>
<p><strong>📌 Kapitel auf einen Blick</strong></p>
<p><strong>Worum geht es?</strong> Um das Modell, das 1952 die quantitative Finanzwirtschaft begründete — und um die Restriktionen, ohne die es in der Praxis unbrauchbar bleibt.</p>
<p><strong>Voraussetzungen:</strong> <a href="qp-nlp.html#kap-qp-nlp">Kapitel 11</a> (QP, KKT), <a href="finanzdaten.html#kap-finanzdaten">Kapitel 18</a> (Kovarianz, Shrinkage).</p>
<p><strong>Danach können Sie:</strong> Die Effizienzgrenze berechnen, das Maximum-Sharpe-Portfolio über die Korn-Transformation bestimmen, institutionelle Nebenbedingungen einbauen — und beurteilen, wann eine Renditeschätzung das Ergebnis wertlos macht.</p>
<p><strong>Zeitbedarf:</strong> ca. 6 Stunden.</p>
<p><strong>Programme:</strong><br />
<code>Diversifikation_Demo.py</code><br />
<code>Markowitz_CVXPY.py</code><br />
<code>Renditeschaetzung_Falle.py</code></p>
<p><strong>Notebook:</strong> <a href="Notebooks_04/markowitz.ipynb">markowitz.ipynb</a><br />
<a href="https://colab.research.google.com/github/dschlueter/or-mit-python/blob/main/Notebooks_04/markowitz.ipynb">In Google Colab öffnen</a></p>
</blockquote>
</div>
<hr />
<h2 id="sec:markowitz-schnellstart">19.1 In 5 Minuten gelöst</h2>
<div class="card card-schnellstart">
<blockquote>
<p><strong>🚀 In 5 Minuten gelöst: Die Effizienzlinie in acht Zeilen</strong></p>
<p>Ein Anleger verteilt sein Vermögen auf drei Anlageklassen:</p>
<table>
<thead>
<tr class="header">
<th></th>
<th style="text-align: right;">erwartete Rendite</th>
<th style="text-align: right;">Schwankung</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>Anleihen</td>
<td style="text-align: right;">3,0 %</td>
<td style="text-align: right;">5 %</td>
</tr>
<tr class="even">
<td>Aktien Welt</td>
<td style="text-align: right;">8,0 %</td>
<td style="text-align: right;">18 %</td>
</tr>
<tr class="odd">
<td>Immobilien</td>
<td style="text-align: right;">5,5 %</td>
<td style="text-align: right;">11 %</td>
</tr>
</tbody>
</table>
<p>Statt <em>einer</em> Antwort rechnen wir gleich die <strong>ganze Auswahl</strong> durch — für jede Zielrendite das Portfolio mit dem geringsten Risiko:</p>
<div class="sourceCode" id="cb1"><pre class="sourceCode python"><code class="sourceCode python"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="im">import</span> numpy <span class="im">as</span> np</span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a><span class="im">import</span> cvxpy <span class="im">as</span> cp</span>
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb1-4"><a href="#cb1-4" aria-hidden="true" tabindex="-1"></a>mu <span class="op">=</span> np.array([<span class="fl">0.03</span>, <span class="fl">0.08</span>, <span class="fl">0.055</span>]) <span class="co"># erwartete Rendite</span></span>
<span id="cb1-5"><a href="#cb1-5" aria-hidden="true" tabindex="-1"></a>sig <span class="op">=</span> np.array([<span class="fl">0.05</span>, <span class="fl">0.18</span>, <span class="fl">0.11</span>]) <span class="co"># Schwankung</span></span>
<span id="cb1-6"><a href="#cb1-6" aria-hidden="true" tabindex="-1"></a>R <span class="op">=</span> np.array([[<span class="fl">1.0</span>, <span class="fl">0.1</span>, <span class="fl">0.2</span>], [<span class="fl">0.1</span>, <span class="fl">1.0</span>, <span class="fl">0.5</span>], [<span class="fl">0.2</span>, <span class="fl">0.5</span>, <span class="fl">1.0</span>]])</span>
<span id="cb1-7"><a href="#cb1-7" aria-hidden="true" tabindex="-1"></a>S <span class="op">=</span> np.outer(sig, sig) <span class="op">*</span> R <span class="co"># Kovarianzmatrix</span></span>
<span id="cb1-8"><a href="#cb1-8" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb1-9"><a href="#cb1-9" aria-hidden="true" tabindex="-1"></a>w, ziel <span class="op">=</span> cp.Variable(<span class="dv">3</span>, nonneg<span class="op">=</span><span class="va">True</span>), cp.Parameter(nonneg<span class="op">=</span><span class="va">True</span>)</span>
<span id="cb1-10"><a href="#cb1-10" aria-hidden="true" tabindex="-1"></a>problem <span class="op">=</span> cp.Problem(cp.Minimize(cp.quad_form(w, S)),</span>
<span id="cb1-11"><a href="#cb1-11" aria-hidden="true" tabindex="-1"></a> [cp.<span class="bu">sum</span>(w) <span class="op">==</span> <span class="dv">1</span>, mu <span class="op">@</span> w <span class="op">&gt;=</span> ziel])</span>
<span id="cb1-12"><a href="#cb1-12" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb1-13"><a href="#cb1-13" aria-hidden="true" tabindex="-1"></a><span class="cf">for</span> z <span class="kw">in</span> [<span class="fl">0.03</span>, <span class="fl">0.04</span>, <span class="fl">0.05</span>, <span class="fl">0.06</span>, <span class="fl">0.07</span>, <span class="fl">0.08</span>]:</span>
<span id="cb1-14"><a href="#cb1-14" aria-hidden="true" tabindex="-1"></a> ziel.value <span class="op">=</span> z</span>
<span id="cb1-15"><a href="#cb1-15" aria-hidden="true" tabindex="-1"></a> problem.solve()</span>
<span id="cb1-16"><a href="#cb1-16" aria-hidden="true" tabindex="-1"></a> risiko <span class="op">=</span> np.sqrt(problem.value)</span>
<span id="cb1-17"><a href="#cb1-17" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(<span class="ss">f&quot;</span><span class="sc">{</span>z<span class="op">*</span><span class="dv">100</span><span class="sc">:5.1f}</span><span class="ss">% </span><span class="sc">{</span>risiko<span class="op">*</span><span class="dv">100</span><span class="sc">:7.2f}</span><span class="ss">% </span><span class="sc">{</span>(mu <span class="op">@</span> w.value)<span class="op">/</span>risiko<span class="sc">:8.2f}</span><span class="ss"> &quot;</span></span>
<span id="cb1-18"><a href="#cb1-18" aria-hidden="true" tabindex="-1"></a> <span class="ss">f&quot;</span><span class="sc">{</span>np<span class="sc">.</span><span class="bu">round</span>(w.value, <span class="dv">3</span>)<span class="sc">}</span><span class="ss">&quot;</span>)</span></code></pre></div>
<p><strong>Ausgabe</strong> (Zielrendite, Risiko, Rendite-je-Risiko, Gewichte):</p>
<pre><code> 3.0% 4.83% 0.69 [0.884 0.017 0.098]
4.0% 5.35% 0.75 [0.711 0.111 0.178]
5.0% 7.49% 0.67 [0.451 0.251 0.298]
6.0% 10.35% 0.58 [0.191 0.391 0.418]
7.0% 13.55% 0.52 [0. 0.6 0.4 ]
8.0% 18.00% 0.44 [0. 1. 0. ]</code></pre>
</blockquote>
</div>
<p><strong>Diese sechs Zeilen sind die Effizienzlinie</strong>, und sie beantworten die Frage anders, als die meisten sie stellen. Es gibt kein „bestes“ Portfolio — es gibt eine <strong>Auswahl</strong>, und jede Zeile ist für ihre Zielrendite optimal.</p>
<p>Lesen Sie die dritte Spalte: Sie zeigt, wie viel Rendite je Einheit Risiko herausspringt (die <strong>Sharpe-Kennzahl</strong>). Sie ist <strong>nicht</strong> unten am höchsten:</p>
<ul>
<li>Bei 3 % Zielrendite: 0,69 — das Portfolio ist sicher, aber lässt Ertrag liegen.</li>
<li>Bei <strong>4 %</strong>: <strong>0,75</strong> — das beste Verhältnis.</li>
<li>Bei 8 %: 0,44 — das renditestärkste Portfolio ist das <strong>schlechteste</strong> je Risikoeinheit. Und es besteht zu 100 % aus Aktien: Wer die höchste Rendite fordert, bekommt zwangsläufig gar keine Diversifikation mehr.</li>
</ul>
<p>Von 3 % auf 8 % Rendite ist ein Zuwachs um Faktor 2,7 — das Risiko steigt dabei um Faktor 3,7. Die letzten Prozentpunkte Rendite sind die teuersten.</p>
<blockquote>
<p><strong>🎯 Merksatz</strong> Ein Optimierer beantwortet nicht die Frage „was soll ich tun?“, sondern „was ist erreichbar?“. Die Effizienzlinie ist eine <strong>Speisekarte</strong>, keine Empfehlung. Welche Zeile die richtige ist, hängt von der Risikotragfähigkeit ab — und das ist keine mathematische, sondern eine unternehmerische Frage.</p>
</blockquote>
<p><strong>Warum funktioniert das?</strong> Weil <code>cp.Parameter</code> das Modell nur <strong>einmal</strong> aufbaut und dann sechsmal mit verschiedenen Zielwerten löst. Genau dafür gibt es Parameter in CVXPY: Bei 200 Punkten auf der Linie spart das den 200-fachen Kompilierungsaufwand (<a href="oekosystem.html#sec:oekosystem-vektorisierung">Abschnitt 3.8</a>). Der Rest dieses Kapitels führt die Effizienzlinie sauber aus, zeigt, wie man das beste Verhältnis direkt berechnet statt es abzulesen — und warum das Ganze mit geschätzten Renditen gefährlicher ist, als es hier aussieht.</p>
<hr />
<h2 id="sec:markowitz-lernziele">19.2 Lernziele</h2>
<p>Nach diesem Kapitel können Sie …</p>
<ol type="1">
<li>… erklären, warum Diversifikation Risiko senkt, ohne Rendite zu kosten.</li>
<li>… das Mean-Variance-Modell aufstellen und den Risikoparameter <span class="math inline">\lambda</span> deuten.</li>
<li>… die Effizienzgrenze berechnen und korrekt begrenzen.</li>
<li>… die <strong>Korn-Transformation</strong> anwenden, um die nicht-konvexe Sharpe-Ratio-Maximierung in ein QP zu überführen.</li>
<li>… Positions-, Sektor- und Kardinalitätsgrenzen einbauen — <strong>mit Namen statt Indizes</strong>.</li>
<li>… die Effizienzlinie als Auswahl lesen statt als Empfehlung.</li>
<li>… begründen, warum das Minimum-Varianz-Portfolio in der Praxis oft robuster ist als das Maximum-Sharpe-Portfolio.</li>
</ol>
<hr />
<h2 id="sec:markowitz-warum-diversifikation-funktioniert">19.3 Warum Diversifikation funktioniert</h2>
<p>Harry Markowitz zentrale Einsicht von 1952: <strong>Das Risiko eines Portfolios ist nicht die Summe der Einzelrisiken.</strong> Es hängt davon ab, wie die Titel zusammenspielen.</p>
<p>Für zwei Titel gilt:</p>
<p><span class="math display">
\sigma_p^2 = w_1^2\sigma_1^2 + w_2^2\sigma_2^2 + 2w_1w_2\,\rho_{12}\,\sigma_1\sigma_2
</span></p>
<blockquote>
<p><strong>📐 Formel-Lesehilfe</strong> * Die ersten beiden Terme sind die „eigenen“ Risikobeiträge. * Der dritte Term enthält die <strong>Korrelation</strong> <span class="math inline">\rho_{12}</span> — und <strong>nur er</strong> kann negativ werden.</p>
<p><strong>Ohne Formel gesagt:</strong> Wenn zwei Anlagen sich gegenläufig bewegen (<span class="math inline">\rho &lt; 0</span>), gleichen sich ihre Schwankungen teilweise aus. Das Portfolio schwankt dann <strong>weniger als jeder Einzeltitel</strong> — bei einer Rendite, die genau dem gewichteten Mittel entspricht. Diversifikation ist damit das einzige „Gratis-Mittagessen“ der Finanzwirtschaft.</p>
</blockquote>
<blockquote>
<p><strong>✏️ Handrechnung 19.1: Das Gratis-Mittagessen in Zahlen</strong></p>
<p>Zwei Titel, beide mit <span class="math inline">\mu = 8\,\%</span> und <span class="math inline">\sigma = 20\,\%</span>, Gewichtung 50/50. Die Portfoliorendite ist <strong>immer</strong> <span class="math inline">8\,\%</span> — unabhängig von der Korrelation. Das Risiko dagegen:</p>
<p><span class="math display">\sigma_p = \sqrt{0{,}25\cdot0{,}04 + 0{,}25\cdot0{,}04 + 2\cdot0{,}25\cdot\rho\cdot0{,}04} = 0{,}2\sqrt{0{,}5(1+\rho)}</span></p>
<table>
<thead>
<tr class="header">
<th><span class="math inline">\rho</span></th>
<th><span class="math inline">\sigma_p</span></th>
<th>Risikoreduktion</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><span class="math inline">+1{,}0</span></td>
<td><span class="math inline">20{,}0\,\%</span></td>
<td>0 % (keine Diversifikation)</td>
</tr>
<tr class="even">
<td><span class="math inline">+0{,}5</span></td>
<td><span class="math inline">17{,}3\,\%</span></td>
<td>13 %</td>
</tr>
<tr class="odd">
<td><span class="math inline">0{,}0</span></td>
<td><span class="math inline">14{,}1\,\%</span></td>
<td>29 %</td>
</tr>
<tr class="even">
<td><span class="math inline">-0{,}5</span></td>
<td><span class="math inline">10{,}0\,\%</span></td>
<td>50 %</td>
</tr>
<tr class="odd">
<td><span class="math inline">-1{,}0</span></td>
<td><span class="math inline">0{,}0\,\%</span></td>
<td>100 % (perfekte Absicherung)</td>
</tr>
</tbody>
</table>
<p><strong>Bei gleicher Rendite von 8 %.</strong> Genau das meint Markowitz: Risiko lässt sich reduzieren, ohne dafür Ertrag aufzugeben — allein durch die richtige Kombination.</p>
<p><strong>Die Kehrseite:</strong> In Krisen steigen Korrelationen. Ein Portfolio, dessen Diversifikation auf <span class="math inline">\rho = 0{,}2</span> beruht, kann bei <span class="math inline">\rho \to 0{,}9</span> plötzlich fast unkorrelierte Absicherung verlieren — genau dann, wenn man sie braucht. <a href="cvar.html#kap-cvar">Kapitel 20</a> und <a href="praxisfallen.html#kap-praxisfallen">Kapitel 22</a> kommen darauf zurück.</p>
</blockquote>
<p>Die Tabelle aus der Handrechnung <em>Das Gratis-Mittagessen in Zahlen</em> lässt sich auf zwei unabhängigen Wegen prüfen: über die <strong>analytische Formel</strong> und über eine <strong>Simulation</strong> korrelierter Renditepaare, die von der Formel nichts weiß.</p>
<div class="sourceCode" id="cb3"><pre class="sourceCode python"><code class="sourceCode python"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="co">#!/usr/bin/env python3</span></span>
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a><span class="co"># Diversifikation_Demo.py</span></span>
<span id="cb3-4"><a href="#cb3-4" aria-hidden="true" tabindex="-1"></a><span class="co">&quot;&quot;&quot;</span></span>
<span id="cb3-5"><a href="#cb3-5" aria-hidden="true" tabindex="-1"></a><span class="co">Kapitel Markowitz: Portfoliorisiko in Abhaengigkeit von der Korrelation - die</span></span>
<span id="cb3-6"><a href="#cb3-6" aria-hidden="true" tabindex="-1"></a><span class="co">Handrechnung zum Gratis-Mittagessen, geprueft ueber die analytische Formel und</span></span>
<span id="cb3-7"><a href="#cb3-7" aria-hidden="true" tabindex="-1"></a><span class="co">ueber simulierte, korrelierte Renditen.</span></span>
<span id="cb3-8"><a href="#cb3-8" aria-hidden="true" tabindex="-1"></a><span class="co">&quot;&quot;&quot;</span></span>
<span id="cb3-9"><a href="#cb3-9" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb3-10"><a href="#cb3-10" aria-hidden="true" tabindex="-1"></a><span class="im">import</span> numpy <span class="im">as</span> np</span>
<span id="cb3-11"><a href="#cb3-11" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb3-12"><a href="#cb3-12" aria-hidden="true" tabindex="-1"></a>MU <span class="op">=</span> <span class="fl">0.08</span></span>
<span id="cb3-13"><a href="#cb3-13" aria-hidden="true" tabindex="-1"></a>SIGMA <span class="op">=</span> <span class="fl">0.20</span></span>
<span id="cb3-14"><a href="#cb3-14" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb3-15"><a href="#cb3-15" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb3-16"><a href="#cb3-16" aria-hidden="true" tabindex="-1"></a><span class="kw">def</span> sigma_portfolio(rho: <span class="bu">float</span>, w1: <span class="bu">float</span> <span class="op">=</span> <span class="fl">0.5</span>) <span class="op">-&gt;</span> <span class="bu">float</span>:</span>
<span id="cb3-17"><a href="#cb3-17" aria-hidden="true" tabindex="-1"></a> <span class="co">&quot;&quot;&quot;Analytische Formel: sigma_p^2 = w1^2 s1^2 + w2^2 s2^2 + 2 w1 w2 rho s1 s2.&quot;&quot;&quot;</span></span>
<span id="cb3-18"><a href="#cb3-18" aria-hidden="true" tabindex="-1"></a> w2 <span class="op">=</span> <span class="dv">1</span> <span class="op">-</span> w1</span>
<span id="cb3-19"><a href="#cb3-19" aria-hidden="true" tabindex="-1"></a> varianz <span class="op">=</span> w1<span class="op">**</span><span class="dv">2</span> <span class="op">*</span> SIGMA<span class="op">**</span><span class="dv">2</span> <span class="op">+</span> w2<span class="op">**</span><span class="dv">2</span> <span class="op">*</span> SIGMA<span class="op">**</span><span class="dv">2</span> <span class="op">+</span> <span class="dv">2</span> <span class="op">*</span> w1 <span class="op">*</span> w2 <span class="op">*</span> rho <span class="op">*</span> SIGMA<span class="op">**</span><span class="dv">2</span></span>
<span id="cb3-20"><a href="#cb3-20" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> <span class="bu">float</span>(np.sqrt(varianz))</span>
<span id="cb3-21"><a href="#cb3-21" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb3-22"><a href="#cb3-22" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb3-23"><a href="#cb3-23" aria-hidden="true" tabindex="-1"></a><span class="kw">def</span> simuliere(rho: <span class="bu">float</span>, n: <span class="bu">int</span> <span class="op">=</span> <span class="dv">500_000</span>, seed: <span class="bu">int</span> <span class="op">=</span> <span class="dv">7</span>) <span class="op">-&gt;</span> <span class="bu">float</span>:</span>
<span id="cb3-24"><a href="#cb3-24" aria-hidden="true" tabindex="-1"></a> <span class="co">&quot;&quot;&quot;Erzeugt n korrelierte Renditepaare und misst die Portfolio-Volatilitaet empirisch.&quot;&quot;&quot;</span></span>
<span id="cb3-25"><a href="#cb3-25" aria-hidden="true" tabindex="-1"></a> rng <span class="op">=</span> np.random.default_rng(seed)</span>
<span id="cb3-26"><a href="#cb3-26" aria-hidden="true" tabindex="-1"></a> kovarianz <span class="op">=</span> np.array([[SIGMA<span class="op">**</span><span class="dv">2</span>, rho <span class="op">*</span> SIGMA<span class="op">**</span><span class="dv">2</span>],</span>
<span id="cb3-27"><a href="#cb3-27" aria-hidden="true" tabindex="-1"></a> [rho <span class="op">*</span> SIGMA<span class="op">**</span><span class="dv">2</span>, SIGMA<span class="op">**</span><span class="dv">2</span>]])</span>
<span id="cb3-28"><a href="#cb3-28" aria-hidden="true" tabindex="-1"></a> renditen <span class="op">=</span> rng.multivariate_normal([MU, MU], kovarianz, size<span class="op">=</span>n)</span>
<span id="cb3-29"><a href="#cb3-29" aria-hidden="true" tabindex="-1"></a> portfolio <span class="op">=</span> <span class="fl">0.5</span> <span class="op">*</span> renditen[:, <span class="dv">0</span>] <span class="op">+</span> <span class="fl">0.5</span> <span class="op">*</span> renditen[:, <span class="dv">1</span>]</span>
<span id="cb3-30"><a href="#cb3-30" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> <span class="bu">float</span>(portfolio.std(ddof<span class="op">=</span><span class="dv">1</span>))</span>
<span id="cb3-31"><a href="#cb3-31" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb3-32"><a href="#cb3-32" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb3-33"><a href="#cb3-33" aria-hidden="true" tabindex="-1"></a><span class="cf">if</span> <span class="va">__name__</span> <span class="op">==</span> <span class="st">&quot;__main__&quot;</span>:</span>
<span id="cb3-34"><a href="#cb3-34" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(<span class="st">&quot;=&quot;</span> <span class="op">*</span> <span class="dv">78</span>)</span>
<span id="cb3-35"><a href="#cb3-35" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(<span class="st">&quot; PORTFOLIORISIKO IN ABHAENGIGKEIT VON DER KORRELATION&quot;</span>)</span>
<span id="cb3-36"><a href="#cb3-36" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(<span class="st">&quot;=&quot;</span> <span class="op">*</span> <span class="dv">78</span>)</span>
<span id="cb3-37"><a href="#cb3-37" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(<span class="ss">f&quot;</span><span class="sc">{</span><span class="st">&#39;rho&#39;</span><span class="sc">:&gt;6}</span><span class="ss"> | </span><span class="sc">{</span><span class="st">&#39;sigma_p (Formel)&#39;</span><span class="sc">:&gt;18}</span><span class="ss"> | </span><span class="sc">{</span><span class="st">&#39;sigma_p (Simulation)&#39;</span><span class="sc">:&gt;20}</span><span class="ss"> | </span><span class="sc">{</span><span class="st">&#39;Risikoreduktion&#39;</span><span class="sc">:&gt;16}</span><span class="ss">&quot;</span>)</span>
<span id="cb3-38"><a href="#cb3-38" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(<span class="st">&quot;-&quot;</span> <span class="op">*</span> <span class="dv">78</span>)</span>
<span id="cb3-39"><a href="#cb3-39" aria-hidden="true" tabindex="-1"></a> <span class="cf">for</span> rho <span class="kw">in</span> [<span class="fl">1.0</span>, <span class="fl">0.5</span>, <span class="fl">0.0</span>, <span class="op">-</span><span class="fl">0.5</span>, <span class="op">-</span><span class="fl">1.0</span>]:</span>
<span id="cb3-40"><a href="#cb3-40" aria-hidden="true" tabindex="-1"></a> formel <span class="op">=</span> sigma_portfolio(rho)</span>
<span id="cb3-41"><a href="#cb3-41" aria-hidden="true" tabindex="-1"></a> sim <span class="op">=</span> simuliere(rho)</span>
<span id="cb3-42"><a href="#cb3-42" aria-hidden="true" tabindex="-1"></a> reduktion <span class="op">=</span> (<span class="dv">1</span> <span class="op">-</span> formel <span class="op">/</span> SIGMA) <span class="op">*</span> <span class="dv">100</span></span>
<span id="cb3-43"><a href="#cb3-43" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(<span class="ss">f&quot;</span><span class="sc">{</span>rho<span class="sc">:6.1f}</span><span class="ss"> | </span><span class="sc">{</span>formel<span class="op">*</span><span class="dv">100</span><span class="sc">:16.2f}</span><span class="ss"> % | </span><span class="sc">{</span>sim<span class="op">*</span><span class="dv">100</span><span class="sc">:18.2f}</span><span class="ss"> % | </span><span class="sc">{</span>reduktion<span class="sc">:14.0f}</span><span class="ss"> %&quot;</span>)</span>
<span id="cb3-44"><a href="#cb3-44" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb3-45"><a href="#cb3-45" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(<span class="st">&quot;</span><span class="ch">\n</span><span class="st">Die simulierten Werte (500.000 gezogene Renditepaare je rho) bestaetigen&quot;</span>)</span>
<span id="cb3-46"><a href="#cb3-46" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(<span class="st">&quot;die Formel aus der Handrechnung bis auf statistisches Rauschen - und das,&quot;</span>)</span>
<span id="cb3-47"><a href="#cb3-47" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(<span class="st">&quot;obwohl Formel und Simulation nichts voneinander wissen.&quot;</span>)</span></code></pre></div>
<p><strong>Erwartete Ausgabe:</strong></p>
<pre><code>==============================================================================
PORTFOLIORISIKO IN ABHAENGIGKEIT VON DER KORRELATION
==============================================================================
rho | sigma_p (Formel) | sigma_p (Simulation) | Risikoreduktion
------------------------------------------------------------------------------
1.0 | 20.00 % | 20.01 % | 0 %
0.5 | 17.32 % | 17.33 % | 13 %
0.0 | 14.14 % | 14.13 % | 29 %
-0.5 | 10.00 % | 9.99 % | 50 %
-1.0 | 0.00 % | 0.00 % | 100 %
Die simulierten Werte (500.000 gezogene Renditepaare je rho) bestaetigen
die Formel aus der Handrechnung bis auf statistisches Rauschen - und das,
obwohl Formel und Simulation nichts voneinander wissen.</code></pre>
<hr />
<h2 id="sec:markowitz-das-mean-variance-modell">19.4 Das Mean-Variance-Modell</h2>
<p>Sei <span class="math inline">\mathbf{w} = (w_1,\dots,w_n)^\top</span> der Vektor der Portfoliogewichte:</p>
<p><span class="math display">
\min_{\mathbf{w}} \quad \tfrac12\,\mathbf{w}^\top\boldsymbol{\Sigma}\mathbf{w}
\;-\; \lambda\,\boldsymbol{\mu}^\top\mathbf{w}
</span></p>
<p><span class="math display">
\text{u. d. N.}\qquad \sum_{i=1}^n w_i = 1,\qquad w_i \ge 0\ \ \forall i
</span></p>
<blockquote>
<p><strong>📐 Formel-Lesehilfe</strong> * <span class="math inline">\tfrac12\mathbf{w}^\top\boldsymbol{\Sigma}\mathbf{w}</span> — die halbe Portfoliovarianz (das Risiko). * <span class="math inline">\lambda\,\boldsymbol{\mu}^\top\mathbf{w}</span> — die mit <span class="math inline">\lambda</span> gewichtete erwartete Rendite. Weil sie <strong>abgezogen</strong> wird, wird hohe Rendite belohnt. * <span class="math inline">\sum w_i = 1</span> — das Kapital wird vollständig investiert. * <span class="math inline">w_i \ge 0</span> — keine Leerverkäufe (<em>long only</em>).</p>
<p><strong>Die Rolle von <span class="math inline">\lambda</span>:</strong></p>
<table>
<colgroup>
<col style="width: 33%" />
<col style="width: 33%" />
<col style="width: 33%" />
</colgroup>
<thead>
<tr class="header">
<th><span class="math inline">\lambda</span></th>
<th>Verhalten</th>
<th>Ergebnis</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><span class="math inline">0</span></td>
<td>Risiko zählt allein</td>
<td><strong>GMV</strong> — Global Minimum Variance Portfolio</td>
</tr>
<tr class="even">
<td>mittel</td>
<td>Abwägung</td>
<td>ein Punkt auf der Effizienzgrenze</td>
</tr>
<tr class="odd">
<td><span class="math inline">\to\infty</span></td>
<td>Rendite zählt allein</td>
<td>alles in den Titel mit höchstem <span class="math inline">\mu</span></td>
</tr>
</tbody>
</table>
<p><strong>Ohne Formel gesagt:</strong> „Streue so, dass das Risiko klein bleibt — aber lass dir dafür nicht zu viel Rendite entgehen. Wie viel Rendite dir das Risiko wert ist, sagt <span class="math inline">\lambda</span>.“</p>
</blockquote>
<div class="card card-formel">
<blockquote>
<p><strong>🔤 Formel-Übersetzer: die Matrixschreibweise auflösen</strong></p>
<p>Der Sprung von der Zweititelformel weiter oben zu <span class="math inline">\mathbf{w}^\top\boldsymbol{\Sigma}\mathbf{w}</span> sieht aus wie ein neues Konzept. Er ist keines — es ist <strong>dieselbe Formel</strong>, nur nicht mehr ausgeschrieben:</p>
<table>
<colgroup>
<col style="width: 50%" />
<col style="width: 50%" />
</colgroup>
<thead>
<tr class="header">
<th>Mathematik</th>
<th>Alltagssprache</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><span class="math inline">\mathbf{w}</span></td>
<td>„Wie viel Prozent liegt in welchem Titel?“ Ein Vektor mit einem Eintrag je Titel.</td>
</tr>
<tr class="even">
<td><span class="math inline">\boldsymbol{\Sigma}</span></td>
<td>Die Tabelle „wie bewegen sich je zwei Titel zueinander?“. Auf der Diagonale steht das Eigenrisiko <span class="math inline">\sigma_i^2</span>, daneben das Zusammenspiel <span class="math inline">\sigma_{ij}</span>.</td>
</tr>
<tr class="odd">
<td><span class="math inline">\boldsymbol{\mu}</span></td>
<td>„Was erwarte ich je Titel an Rendite?“</td>
</tr>
<tr class="even">
<td><span class="math inline">\boldsymbol{\mu}^\top\mathbf{w}</span></td>
<td>Das <strong>gewichtete Mittel</strong> der Renditen — die Portfoliorendite. Genau das, was jeder von Hand ausrechnen würde.</td>
</tr>
<tr class="odd">
<td><span class="math inline">\mathbf{w}^\top\boldsymbol{\Sigma}\mathbf{w}</span></td>
<td>Die <strong>Doppelsumme über alle Paare</strong>: <span class="math inline">\sum_i\sum_j w_i w_j \sigma_{ij}</span>. Bei <span class="math inline">n</span> Titeln sind das <span class="math inline">n^2</span> Summanden — bei 5 Titeln 25, bei 500 Titeln 250 000. Deshalb schreibt man es als Matrixprodukt.</td>
</tr>
</tbody>
</table>
<p><strong>Die Probe.</strong> Setzen Sie <span class="math inline">n = 2</span> in die Doppelsumme ein: Sie erhalten <span class="math inline">w_1^2\sigma_1^2 + w_2^2\sigma_2^2 + 2w_1w_2\sigma_{12}</span> — Buchstabe für Buchstabe die Formel aus <a href="#sec:markowitz-warum-diversifikation-funktioniert">Abschnitt 19.3</a>. Die Matrixschreibweise führt nichts Neues ein; sie erspart nur das Ausschreiben.</p>
<p><strong>In Zahlen.</strong> <span class="math inline">\sigma_1 = 20\,\%</span>, <span class="math inline">\sigma_2 = 30\,\%</span>, <span class="math inline">\rho = -0{,}4</span>, Gewichte <span class="math inline">(0{,}6;\ 0{,}4)</span>:</p>
<table>
<colgroup>
<col style="width: 50%" />
<col style="width: 50%" />
</colgroup>
<thead>
<tr class="header">
<th>Beitrag</th>
<th>Wert</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>Eigenrisiken (die Diagonale)</td>
<td><span class="math inline">0{,}0288</span></td>
</tr>
<tr class="even">
<td>Zusammenspiel (alles daneben)</td>
<td><span class="math inline">-0{,}0115</span></td>
</tr>
<tr class="odd">
<td><strong>Summe <span class="math inline">=\mathbf{w}^\top\boldsymbol{\Sigma}\mathbf{w}</span></strong></td>
<td><span class="math inline">\mathbf{0{,}0173}</span></td>
</tr>
<tr class="even">
<td>Portfoliorisiko <span class="math inline">\sigma_p = \sqrt{\;\cdot\;}</span></td>
<td><span class="math inline">\mathbf{13{,}15\,\%}</span></td>
</tr>
</tbody>
</table>
<p><strong>In einem Satz:</strong> <em>Die Diagonale von <span class="math inline">\boldsymbol{\Sigma}</span> ist das Risiko, das jeder Titel mitbringt; alles daneben ist das, was Diversifikation daraus macht — und nur dieser zweite Teil kann negativ werden.</em> 13,15 % liegen unter <strong>beiden</strong> Einzelrisiken, und das ist keine Näherung, sondern das exakte Ergebnis der Formel.</p>
</blockquote>
</div>
<h3 id="die-effizienzgrenze-und-das-tangentialportfolio">Die Effizienzgrenze und das Tangentialportfolio</h3>
<p>Die <strong>Effizienzgrenze</strong> (<em>efficient frontier</em>) ist die Kurve aller Portfolios, die zu jedem Risikoniveau die höchstmögliche Rendite liefern.</p>
<figure>
<img src="bilder_04/kap12_efficient_frontier.svg" alt="Abb. 19.1: Efficient Frontier und Tangential-Portfolio" />
<figcaption aria-hidden="true">Abb. 19.1: Efficient Frontier und Tangential-Portfolio</figcaption>
</figure>
<p>Das <strong>Tangentialportfolio</strong> maximiert die <strong>Sharpe Ratio</strong>:</p>
<p><span class="math display">
\text{SR}(\mathbf{w}) = \frac{\mathbf{w}^\top\boldsymbol{\mu} - r_f}{\sqrt{\mathbf{w}^\top\boldsymbol{\Sigma}\mathbf{w}}}
</span></p>
<blockquote>
<p><strong>📐 Formel-Lesehilfe</strong> Zähler: <strong>Überrendite</strong> über den risikolosen Zins <span class="math inline">r_f</span>. Nenner: die Volatilität.</p>
<p><strong>Ohne Formel gesagt:</strong> „Wie viel Mehrertrag bekomme ich je Einheit Risiko, die ich eingehe?“ Eine Sharpe Ratio von 0,8 heißt: Für jeden Prozentpunkt Volatilität gibt es 0,8 Prozentpunkte Überrendite.</p>
</blockquote>
<h3 id="die-korn-transformation">Die Korn-Transformation</h3>
<p>Die Sharpe Ratio ist ein <strong>Bruch</strong> — und damit <strong>nicht konvex</strong>. CVXPY würde sie ablehnen. Der Ausweg ist ein eleganter Trick, der die Homogenität des Problems ausnutzt:</p>
<p><span class="math display">
\min_{\mathbf{y},\kappa}\ \tfrac12\,\mathbf{y}^\top\boldsymbol{\Sigma}\mathbf{y}
\qquad\text{u. d. N.}\qquad
(\boldsymbol{\mu}-r_f\mathbf{1})^\top\mathbf{y} = 1,\quad
\sum_i y_i = \kappa,\quad \mathbf{y}\ge\mathbf{0},\ \kappa&gt;0
</span></p>
<p>Die echten Gewichte ergeben sich am Ende durch Normierung:</p>
<p><span class="math display">
\mathbf{w}^* = \frac{\mathbf{y}^*}{\kappa^*}
</span></p>
<blockquote>
<p><strong>💡 Warum das funktioniert</strong> Die Sharpe Ratio ändert sich nicht, wenn man <span class="math inline">\mathbf{w}</span> mit einer positiven Zahl skaliert — Zähler und Nenner wachsen gleichermaßen. Man darf deshalb die <strong>Skala frei festlegen</strong>. Die Bedingung <span class="math inline">(\boldsymbol{\mu}-r_f\mathbf{1})^\top\mathbf{y} = 1</span> normiert die Überrendite auf 1; dann ist das Maximieren der Sharpe Ratio gleichbedeutend mit dem <strong>Minimieren des Nenners</strong> — und das ist ein gewöhnliches QP.</p>
<p><strong>Wichtig bei Restriktionen:</strong> Alle Nebenbedingungen müssen <strong>mitskaliert</strong> werden. Aus <span class="math inline">w_i \le 0{,}20</span> wird <span class="math inline">y_i \le 0{,}20\,\kappa</span>. Wer das vergisst, erhält ein falsches Portfolio.</p>
</blockquote>
<hr />
<h2 id="sec:markowitz-institutionelle-nebenbedingungen">19.5 Institutionelle Nebenbedingungen</h2>
<p>In der Praxis gelten regulatorische und interne Regeln:</p>
<table>
<colgroup>
<col style="width: 33%" />
<col style="width: 33%" />
<col style="width: 33%" />
</colgroup>
<thead>
<tr class="header">
<th>Regel</th>
<th>Formulierung</th>
<th>Zweck</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><strong>Positionsobergrenze</strong></td>
<td><span class="math inline">w_i \le w_{\max}</span> (z. B. 0,20)</td>
<td>Klumpenrisiko begrenzen</td>
</tr>
<tr class="even">
<td><strong>Sektorlimit</strong></td>
<td><span class="math inline">\sum_{i\in\text{Tech}} w_i \le 0{,}35</span></td>
<td>Branchenkonzentration begrenzen</td>
</tr>
<tr class="odd">
<td><strong>Mindestposition</strong></td>
<td><span class="math inline">w_i = 0</span> oder <span class="math inline">w_i \ge w_{\min}</span></td>
<td>Streuverluste vermeiden</td>
</tr>
<tr class="even">
<td><strong>Kardinalität</strong></td>
<td><span class="math inline">\sum_i z_i \le K</span>, <span class="math inline">w_i \le M z_i</span></td>
<td>Verwaltungsaufwand begrenzen</td>
</tr>
<tr class="odd">
<td><strong>Turnover-Grenze</strong></td>
<td><span class="math inline">\|\mathbf{w}-\mathbf{w}_{\text{alt}}\|_1 \le \tau</span></td>
<td>Transaktionskosten dämpfen</td>
</tr>
</tbody>
</table>
<h3 id="was-diese-regeln-kosten">Was diese Regeln kosten</h3>
<p>Jede Regel schneidet etwas vom Erreichbaren ab. Wie viel, lässt sich ausrechnen — man legt die Effizienzlinie ohne und mit Beschränkungen übereinander:</p>
<figure>
<img src="bilder_04/kap_markowitz_restriktionen.svg" alt="Abb. 19.2: Was die Hausregeln kosten. Der senkrechte Abstand ist der Renditeverlust bei gleichem Risiko. Wichtiger ist aber das rechte Ende: Mit den Hausregeln bricht die Linie bei 9,06 % ab — die letzten 1,50 Punkte sind mit keinem Risiko der Welt mehr zu kaufen. Feste Instanz aus einem Faktormodell, erzeugt von bilder_04/erzeuge_effizienzlinie.py." />
<figcaption aria-hidden="true">Abb. 19.2: Was die Hausregeln kosten. Der senkrechte Abstand ist der Renditeverlust bei gleichem Risiko. Wichtiger ist aber das rechte Ende: Mit den Hausregeln bricht die Linie bei 9,06 % ab — die letzten 1,50 Punkte sind mit keinem Risiko der Welt mehr zu kaufen. Feste Instanz aus einem Faktormodell, erzeugt von <code>bilder_04/erzeuge_effizienzlinie.py</code>.</figcaption>
</figure>
<div class="plotly-figur">
<div> <div id="kap-markowitz-restriktionen" class="plotly-graph-div" style="height:460px; width:100%;"></div> <script type="text/javascript"> window.PLOTLYENV=window.PLOTLYENV || {}; if (document.getElementById("kap-markowitz-restriktionen")) { Plotly.newPlot( "kap-markowitz-restriktionen", [{"hovertemplate":["\u003cb\u003e6.48 % Rendite\u003c\u002fb\u003e\u003cbr\u003e15.09 % Volatilität\u003cbr\u003eSharpe 0.23\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;AAPL (Technologie): 48.5 %\u003cbr\u003e&nbsp;&nbsp;CVX (Energie): 14.6 %\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 11.0 %\u003cbr\u003e&nbsp;&nbsp;JNJ (Gesundheit): 10.4 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 52.8 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 15.3 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 17.3 %\u003cbr\u003e&nbsp;&nbsp;Energie: 14.6 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e6.59 % Rendite\u003c\u002fb\u003e\u003cbr\u003e15.10 % Volatilität\u003cbr\u003eSharpe 0.24\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;AAPL (Technologie): 47.5 %\u003cbr\u003e&nbsp;&nbsp;CVX (Energie): 13.8 %\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 12.2 %\u003cbr\u003e&nbsp;&nbsp;JNJ (Gesundheit): 10.5 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 52.1 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 16.9 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 17.1 %\u003cbr\u003e&nbsp;&nbsp;Energie: 13.8 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e6.69 % Rendite\u003c\u002fb\u003e\u003cbr\u003e15.13 % Volatilität\u003cbr\u003eSharpe 0.24\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;AAPL (Technologie): 46.4 %\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 13.3 %\u003cbr\u003e&nbsp;&nbsp;CVX (Energie): 13.1 %\u003cbr\u003e&nbsp;&nbsp;JNJ (Gesundheit): 10.6 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 51.7 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 18.3 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 16.8 %\u003cbr\u003e&nbsp;&nbsp;Energie: 13.1 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e6.80 % Rendite\u003c\u002fb\u003e\u003cbr\u003e15.17 % Volatilität\u003cbr\u003eSharpe 0.25\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;AAPL (Technologie): 45.0 %\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 13.8 %\u003cbr\u003e&nbsp;&nbsp;CVX (Energie): 12.6 %\u003cbr\u003e&nbsp;&nbsp;JNJ (Gesundheit): 10.6 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 51.9 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 19.0 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 16.4 %\u003cbr\u003e&nbsp;&nbsp;Energie: 12.7 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e6.90 % Rendite\u003c\u002fb\u003e\u003cbr\u003e15.22 % Volatilität\u003cbr\u003eSharpe 0.26\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;AAPL (Technologie): 43.5 %\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 14.3 %\u003cbr\u003e&nbsp;&nbsp;CVX (Energie): 12.0 %\u003cbr\u003e&nbsp;&nbsp;JNJ (Gesundheit): 10.6 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 51.8 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 19.5 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 15.9 %\u003cbr\u003e&nbsp;&nbsp;Energie: 12.8 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e7.00 % Rendite\u003c\u002fb\u003e\u003cbr\u003e15.29 % Volatilität\u003cbr\u003eSharpe 0.26\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;AAPL (Technologie): 42.1 %\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 14.8 %\u003cbr\u003e&nbsp;&nbsp;CVX (Energie): 11.4 %\u003cbr\u003e&nbsp;&nbsp;JNJ (Gesundheit): 10.5 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 51.7 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 20.1 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 15.3 %\u003cbr\u003e&nbsp;&nbsp;Energie: 12.9 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e7.11 % Rendite\u003c\u002fb\u003e\u003cbr\u003e15.36 % Volatilität\u003cbr\u003eSharpe 0.27\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;AAPL (Technologie): 40.4 %\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 15.2 %\u003cbr\u003e&nbsp;&nbsp;CVX (Energie): 10.8 %\u003cbr\u003e&nbsp;&nbsp;JNJ (Gesundheit): 10.5 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 51.7 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 20.5 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 15.2 %\u003cbr\u003e&nbsp;&nbsp;Energie: 12.7 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e7.21 % Rendite\u003c\u002fb\u003e\u003cbr\u003e15.44 % Volatilität\u003cbr\u003eSharpe 0.27\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;AAPL (Technologie): 38.5 %\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 15.4 %\u003cbr\u003e&nbsp;&nbsp;JNJ (Gesundheit): 10.4 %\u003cbr\u003e&nbsp;&nbsp;PFE (Gesundheit): 10.3 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 51.7 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 20.7 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 15.4 %\u003cbr\u003e&nbsp;&nbsp;Energie: 12.2 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e7.32 % Rendite\u003c\u002fb\u003e\u003cbr\u003e15.53 % Volatilität\u003cbr\u003eSharpe 0.28\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;AAPL (Technologie): 36.6 %\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 15.6 %\u003cbr\u003e&nbsp;&nbsp;PFE (Gesundheit): 10.6 %\u003cbr\u003e&nbsp;&nbsp;JNJ (Gesundheit): 10.3 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 51.7 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 20.9 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 15.6 %\u003cbr\u003e&nbsp;&nbsp;Energie: 11.8 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e7.42 % Rendite\u003c\u002fb\u003e\u003cbr\u003e15.63 % Volatilität\u003cbr\u003eSharpe 0.28\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;AAPL (Technologie): 34.6 %\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 15.8 %\u003cbr\u003e&nbsp;&nbsp;PFE (Gesundheit): 11.0 %\u003cbr\u003e&nbsp;&nbsp;JNJ (Gesundheit): 10.2 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 51.7 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 21.2 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 15.8 %\u003cbr\u003e&nbsp;&nbsp;Energie: 11.3 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e7.53 % Rendite\u003c\u002fb\u003e\u003cbr\u003e15.73 % Volatilität\u003cbr\u003eSharpe 0.29\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;AAPL (Technologie): 32.7 %\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 16.0 %\u003cbr\u003e&nbsp;&nbsp;PFE (Gesundheit): 11.3 %\u003cbr\u003e&nbsp;&nbsp;JNJ (Gesundheit): 10.1 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 51.8 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 21.4 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 16.0 %\u003cbr\u003e&nbsp;&nbsp;Energie: 10.8 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e7.63 % Rendite\u003c\u002fb\u003e\u003cbr\u003e15.85 % Volatilität\u003cbr\u003eSharpe 0.29\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;AAPL (Technologie): 30.8 %\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 16.3 %\u003cbr\u003e&nbsp;&nbsp;PFE (Gesundheit): 11.6 %\u003cbr\u003e&nbsp;&nbsp;JNJ (Gesundheit): 10.0 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 51.8 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 21.6 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 16.3 %\u003cbr\u003e&nbsp;&nbsp;Energie: 10.3 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e7.74 % Rendite\u003c\u002fb\u003e\u003cbr\u003e15.97 % Volatilität\u003cbr\u003eSharpe 0.30\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;AAPL (Technologie): 28.9 %\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 16.5 %\u003cbr\u003e&nbsp;&nbsp;PFE (Gesundheit): 12.0 %\u003cbr\u003e&nbsp;&nbsp;AMZN (Technologie): 10.2 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 51.8 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 21.9 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 16.5 %\u003cbr\u003e&nbsp;&nbsp;Energie: 9.8 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e7.84 % Rendite\u003c\u002fb\u003e\u003cbr\u003e16.10 % Volatilität\u003cbr\u003eSharpe 0.30\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;AAPL (Technologie): 26.9 %\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 16.7 %\u003cbr\u003e&nbsp;&nbsp;PFE (Gesundheit): 12.3 %\u003cbr\u003e&nbsp;&nbsp;AMZN (Technologie): 10.9 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 51.8 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 22.1 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 16.7 %\u003cbr\u003e&nbsp;&nbsp;Energie: 9.4 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e7.94 % Rendite\u003c\u002fb\u003e\u003cbr\u003e16.23 % Volatilität\u003cbr\u003eSharpe 0.30\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;AAPL (Technologie): 25.0 %\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 16.9 %\u003cbr\u003e&nbsp;&nbsp;PFE (Gesundheit): 12.6 %\u003cbr\u003e&nbsp;&nbsp;AMZN (Technologie): 11.7 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 51.8 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 22.3 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 16.9 %\u003cbr\u003e&nbsp;&nbsp;Energie: 8.9 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e8.05 % Rendite\u003c\u002fb\u003e\u003cbr\u003e16.37 % Volatilität\u003cbr\u003eSharpe 0.31\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;AAPL (Technologie): 23.1 %\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 17.2 %\u003cbr\u003e&nbsp;&nbsp;PFE (Gesundheit): 13.0 %\u003cbr\u003e&nbsp;&nbsp;AMZN (Technologie): 12.5 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 51.9 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 22.6 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 17.2 %\u003cbr\u003e&nbsp;&nbsp;Energie: 8.4 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e8.15 % Rendite\u003c\u002fb\u003e\u003cbr\u003e16.52 % Volatilität\u003cbr\u003eSharpe 0.31\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;AAPL (Technologie): 21.2 %\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 17.4 %\u003cbr\u003e&nbsp;&nbsp;NVDA (Technologie): 13.4 %\u003cbr\u003e&nbsp;&nbsp;PFE (Gesundheit): 13.3 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 51.9 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 22.8 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 17.4 %\u003cbr\u003e&nbsp;&nbsp;Energie: 7.9 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e8.26 % Rendite\u003c\u002fb\u003e\u003cbr\u003e16.68 % Volatilität\u003cbr\u003eSharpe 0.32\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;AAPL (Technologie): 19.2 %\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 17.6 %\u003cbr\u003e&nbsp;&nbsp;NVDA (Technologie): 14.7 %\u003cbr\u003e&nbsp;&nbsp;AMZN (Technologie): 14.0 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 51.9 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 23.1 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 17.6 %\u003cbr\u003e&nbsp;&nbsp;Energie: 7.4 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e8.36 % Rendite\u003c\u002fb\u003e\u003cbr\u003e16.84 % Volatilität\u003cbr\u003eSharpe 0.32\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 17.8 %\u003cbr\u003e&nbsp;&nbsp;AAPL (Technologie): 17.3 %\u003cbr\u003e&nbsp;&nbsp;NVDA (Technologie): 16.0 %\u003cbr\u003e&nbsp;&nbsp;AMZN (Technologie): 14.7 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 51.9 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 23.3 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 17.8 %\u003cbr\u003e&nbsp;&nbsp;Energie: 7.0 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e8.47 % Rendite\u003c\u002fb\u003e\u003cbr\u003e17.01 % Volatilität\u003cbr\u003eSharpe 0.32\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 18.1 %\u003cbr\u003e&nbsp;&nbsp;NVDA (Technologie): 17.3 %\u003cbr\u003e&nbsp;&nbsp;AMZN (Technologie): 15.5 %\u003cbr\u003e&nbsp;&nbsp;AAPL (Technologie): 15.4 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 51.9 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 23.5 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 18.1 %\u003cbr\u003e&nbsp;&nbsp;Energie: 6.5 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e8.57 % Rendite\u003c\u002fb\u003e\u003cbr\u003e17.18 % Volatilität\u003cbr\u003eSharpe 0.32\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;NVDA (Technologie): 18.6 %\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 18.3 %\u003cbr\u003e&nbsp;&nbsp;AMZN (Technologie): 16.2 %\u003cbr\u003e&nbsp;&nbsp;PFE (Gesundheit): 14.6 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 52.0 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 23.8 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 18.3 %\u003cbr\u003e&nbsp;&nbsp;Energie: 6.0 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e8.67 % Rendite\u003c\u002fb\u003e\u003cbr\u003e17.36 % Volatilität\u003cbr\u003eSharpe 0.33\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;NVDA (Technologie): 19.8 %\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 18.5 %\u003cbr\u003e&nbsp;&nbsp;AMZN (Technologie): 17.0 %\u003cbr\u003e&nbsp;&nbsp;PFE (Gesundheit): 15.0 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 52.0 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 24.0 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 18.5 %\u003cbr\u003e&nbsp;&nbsp;Energie: 5.5 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e8.78 % Rendite\u003c\u002fb\u003e\u003cbr\u003e17.55 % Volatilität\u003cbr\u003eSharpe 0.33\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;NVDA (Technologie): 21.1 %\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 18.7 %\u003cbr\u003e&nbsp;&nbsp;AMZN (Technologie): 17.7 %\u003cbr\u003e&nbsp;&nbsp;PFE (Gesundheit): 15.3 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 52.0 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 24.2 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 18.7 %\u003cbr\u003e&nbsp;&nbsp;Energie: 5.0 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e8.88 % Rendite\u003c\u002fb\u003e\u003cbr\u003e17.74 % Volatilität\u003cbr\u003eSharpe 0.33\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;NVDA (Technologie): 22.4 %\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 18.9 %\u003cbr\u003e&nbsp;&nbsp;AMZN (Technologie): 18.5 %\u003cbr\u003e&nbsp;&nbsp;PFE (Gesundheit): 15.6 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 52.0 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 24.5 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 18.9 %\u003cbr\u003e&nbsp;&nbsp;Energie: 4.6 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e8.99 % Rendite\u003c\u002fb\u003e\u003cbr\u003e17.94 % Volatilität\u003cbr\u003eSharpe 0.33\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;NVDA (Technologie): 23.8 %\u003cbr\u003e&nbsp;&nbsp;AMZN (Technologie): 19.3 %\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 19.2 %\u003cbr\u003e&nbsp;&nbsp;PFE (Gesundheit): 16.0 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 52.0 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 24.7 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 19.2 %\u003cbr\u003e&nbsp;&nbsp;Energie: 4.2 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e9.09 % Rendite\u003c\u002fb\u003e\u003cbr\u003e18.14 % Volatilität\u003cbr\u003eSharpe 0.34\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;NVDA (Technologie): 25.2 %\u003cbr\u003e&nbsp;&nbsp;AMZN (Technologie): 20.1 %\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 19.4 %\u003cbr\u003e&nbsp;&nbsp;PFE (Gesundheit): 16.3 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 51.7 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 24.9 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 19.4 %\u003cbr\u003e&nbsp;&nbsp;Energie: 4.0 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e9.20 % Rendite\u003c\u002fb\u003e\u003cbr\u003e18.35 % Volatilität\u003cbr\u003eSharpe 0.34\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;NVDA (Technologie): 26.7 %\u003cbr\u003e&nbsp;&nbsp;AMZN (Technologie): 21.0 %\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 19.6 %\u003cbr\u003e&nbsp;&nbsp;PFE (Gesundheit): 16.6 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 51.5 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 25.1 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 19.6 %\u003cbr\u003e&nbsp;&nbsp;Energie: 3.9 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e9.30 % Rendite\u003c\u002fb\u003e\u003cbr\u003e18.57 % Volatilität\u003cbr\u003eSharpe 0.34\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;NVDA (Technologie): 29.3 %\u003cbr\u003e&nbsp;&nbsp;AMZN (Technologie): 21.7 %\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 19.6 %\u003cbr\u003e&nbsp;&nbsp;PFE (Gesundheit): 17.1 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 53.1 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 24.7 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 19.6 %\u003cbr\u003e&nbsp;&nbsp;Energie: 2.6 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e9.41 % Rendite\u003c\u002fb\u003e\u003cbr\u003e18.81 % Volatilität\u003cbr\u003eSharpe 0.34\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;NVDA (Technologie): 32.2 %\u003cbr\u003e&nbsp;&nbsp;AMZN (Technologie): 22.4 %\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 19.5 %\u003cbr\u003e&nbsp;&nbsp;PFE (Gesundheit): 17.6 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 55.5 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 24.2 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 19.5 %\u003cbr\u003e&nbsp;&nbsp;Energie: 0.8 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e9.51 % Rendite\u003c\u002fb\u003e\u003cbr\u003e19.08 % Volatilität\u003cbr\u003eSharpe 0.34\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;NVDA (Technologie): 35.4 %\u003cbr\u003e&nbsp;&nbsp;AMZN (Technologie): 22.6 %\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 19.0 %\u003cbr\u003e&nbsp;&nbsp;PFE (Gesundheit): 17.9 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 58.1 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 22.9 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 19.0 %\u003cbr\u003e&nbsp;&nbsp;Energie: 0.0 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e9.61 % Rendite\u003c\u002fb\u003e\u003cbr\u003e19.38 % Volatilität\u003cbr\u003eSharpe 0.34\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;NVDA (Technologie): 39.2 %\u003cbr\u003e&nbsp;&nbsp;AMZN (Technologie): 22.2 %\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 18.1 %\u003cbr\u003e&nbsp;&nbsp;PFE (Gesundheit): 18.0 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 61.4 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 20.5 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 18.1 %\u003cbr\u003e&nbsp;&nbsp;Energie: 0.0 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e9.72 % Rendite\u003c\u002fb\u003e\u003cbr\u003e19.73 % Volatilität\u003cbr\u003eSharpe 0.34\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;NVDA (Technologie): 43.1 %\u003cbr\u003e&nbsp;&nbsp;AMZN (Technologie): 21.7 %\u003cbr\u003e&nbsp;&nbsp;PFE (Gesundheit): 18.1 %\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 17.1 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 64.8 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 18.1 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 17.1 %\u003cbr\u003e&nbsp;&nbsp;Energie: 0.0 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e9.82 % Rendite\u003c\u002fb\u003e\u003cbr\u003e20.14 % Volatilität\u003cbr\u003eSharpe 0.34\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;NVDA (Technologie): 49.8 %\u003cbr\u003e&nbsp;&nbsp;AMZN (Technologie): 19.7 %\u003cbr\u003e&nbsp;&nbsp;PFE (Gesundheit): 16.3 %\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 14.2 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 69.5 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 16.3 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 14.2 %\u003cbr\u003e&nbsp;&nbsp;Energie: 0.0 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e9.93 % Rendite\u003c\u002fb\u003e\u003cbr\u003e20.63 % Volatilität\u003cbr\u003eSharpe 0.34\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;NVDA (Technologie): 56.5 %\u003cbr\u003e&nbsp;&nbsp;AMZN (Technologie): 17.6 %\u003cbr\u003e&nbsp;&nbsp;PFE (Gesundheit): 14.6 %\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 11.3 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 74.1 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 14.6 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 11.3 %\u003cbr\u003e&nbsp;&nbsp;Energie: 0.0 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e10.03 % Rendite\u003c\u002fb\u003e\u003cbr\u003e21.21 % Volatilität\u003cbr\u003eSharpe 0.33\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;NVDA (Technologie): 63.2 %\u003cbr\u003e&nbsp;&nbsp;AMZN (Technologie): 15.5 %\u003cbr\u003e&nbsp;&nbsp;PFE (Gesundheit): 12.8 %\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 8.5 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 78.7 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 12.8 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 8.5 %\u003cbr\u003e&nbsp;&nbsp;Energie: 0.0 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e10.14 % Rendite\u003c\u002fb\u003e\u003cbr\u003e21.85 % Volatilität\u003cbr\u003eSharpe 0.33\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;NVDA (Technologie): 69.9 %\u003cbr\u003e&nbsp;&nbsp;AMZN (Technologie): 13.4 %\u003cbr\u003e&nbsp;&nbsp;PFE (Gesundheit): 11.0 %\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 5.6 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 83.4 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 11.0 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 5.6 %\u003cbr\u003e&nbsp;&nbsp;Energie: 0.0 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e10.24 % Rendite\u003c\u002fb\u003e\u003cbr\u003e22.56 % Volatilität\u003cbr\u003eSharpe 0.32\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;NVDA (Technologie): 76.6 %\u003cbr\u003e&nbsp;&nbsp;AMZN (Technologie): 11.3 %\u003cbr\u003e&nbsp;&nbsp;PFE (Gesundheit): 9.3 %\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 2.7 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 88.0 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 9.3 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 2.7 %\u003cbr\u003e&nbsp;&nbsp;Energie: 0.0 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e10.34 % Rendite\u003c\u002fb\u003e\u003cbr\u003e23.33 % Volatilität\u003cbr\u003eSharpe 0.31\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;NVDA (Technologie): 83.4 %\u003cbr\u003e&nbsp;&nbsp;AMZN (Technologie): 9.2 %\u003cbr\u003e&nbsp;&nbsp;PFE (Gesundheit): 7.4 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 92.6 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 7.4 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 0.0 %\u003cbr\u003e&nbsp;&nbsp;Energie: 0.0 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e10.45 % Rendite\u003c\u002fb\u003e\u003cbr\u003e24.17 % Volatilität\u003cbr\u003eSharpe 0.31\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;NVDA (Technologie): 91.7 %\u003cbr\u003e&nbsp;&nbsp;AMZN (Technologie): 4.6 %\u003cbr\u003e&nbsp;&nbsp;PFE (Gesundheit): 3.7 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 96.3 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 3.7 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 0.0 %\u003cbr\u003e&nbsp;&nbsp;Energie: 0.0 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e10.55 % Rendite\u003c\u002fb\u003e\u003cbr\u003e25.09 % Volatilität\u003cbr\u003eSharpe 0.30\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;NVDA (Technologie): 100.0 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 100.0 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 0.0 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 0.0 %\u003cbr\u003e&nbsp;&nbsp;Energie: 0.0 %\u003cextra\u003e\u003c\u002fextra\u003e"],"line":{"color":"#4338ca","width":2.2},"marker":{"size":6},"mode":"lines+markers","name":"ohne Beschränkungen","x":[15.085827952821026,15.09603100322694,15.126312479515288,15.170075549078433,15.22398641509961,15.287585483500651,15.360576057001552,15.441938366948838,15.53143033313573,15.628912323130843,15.734235803301033,15.847244396150387,15.96777499085809,16.095658563358537,16.23072135569197,16.372785636929468,16.5216708143998,16.67719424549791,16.83917199232719,17.007419597807143,17.181752938086603,17.361988629430456,17.547944941449877,17.739441727843374,17.93638910968819,18.139517764302752,18.34886288279876,18.568592819500143,18.810557915961525,19.076431003836696,19.381344776531268,19.727677544724333,20.139223377810183,20.63417985234896,21.206707514021872,21.850709730506797,22.56006672640984,23.328847919048208,24.170727077273646,25.094222782827607],"y":[6.48301004501044,6.5872921983241195,6.6916592823750305,6.796026612441351,6.9003940461430044,7.004761383975596,7.109128785389927,7.213496160588069,7.317863535181927,7.422230919084118,7.5265983041402365,7.6309656843423985,7.735333067275377,7.839700452922968,7.944067835966908,8.048435220082272,8.152802604209416,8.257169988911512,8.361537373379155,8.465904755443132,8.57027213866657,8.674639525218394,8.779006903115336,8.883374290601004,8.98774167287186,9.092109061531845,9.196476444877808,9.300843831212,9.405211196918554,9.50957859578287,9.613945967516507,9.718313364687829,9.822680733921995,9.927048122809436,10.031415508128582,10.135782896335247,10.240150315841095,10.344517670094591,10.44888505946397,10.553252438946982],"type":"scatter"},{"hovertemplate":["\u003cb\u003e6.87 % Rendite\u003c\u002fb\u003e\u003cbr\u003e15.66 % Volatilität\u003cbr\u003eSharpe 0.25\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;AAPL (Technologie): 20.0 %\u003cbr\u003e&nbsp;&nbsp;CVX (Energie): 18.5 %\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 14.0 %\u003cbr\u003e&nbsp;&nbsp;JNJ (Gesundheit): 13.0 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 34.0 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 21.1 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 25.0 %\u003cbr\u003e&nbsp;&nbsp;Energie: 19.9 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e6.92 % Rendite\u003c\u002fb\u003e\u003cbr\u003e15.66 % Volatilität\u003cbr\u003eSharpe 0.25\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;AAPL (Technologie): 20.0 %\u003cbr\u003e&nbsp;&nbsp;CVX (Energie): 18.0 %\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 14.3 %\u003cbr\u003e&nbsp;&nbsp;JNJ (Gesundheit): 12.9 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 34.5 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 21.3 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 24.4 %\u003cbr\u003e&nbsp;&nbsp;Energie: 19.7 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e6.98 % Rendite\u003c\u002fb\u003e\u003cbr\u003e15.67 % Volatilität\u003cbr\u003eSharpe 0.25\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;AAPL (Technologie): 20.0 %\u003cbr\u003e&nbsp;&nbsp;CVX (Energie): 17.5 %\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 14.6 %\u003cbr\u003e&nbsp;&nbsp;JNJ (Gesundheit): 12.8 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 35.0 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 21.6 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 23.8 %\u003cbr\u003e&nbsp;&nbsp;Energie: 19.6 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e7.04 % Rendite\u003c\u002fb\u003e\u003cbr\u003e15.68 % Volatilität\u003cbr\u003eSharpe 0.26\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;AAPL (Technologie): 20.0 %\u003cbr\u003e&nbsp;&nbsp;CVX (Energie): 16.9 %\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 15.0 %\u003cbr\u003e&nbsp;&nbsp;JNJ (Gesundheit): 12.8 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 35.0 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 22.0 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 23.4 %\u003cbr\u003e&nbsp;&nbsp;Energie: 19.7 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e7.09 % Rendite\u003c\u002fb\u003e\u003cbr\u003e15.69 % Volatilität\u003cbr\u003eSharpe 0.26\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;AAPL (Technologie): 20.0 %\u003cbr\u003e&nbsp;&nbsp;CVX (Energie): 16.3 %\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 15.3 %\u003cbr\u003e&nbsp;&nbsp;JNJ (Gesundheit): 12.7 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 35.0 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 22.4 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 22.9 %\u003cbr\u003e&nbsp;&nbsp;Energie: 19.7 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e7.15 % Rendite\u003c\u002fb\u003e\u003cbr\u003e15.71 % Volatilität\u003cbr\u003eSharpe 0.26\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;AAPL (Technologie): 20.0 %\u003cbr\u003e&nbsp;&nbsp;CVX (Energie): 15.8 %\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 15.7 %\u003cbr\u003e&nbsp;&nbsp;JNJ (Gesundheit): 12.6 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 35.0 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 22.8 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 22.4 %\u003cbr\u003e&nbsp;&nbsp;Energie: 19.8 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e7.20 % Rendite\u003c\u002fb\u003e\u003cbr\u003e15.73 % Volatilität\u003cbr\u003eSharpe 0.27\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;AAPL (Technologie): 20.0 %\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 16.1 %\u003cbr\u003e&nbsp;&nbsp;CVX (Energie): 15.2 %\u003cbr\u003e&nbsp;&nbsp;JNJ (Gesundheit): 12.6 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 35.0 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 23.2 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 21.9 %\u003cbr\u003e&nbsp;&nbsp;Energie: 19.9 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e7.26 % Rendite\u003c\u002fb\u003e\u003cbr\u003e15.76 % Volatilität\u003cbr\u003eSharpe 0.27\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;AAPL (Technologie): 20.0 %\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 16.4 %\u003cbr\u003e&nbsp;&nbsp;CVX (Energie): 14.6 %\u003cbr\u003e&nbsp;&nbsp;JNJ (Gesundheit): 12.5 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 35.0 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 23.6 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 21.5 %\u003cbr\u003e&nbsp;&nbsp;Energie: 20.0 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e7.32 % Rendite\u003c\u002fb\u003e\u003cbr\u003e15.79 % Volatilität\u003cbr\u003eSharpe 0.27\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;AAPL (Technologie): 20.0 %\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 16.8 %\u003cbr\u003e&nbsp;&nbsp;CVX (Energie): 14.2 %\u003cbr\u003e&nbsp;&nbsp;JNJ (Gesundheit): 12.5 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 35.0 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 23.9 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 21.0 %\u003cbr\u003e&nbsp;&nbsp;Energie: 20.0 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e7.37 % Rendite\u003c\u002fb\u003e\u003cbr\u003e15.82 % Volatilität\u003cbr\u003eSharpe 0.28\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;AAPL (Technologie): 20.0 %\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 17.1 %\u003cbr\u003e&nbsp;&nbsp;CVX (Energie): 13.7 %\u003cbr\u003e&nbsp;&nbsp;JNJ (Gesundheit): 12.4 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 35.0 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 24.3 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 20.6 %\u003cbr\u003e&nbsp;&nbsp;Energie: 20.1 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e7.43 % Rendite\u003c\u002fb\u003e\u003cbr\u003e15.86 % Volatilität\u003cbr\u003eSharpe 0.28\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;AAPL (Technologie): 20.0 %\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 17.4 %\u003cbr\u003e&nbsp;&nbsp;CVX (Energie): 13.2 %\u003cbr\u003e&nbsp;&nbsp;JNJ (Gesundheit): 12.4 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 35.0 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 24.7 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 20.2 %\u003cbr\u003e&nbsp;&nbsp;Energie: 20.2 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e7.49 % Rendite\u003c\u002fb\u003e\u003cbr\u003e15.90 % Volatilität\u003cbr\u003eSharpe 0.28\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;AAPL (Technologie): 20.0 %\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 17.8 %\u003cbr\u003e&nbsp;&nbsp;CVX (Energie): 12.7 %\u003cbr\u003e&nbsp;&nbsp;PFE (Gesundheit): 12.7 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 35.0 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 25.0 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 19.8 %\u003cbr\u003e&nbsp;&nbsp;Energie: 20.2 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e7.54 % Rendite\u003c\u002fb\u003e\u003cbr\u003e15.95 % Volatilität\u003cbr\u003eSharpe 0.28\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;AAPL (Technologie): 20.0 %\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 18.1 %\u003cbr\u003e&nbsp;&nbsp;PFE (Gesundheit): 13.1 %\u003cbr\u003e&nbsp;&nbsp;JNJ (Gesundheit): 12.3 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 35.0 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 25.4 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 19.3 %\u003cbr\u003e&nbsp;&nbsp;Energie: 20.3 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e7.60 % Rendite\u003c\u002fb\u003e\u003cbr\u003e16.00 % Volatilität\u003cbr\u003eSharpe 0.29\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;AAPL (Technologie): 20.0 %\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 18.5 %\u003cbr\u003e&nbsp;&nbsp;PFE (Gesundheit): 13.5 %\u003cbr\u003e&nbsp;&nbsp;JNJ (Gesundheit): 12.3 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 35.0 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 25.7 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 18.9 %\u003cbr\u003e&nbsp;&nbsp;Energie: 20.3 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e7.65 % Rendite\u003c\u002fb\u003e\u003cbr\u003e16.05 % Volatilität\u003cbr\u003eSharpe 0.29\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;AAPL (Technologie): 20.0 %\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 18.8 %\u003cbr\u003e&nbsp;&nbsp;PFE (Gesundheit): 13.9 %\u003cbr\u003e&nbsp;&nbsp;JNJ (Gesundheit): 12.2 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 35.0 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 26.1 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 18.8 %\u003cbr\u003e&nbsp;&nbsp;Energie: 20.2 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e7.71 % Rendite\u003c\u002fb\u003e\u003cbr\u003e16.11 % Volatilität\u003cbr\u003eSharpe 0.29\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;AAPL (Technologie): 20.0 %\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 19.0 %\u003cbr\u003e&nbsp;&nbsp;PFE (Gesundheit): 14.4 %\u003cbr\u003e&nbsp;&nbsp;JNJ (Gesundheit): 12.0 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 35.0 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 26.4 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 19.0 %\u003cbr\u003e&nbsp;&nbsp;Energie: 19.6 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e7.77 % Rendite\u003c\u002fb\u003e\u003cbr\u003e16.18 % Volatilität\u003cbr\u003eSharpe 0.29\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;AAPL (Technologie): 19.9 %\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 19.3 %\u003cbr\u003e&nbsp;&nbsp;PFE (Gesundheit): 14.8 %\u003cbr\u003e&nbsp;&nbsp;JNJ (Gesundheit): 11.8 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 35.0 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 26.6 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 19.3 %\u003cbr\u003e&nbsp;&nbsp;Energie: 19.1 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e7.82 % Rendite\u003c\u002fb\u003e\u003cbr\u003e16.24 % Volatilität\u003cbr\u003eSharpe 0.30\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 19.4 %\u003cbr\u003e&nbsp;&nbsp;AAPL (Technologie): 18.8 %\u003cbr\u003e&nbsp;&nbsp;PFE (Gesundheit): 15.0 %\u003cbr\u003e&nbsp;&nbsp;JNJ (Gesundheit): 11.7 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 35.0 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 26.8 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 19.4 %\u003cbr\u003e&nbsp;&nbsp;Energie: 18.8 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e7.88 % Rendite\u003c\u002fb\u003e\u003cbr\u003e16.32 % Volatilität\u003cbr\u003eSharpe 0.30\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 19.5 %\u003cbr\u003e&nbsp;&nbsp;AAPL (Technologie): 17.8 %\u003cbr\u003e&nbsp;&nbsp;PFE (Gesundheit): 15.2 %\u003cbr\u003e&nbsp;&nbsp;JNJ (Gesundheit): 11.7 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 35.0 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 26.9 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 19.5 %\u003cbr\u003e&nbsp;&nbsp;Energie: 18.6 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e7.93 % Rendite\u003c\u002fb\u003e\u003cbr\u003e16.39 % Volatilität\u003cbr\u003eSharpe 0.30\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 19.6 %\u003cbr\u003e&nbsp;&nbsp;AAPL (Technologie): 16.8 %\u003cbr\u003e&nbsp;&nbsp;PFE (Gesundheit): 15.4 %\u003cbr\u003e&nbsp;&nbsp;JNJ (Gesundheit): 11.6 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 35.0 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 27.0 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 19.6 %\u003cbr\u003e&nbsp;&nbsp;Energie: 18.3 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e7.99 % Rendite\u003c\u002fb\u003e\u003cbr\u003e16.46 % Volatilität\u003cbr\u003eSharpe 0.30\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 19.8 %\u003cbr\u003e&nbsp;&nbsp;AAPL (Technologie): 15.7 %\u003cbr\u003e&nbsp;&nbsp;PFE (Gesundheit): 15.6 %\u003cbr\u003e&nbsp;&nbsp;JNJ (Gesundheit): 11.6 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 35.0 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 27.2 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 19.8 %\u003cbr\u003e&nbsp;&nbsp;Energie: 18.1 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e8.05 % Rendite\u003c\u002fb\u003e\u003cbr\u003e16.54 % Volatilität\u003cbr\u003eSharpe 0.31\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 19.9 %\u003cbr\u003e&nbsp;&nbsp;PFE (Gesundheit): 15.7 %\u003cbr\u003e&nbsp;&nbsp;AAPL (Technologie): 14.7 %\u003cbr\u003e&nbsp;&nbsp;JNJ (Gesundheit): 11.5 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 35.0 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 27.3 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 19.9 %\u003cbr\u003e&nbsp;&nbsp;Energie: 17.8 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e8.10 % Rendite\u003c\u002fb\u003e\u003cbr\u003e16.62 % Volatilität\u003cbr\u003eSharpe 0.31\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 20.0 %\u003cbr\u003e&nbsp;&nbsp;PFE (Gesundheit): 15.9 %\u003cbr\u003e&nbsp;&nbsp;AAPL (Technologie): 13.7 %\u003cbr\u003e&nbsp;&nbsp;JNJ (Gesundheit): 11.5 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 35.0 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 27.4 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 20.0 %\u003cbr\u003e&nbsp;&nbsp;Energie: 17.6 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e8.16 % Rendite\u003c\u002fb\u003e\u003cbr\u003e16.70 % Volatilität\u003cbr\u003eSharpe 0.31\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 20.0 %\u003cbr\u003e&nbsp;&nbsp;PFE (Gesundheit): 16.1 %\u003cbr\u003e&nbsp;&nbsp;AAPL (Technologie): 12.6 %\u003cbr\u003e&nbsp;&nbsp;JNJ (Gesundheit): 11.5 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 35.0 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 27.6 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 20.0 %\u003cbr\u003e&nbsp;&nbsp;Energie: 17.4 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e8.21 % Rendite\u003c\u002fb\u003e\u003cbr\u003e16.78 % Volatilität\u003cbr\u003eSharpe 0.31\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 20.0 %\u003cbr\u003e&nbsp;&nbsp;PFE (Gesundheit): 16.3 %\u003cbr\u003e&nbsp;&nbsp;AAPL (Technologie): 11.5 %\u003cbr\u003e&nbsp;&nbsp;JNJ (Gesundheit): 11.4 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 35.0 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 27.8 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 20.0 %\u003cbr\u003e&nbsp;&nbsp;Energie: 17.2 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e8.27 % Rendite\u003c\u002fb\u003e\u003cbr\u003e16.87 % Volatilität\u003cbr\u003eSharpe 0.31\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 20.0 %\u003cbr\u003e&nbsp;&nbsp;PFE (Gesundheit): 16.5 %\u003cbr\u003e&nbsp;&nbsp;JNJ (Gesundheit): 11.4 %\u003cbr\u003e&nbsp;&nbsp;NVDA (Technologie): 10.9 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 35.0 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 27.9 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 20.0 %\u003cbr\u003e&nbsp;&nbsp;Energie: 17.1 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e8.33 % Rendite\u003c\u002fb\u003e\u003cbr\u003e16.95 % Volatilität\u003cbr\u003eSharpe 0.31\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 20.0 %\u003cbr\u003e&nbsp;&nbsp;PFE (Gesundheit): 16.8 %\u003cbr\u003e&nbsp;&nbsp;NVDA (Technologie): 11.6 %\u003cbr\u003e&nbsp;&nbsp;JNJ (Gesundheit): 11.4 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 35.0 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 28.1 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 20.0 %\u003cbr\u003e&nbsp;&nbsp;Energie: 16.9 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e8.38 % Rendite\u003c\u002fb\u003e\u003cbr\u003e17.04 % Volatilität\u003cbr\u003eSharpe 0.32\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 20.0 %\u003cbr\u003e&nbsp;&nbsp;PFE (Gesundheit): 17.0 %\u003cbr\u003e&nbsp;&nbsp;NVDA (Technologie): 12.3 %\u003cbr\u003e&nbsp;&nbsp;AMZN (Technologie): 11.6 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 35.0 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 28.3 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 20.0 %\u003cbr\u003e&nbsp;&nbsp;Energie: 16.7 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e8.44 % Rendite\u003c\u002fb\u003e\u003cbr\u003e17.13 % Volatilität\u003cbr\u003eSharpe 0.32\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 20.0 %\u003cbr\u003e&nbsp;&nbsp;PFE (Gesundheit): 17.2 %\u003cbr\u003e&nbsp;&nbsp;NVDA (Technologie): 13.0 %\u003cbr\u003e&nbsp;&nbsp;AMZN (Technologie): 12.1 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 35.0 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 28.5 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 20.0 %\u003cbr\u003e&nbsp;&nbsp;Energie: 16.5 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e8.50 % Rendite\u003c\u002fb\u003e\u003cbr\u003e17.22 % Volatilität\u003cbr\u003eSharpe 0.32\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 20.0 %\u003cbr\u003e&nbsp;&nbsp;PFE (Gesundheit): 17.4 %\u003cbr\u003e&nbsp;&nbsp;NVDA (Technologie): 13.7 %\u003cbr\u003e&nbsp;&nbsp;AMZN (Technologie): 12.5 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 35.0 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 28.6 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 20.0 %\u003cbr\u003e&nbsp;&nbsp;Energie: 16.4 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e8.55 % Rendite\u003c\u002fb\u003e\u003cbr\u003e17.32 % Volatilität\u003cbr\u003eSharpe 0.32\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 20.0 %\u003cbr\u003e&nbsp;&nbsp;PFE (Gesundheit): 17.6 %\u003cbr\u003e&nbsp;&nbsp;NVDA (Technologie): 14.4 %\u003cbr\u003e&nbsp;&nbsp;AMZN (Technologie): 12.9 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 35.0 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 28.8 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 20.0 %\u003cbr\u003e&nbsp;&nbsp;Energie: 16.2 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e8.61 % Rendite\u003c\u002fb\u003e\u003cbr\u003e17.41 % Volatilität\u003cbr\u003eSharpe 0.32\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 20.0 %\u003cbr\u003e&nbsp;&nbsp;PFE (Gesundheit): 17.8 %\u003cbr\u003e&nbsp;&nbsp;NVDA (Technologie): 15.1 %\u003cbr\u003e&nbsp;&nbsp;AMZN (Technologie): 13.3 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 35.0 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 29.0 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 20.0 %\u003cbr\u003e&nbsp;&nbsp;Energie: 16.0 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e8.66 % Rendite\u003c\u002fb\u003e\u003cbr\u003e17.51 % Volatilität\u003cbr\u003eSharpe 0.32\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 20.0 %\u003cbr\u003e&nbsp;&nbsp;PFE (Gesundheit): 18.0 %\u003cbr\u003e&nbsp;&nbsp;NVDA (Technologie): 15.8 %\u003cbr\u003e&nbsp;&nbsp;AMZN (Technologie): 13.7 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 35.0 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 29.2 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 20.0 %\u003cbr\u003e&nbsp;&nbsp;Energie: 15.8 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e8.72 % Rendite\u003c\u002fb\u003e\u003cbr\u003e17.61 % Volatilität\u003cbr\u003eSharpe 0.32\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 20.0 %\u003cbr\u003e&nbsp;&nbsp;PFE (Gesundheit): 18.2 %\u003cbr\u003e&nbsp;&nbsp;NVDA (Technologie): 16.5 %\u003cbr\u003e&nbsp;&nbsp;AMZN (Technologie): 14.1 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 35.0 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 29.4 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 20.0 %\u003cbr\u003e&nbsp;&nbsp;Energie: 15.6 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e8.78 % Rendite\u003c\u002fb\u003e\u003cbr\u003e17.71 % Volatilität\u003cbr\u003eSharpe 0.33\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 20.0 %\u003cbr\u003e&nbsp;&nbsp;PFE (Gesundheit): 18.4 %\u003cbr\u003e&nbsp;&nbsp;NVDA (Technologie): 17.2 %\u003cbr\u003e&nbsp;&nbsp;AMZN (Technologie): 14.5 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 35.0 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 29.5 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 20.0 %\u003cbr\u003e&nbsp;&nbsp;Energie: 15.5 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e8.83 % Rendite\u003c\u002fb\u003e\u003cbr\u003e17.81 % Volatilität\u003cbr\u003eSharpe 0.33\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 20.0 %\u003cbr\u003e&nbsp;&nbsp;PFE (Gesundheit): 18.7 %\u003cbr\u003e&nbsp;&nbsp;NVDA (Technologie): 17.9 %\u003cbr\u003e&nbsp;&nbsp;AMZN (Technologie): 14.9 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 35.0 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 29.7 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 20.0 %\u003cbr\u003e&nbsp;&nbsp;Energie: 15.3 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e8.89 % Rendite\u003c\u002fb\u003e\u003cbr\u003e17.92 % Volatilität\u003cbr\u003eSharpe 0.33\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 20.0 %\u003cbr\u003e&nbsp;&nbsp;PFE (Gesundheit): 19.2 %\u003cbr\u003e&nbsp;&nbsp;NVDA (Technologie): 18.6 %\u003cbr\u003e&nbsp;&nbsp;AMZN (Technologie): 14.8 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 35.0 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 30.1 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 20.0 %\u003cbr\u003e&nbsp;&nbsp;Energie: 14.9 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e8.94 % Rendite\u003c\u002fb\u003e\u003cbr\u003e18.03 % Volatilität\u003cbr\u003eSharpe 0.33\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 20.0 %\u003cbr\u003e&nbsp;&nbsp;PFE (Gesundheit): 19.8 %\u003cbr\u003e&nbsp;&nbsp;NVDA (Technologie): 19.4 %\u003cbr\u003e&nbsp;&nbsp;AMZN (Technologie): 14.7 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 35.0 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 30.5 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 20.0 %\u003cbr\u003e&nbsp;&nbsp;Energie: 14.5 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e9.00 % Rendite\u003c\u002fb\u003e\u003cbr\u003e18.14 % Volatilität\u003cbr\u003eSharpe 0.33\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 20.0 %\u003cbr\u003e&nbsp;&nbsp;PFE (Gesundheit): 20.0 %\u003cbr\u003e&nbsp;&nbsp;NVDA (Technologie): 20.0 %\u003cbr\u003e&nbsp;&nbsp;AMZN (Technologie): 14.7 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 35.0 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 30.7 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 20.0 %\u003cbr\u003e&nbsp;&nbsp;Energie: 14.3 %\u003cextra\u003e\u003c\u002fextra\u003e","\u003cb\u003e9.06 % Rendite\u003c\u002fb\u003e\u003cbr\u003e18.34 % Volatilität\u003cbr\u003eSharpe 0.33\u003cbr\u003e\u003cbr\u003e\u003cb\u003egrößte Positionen\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;PFE (Gesundheit): 20.0 %\u003cbr\u003e&nbsp;&nbsp;GS (Finanzen): 20.0 %\u003cbr\u003e&nbsp;&nbsp;NVDA (Technologie): 20.0 %\u003cbr\u003e&nbsp;&nbsp;XOM (Energie): 20.0 %\u003cbr\u003e\u003cbr\u003e\u003cb\u003eje Sektor\u003c\u002fb\u003e\u003cbr\u003e&nbsp;&nbsp;Technologie: 35.0 %\u003cbr\u003e&nbsp;&nbsp;Gesundheit: 25.0 %\u003cbr\u003e&nbsp;&nbsp;Finanzen: 20.0 %\u003cbr\u003e&nbsp;&nbsp;Energie: 20.0 %\u003cextra\u003e\u003c\u002fextra\u003e"],"line":{"color":"#b45309","width":2.2},"marker":{"size":6},"mode":"lines+markers","name":"mit Hausregeln","x":[15.65856268461297,15.66043069868244,15.66603396462706,15.675714362389986,15.689771555883222,15.70819378400328,15.730965716833415,15.758018598512693,15.78894242363191,15.823632345429642,15.862063734589077,15.904209490682767,15.950040065379412,15.99952383933684,16.052806376641946,16.111674893638387,16.176522183514322,16.244996681285734,16.315536803714107,16.388115767370476,16.462706721837538,16.539282448867052,16.617815391958338,16.698308354599824,16.780765442603013,16.86515797092966,16.951456767178062,17.039633141973894,17.12965793268842,17.221502245019714,17.315137090561638,17.410533556253895,17.507662933656196,17.60649639199812,17.707005590227187,17.80918625814707,17.915225483857775,18.02649000905911,18.1432005757081,18.342738179145087],"y":[6.8682320629367934,6.924237246224478,6.98033728745599,7.036437410128864,7.0925375347947766,7.148637659252476,7.204737782430981,7.2608379083045005,7.316938042713689,7.373038163938786,7.429138290940234,7.485238428482867,7.541338551548684,7.5974386736489015,7.6535388033299565,7.709638928187562,7.765739055720131,7.821839183697943,7.8779393073985595,7.9340394396610305,7.990139567406911,8.046239689109376,8.102339821155711,8.158439948143837,8.21454007859094,8.270640192639915,8.326740332446807,8.382840455405102,8.43894058740081,8.495040715394692,8.551140843759542,8.607240971447803,8.663341092334159,8.719441226450089,8.775541342946571,8.831641481265438,8.887741610643547,8.943841738062225,8.999941865093582,9.056041989817233],"type":"scatter"}], {"template":{"data":{"histogram2dcontour":[{"type":"histogram2dcontour","colorbar":{"outlinewidth":0,"ticks":""},"colorscale":[[0.0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1.0,"#f0f921"]]}],"choropleth":[{"type":"choropleth","colorbar":{"outlinewidth":0,"ticks":""}}],"histogram2d":[{"type":"histogram2d","colorbar":{"outlinewidth":0,"ticks":""},"colorscale":[[0.0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1.0,"#f0f921"]]}],"heatmap":[{"type":"heatmap","colorbar":{"outlinewidth":0,"ticks":""},"colorscale":[[0.0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1.0,"#f0f921"]]}],"contourcarpet":[{"type":"contourcarpet","colorbar":{"outlinewidth":0,"ticks":""}}],"contour":[{"type":"contour","colorbar":{"outlinewidth":0,"ticks":""},"colorscale":[[0.0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1.0,"#f0f921"]]}],"surface":[{"type":"surface","colorbar":{"outlinewidth":0,"ticks":""},"colorscale":[[0.0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1.0,"#f0f921"]]}],"mesh3d":[{"type":"mesh3d","colorbar":{"outlinewidth":0,"ticks":""}}],"scatter":[{"fillpattern":{"fillmode":"overlay","size":10,"solidity":0.2},"type":"scatter"}],"parcoords":[{"type":"parcoords","line":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"scatterpolargl":[{"type":"scatterpolargl","marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"bar":[{"error_x":{"color":"#2a3f5f"},"error_y":{"color":"#2a3f5f"},"marker":{"line":{"color":"#E5ECF6","width":0.5},"pattern":{"fillmode":"overlay","size":10,"solidity":0.2}},"type":"bar"}],"scattergeo":[{"type":"scattergeo","marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"scatterpolar":[{"type":"scatterpolar","marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"histogram":[{"marker":{"pattern":{"fillmode":"overlay","size":10,"solidity":0.2}},"type":"histogram"}],"scattergl":[{"type":"scattergl","marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"scatter3d":[{"type":"scatter3d","line":{"colorbar":{"outlinewidth":0,"ticks":""}},"marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"scattermap":[{"type":"scattermap","marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"scattermapbox":[{"type":"scattermapbox","marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"scatterternary":[{"type":"scatterternary","marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"scattercarpet":[{"type":"scattercarpet","marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"carpet":[{"aaxis":{"endlinecolor":"#2a3f5f","gridcolor":"white","linecolor":"white","minorgridcolor":"white","startlinecolor":"#2a3f5f"},"baxis":{"endlinecolor":"#2a3f5f","gridcolor":"white","linecolor":"white","minorgridcolor":"white","startlinecolor":"#2a3f5f"},"type":"carpet"}],"table":[{"cells":{"fill":{"color":"#EBF0F8"},"line":{"color":"white"}},"header":{"fill":{"color":"#C8D4E3"},"line":{"color":"white"}},"type":"table"}],"barpolar":[{"marker":{"line":{"color":"#E5ECF6","width":0.5},"pattern":{"fillmode":"overlay","size":10,"solidity":0.2}},"type":"barpolar"}],"pie":[{"automargin":true,"type":"pie"}]},"layout":{"autotypenumbers":"strict","colorway":["#636efa","#EF553B","#00cc96","#ab63fa","#FFA15A","#19d3f3","#FF6692","#B6E880","#FF97FF","#FECB52"],"font":{"color":"#2a3f5f"},"hovermode":"closest","hoverlabel":{"align":"left"},"paper_bgcolor":"white","plot_bgcolor":"#E5ECF6","polar":{"bgcolor":"#E5ECF6","angularaxis":{"gridcolor":"white","linecolor":"white","ticks":""},"radialaxis":{"gridcolor":"white","linecolor":"white","ticks":""}},"ternary":{"bgcolor":"#E5ECF6","aaxis":{"gridcolor":"white","linecolor":"white","ticks":""},"baxis":{"gridcolor":"white","linecolor":"white","ticks":""},"caxis":{"gridcolor":"white","linecolor":"white","ticks":""}},"coloraxis":{"colorbar":{"outlinewidth":0,"ticks":""}},"colorscale":{"sequential":[[0.0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1.0,"#f0f921"]],"sequentialminus":[[0.0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1.0,"#f0f921"]],"diverging":[[0,"#8e0152"],[0.1,"#c51b7d"],[0.2,"#de77ae"],[0.3,"#f1b6da"],[0.4,"#fde0ef"],[0.5,"#f7f7f7"],[0.6,"#e6f5d0"],[0.7,"#b8e186"],[0.8,"#7fbc41"],[0.9,"#4d9221"],[1,"#276419"]]},"xaxis":{"gridcolor":"white","linecolor":"white","ticks":"","title":{"standoff":15},"zerolinecolor":"white","automargin":true,"zerolinewidth":2},"yaxis":{"gridcolor":"white","linecolor":"white","ticks":"","title":{"standoff":15},"zerolinecolor":"white","automargin":true,"zerolinewidth":2},"scene":{"xaxis":{"backgroundcolor":"#E5ECF6","gridcolor":"white","linecolor":"white","showbackground":true,"ticks":"","zerolinecolor":"white","gridwidth":2},"yaxis":{"backgroundcolor":"#E5ECF6","gridcolor":"white","linecolor":"white","showbackground":true,"ticks":"","zerolinecolor":"white","gridwidth":2},"zaxis":{"backgroundcolor":"#E5ECF6","gridcolor":"white","linecolor":"white","showbackground":true,"ticks":"","zerolinecolor":"white","gridwidth":2}},"shapedefaults":{"line":{"color":"#2a3f5f"}},"annotationdefaults":{"arrowcolor":"#2a3f5f","arrowhead":0,"arrowwidth":1},"geo":{"bgcolor":"white","landcolor":"#E5ECF6","subunitcolor":"white","showland":true,"showlakes":true,"lakecolor":"white"},"title":{"x":0.05},"mapbox":{"style":"light"}}},"margin":{"l":70,"r":20,"t":55,"b":50},"legend":{"orientation":"h","y":-0.18},"title":{"text":"Effizienzlinie mit und ohne Hausregeln — Gewichte im Hover"},"xaxis":{"title":{"text":"Volatilität σ (% p. a.)"}},"yaxis":{"title":{"text":"erwartete Rendite μ (% p. a.)"}},"height":460,"paper_bgcolor":"rgba(0,0,0,0)","plot_bgcolor":"rgba(0,0,0,0)","hovermode":"closest"}, {"responsive": true} ) }; </script> </div>
</div>
<p><strong>Zwei verschiedene Kosten, und die zweite ist die größere.</strong> Der senkrechte Abstand — hier höchstens 0,58 Prozentpunkte — ist das, was die meisten erwarten: bei gleichem Risiko etwas weniger Rendite. Der eigentliche Einschnitt steht am oberen Ende. Ohne Grenzen darf das Portfolio ganz in die renditestärksten Titel gehen und erreicht 10,55 %; mit einer 20-%-Grenze je Titel und den Sektorlimits ist bei <strong>9,06 %</strong> Schluss. Diese 1,50 Punkte sind nicht teuer erkauft, sondern <strong>überhaupt nicht mehr erreichbar</strong> — auch nicht gegen mehr Risiko.</p>
<blockquote>
<p><strong>📎 Warum hier eine feste Instanz und nicht die Kursdaten</strong> <code>Markowitz_CVXPY.py</code> lädt Livedaten; ein Diagramm daraus sähe an jedem Tag anders aus. Die Figur rechnet deshalb ein festes Universum aus einem Faktormodell — dieselbe Struktur (zehn Titel, vier Sektoren) und dieselben Regeln wie im Kapitel, aber reproduzierbar. Die Zahlen Ihres Livelaufs weichen ab; die Form der Aussage nicht.</p>
</blockquote>
<blockquote>
<p><strong>⚠️ Sektoren niemals über Positionsindizes definieren</strong></p>
<p>Ein naiver, aber gefährlicher Ansatz definiert den Technologiesektor so:</p>
<div class="sourceCode" id="cb5"><pre class="sourceCode python"><code class="sourceCode python"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a>tickers <span class="op">=</span> [<span class="st">&quot;AAPL&quot;</span>, <span class="st">&quot;MSFT&quot;</span>, <span class="st">&quot;NVDA&quot;</span>, <span class="st">&quot;AMZN&quot;</span>, <span class="st">&quot;JNJ&quot;</span>, ...]</span>
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a>tech_indices <span class="op">=</span> [<span class="dv">0</span>, <span class="dv">1</span>, <span class="dv">2</span>, <span class="dv">3</span>] <span class="co"># gemeint: AAPL, MSFT, NVDA, AMZN</span></span></code></pre></div>
<p>Weil <code>yfinance</code> alphabetisch sortiert, trifft das tatsächlich auf <strong>AAPL, AMZN, CVX (Chevron) und GS (Goldman Sachs)</strong> zu — Microsoft und NVIDIA blieben unbeschränkt.</p>
<p><strong>Robust ist die Definition über Namen:</strong></p>
<div class="sourceCode" id="cb6"><pre class="sourceCode python"><code class="sourceCode python"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a>SEKTOREN <span class="op">=</span> {<span class="st">&quot;Technologie&quot;</span>: [<span class="st">&quot;AAPL&quot;</span>, <span class="st">&quot;MSFT&quot;</span>, <span class="st">&quot;NVDA&quot;</span>, <span class="st">&quot;AMZN&quot;</span>], ...}</span>
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a>idx <span class="op">=</span> [tickers.index(t) <span class="cf">for</span> t <span class="kw">in</span> SEKTOREN[<span class="st">&quot;Technologie&quot;</span>]]</span></code></pre></div>
<p>Diese Schreibweise ist nicht nur sicher, sondern auch lesbar — und sie <strong>bricht laut ab</strong>, wenn ein Ticker fehlt, statt still das Falsche zu tun.</p>
</blockquote>
<hr />
<h2 id="sec:markowitz-vollimplementierung-mit-cvxpy">19.6 Vollimplementierung mit CVXPY</h2>
<div class="sourceCode" id="cb7"><pre class="sourceCode python"><code class="sourceCode python"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a><span class="co">#!/usr/bin/env python3</span></span>
<span id="cb7-2"><a href="#cb7-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-3"><a href="#cb7-3" aria-hidden="true" tabindex="-1"></a><span class="co"># Markowitz_CVXPY.py</span></span>
<span id="cb7-4"><a href="#cb7-4" aria-hidden="true" tabindex="-1"></a><span class="co">&quot;&quot;&quot;</span></span>
<span id="cb7-5"><a href="#cb7-5" aria-hidden="true" tabindex="-1"></a><span class="co">Kapitel Markowitz: Markowitz-Mean-Variance-Optimierung mit CVXPY.</span></span>
<span id="cb7-6"><a href="#cb7-6" aria-hidden="true" tabindex="-1"></a><span class="co">Enthaelt GMV, Maximum Sharpe (Korn-Transformation), Effizienzgrenze</span></span>
<span id="cb7-7"><a href="#cb7-7" aria-hidden="true" tabindex="-1"></a><span class="co">und institutionelle Restriktionen.</span></span>
<span id="cb7-8"><a href="#cb7-8" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-9"><a href="#cb7-9" aria-hidden="true" tabindex="-1"></a><span class="co">Eigenschaften:</span></span>
<span id="cb7-10"><a href="#cb7-10" aria-hidden="true" tabindex="-1"></a><span class="co"> * Spaltenreihenfolge erzwungen; Sektoren ueber NAMEN statt Indizes</span></span>
<span id="cb7-11"><a href="#cb7-11" aria-hidden="true" tabindex="-1"></a><span class="co"> * Effizienzgrenze bis zur TATSAECHLICH erreichbaren Maximalrendite</span></span>
<span id="cb7-12"><a href="#cb7-12" aria-hidden="true" tabindex="-1"></a><span class="co"> (nicht etwa max(mu)*0.95 - das waere unter Restriktionen oft</span></span>
<span id="cb7-13"><a href="#cb7-13" aria-hidden="true" tabindex="-1"></a><span class="co"> unerreichbar und die Kurve wuerde stillschweigend vorzeitig abbrechen)</span></span>
<span id="cb7-14"><a href="#cb7-14" aria-hidden="true" tabindex="-1"></a><span class="co"> * Pruefung aller Restriktionen nach dem Loesen</span></span>
<span id="cb7-15"><a href="#cb7-15" aria-hidden="true" tabindex="-1"></a><span class="co"> * Vergleich mit Gleichgewichtung als Realitaetscheck</span></span>
<span id="cb7-16"><a href="#cb7-16" aria-hidden="true" tabindex="-1"></a><span class="co">&quot;&quot;&quot;</span></span>
<span id="cb7-17"><a href="#cb7-17" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-18"><a href="#cb7-18" aria-hidden="true" tabindex="-1"></a><span class="im">import</span> os</span>
<span id="cb7-19"><a href="#cb7-19" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-20"><a href="#cb7-20" aria-hidden="true" tabindex="-1"></a><span class="im">import</span> cvxpy <span class="im">as</span> cp</span>
<span id="cb7-21"><a href="#cb7-21" aria-hidden="true" tabindex="-1"></a><span class="im">import</span> numpy <span class="im">as</span> np</span>
<span id="cb7-22"><a href="#cb7-22" aria-hidden="true" tabindex="-1"></a><span class="im">import</span> pandas <span class="im">as</span> pd</span>
<span id="cb7-23"><a href="#cb7-23" aria-hidden="true" tabindex="-1"></a><span class="im">import</span> yfinance <span class="im">as</span> yf</span>
<span id="cb7-24"><a href="#cb7-24" aria-hidden="true" tabindex="-1"></a><span class="im">from</span> sklearn.covariance <span class="im">import</span> LedoitWolf</span>
<span id="cb7-25"><a href="#cb7-25" aria-hidden="true" tabindex="-1"></a><span class="im">import</span> matplotlib</span>
<span id="cb7-26"><a href="#cb7-26" aria-hidden="true" tabindex="-1"></a>matplotlib.use(<span class="st">&quot;Agg&quot;</span>)</span>
<span id="cb7-27"><a href="#cb7-27" aria-hidden="true" tabindex="-1"></a><span class="im">import</span> matplotlib.pyplot <span class="im">as</span> plt</span>
<span id="cb7-28"><a href="#cb7-28" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-29"><a href="#cb7-29" aria-hidden="true" tabindex="-1"></a>OUTPUT_DIR <span class="op">=</span> os.path.join(os.path.dirname(os.path.abspath(<span class="va">__file__</span>)), <span class="st">&quot;output&quot;</span>)</span>
<span id="cb7-30"><a href="#cb7-30" aria-hidden="true" tabindex="-1"></a>os.makedirs(OUTPUT_DIR, exist_ok<span class="op">=</span><span class="va">True</span>)</span>
<span id="cb7-31"><a href="#cb7-31" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-32"><a href="#cb7-32" aria-hidden="true" tabindex="-1"></a>TICKER <span class="op">=</span> [<span class="st">&quot;AAPL&quot;</span>, <span class="st">&quot;MSFT&quot;</span>, <span class="st">&quot;NVDA&quot;</span>, <span class="st">&quot;AMZN&quot;</span>, <span class="st">&quot;JNJ&quot;</span>, <span class="st">&quot;PFE&quot;</span>, <span class="st">&quot;JPM&quot;</span>, <span class="st">&quot;GS&quot;</span>, <span class="st">&quot;XOM&quot;</span>, <span class="st">&quot;CVX&quot;</span>]</span>
<span id="cb7-33"><a href="#cb7-33" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-34"><a href="#cb7-34" aria-hidden="true" tabindex="-1"></a><span class="co"># Sektoren ueber Namen definiert, nicht ueber Positionen</span></span>
<span id="cb7-35"><a href="#cb7-35" aria-hidden="true" tabindex="-1"></a>SEKTOREN <span class="op">=</span> {</span>
<span id="cb7-36"><a href="#cb7-36" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;Technologie&quot;</span>: [<span class="st">&quot;AAPL&quot;</span>, <span class="st">&quot;MSFT&quot;</span>, <span class="st">&quot;NVDA&quot;</span>, <span class="st">&quot;AMZN&quot;</span>],</span>
<span id="cb7-37"><a href="#cb7-37" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;Gesundheit&quot;</span>: [<span class="st">&quot;JNJ&quot;</span>, <span class="st">&quot;PFE&quot;</span>],</span>
<span id="cb7-38"><a href="#cb7-38" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;Finanzen&quot;</span>: [<span class="st">&quot;JPM&quot;</span>, <span class="st">&quot;GS&quot;</span>],</span>
<span id="cb7-39"><a href="#cb7-39" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;Energie&quot;</span>: [<span class="st">&quot;XOM&quot;</span>, <span class="st">&quot;CVX&quot;</span>],</span>
<span id="cb7-40"><a href="#cb7-40" aria-hidden="true" tabindex="-1"></a>}</span>
<span id="cb7-41"><a href="#cb7-41" aria-hidden="true" tabindex="-1"></a>SEKTORGRENZEN <span class="op">=</span> {<span class="st">&quot;Technologie&quot;</span>: <span class="fl">0.35</span>, <span class="st">&quot;Gesundheit&quot;</span>: <span class="fl">0.40</span>,</span>
<span id="cb7-42"><a href="#cb7-42" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;Finanzen&quot;</span>: <span class="fl">0.40</span>, <span class="st">&quot;Energie&quot;</span>: <span class="fl">0.40</span>}</span>
<span id="cb7-43"><a href="#cb7-43" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-44"><a href="#cb7-44" aria-hidden="true" tabindex="-1"></a>MAX_GEWICHT <span class="op">=</span> <span class="fl">0.20</span> <span class="co"># hoechstens 20 % je Einzeltitel</span></span>
<span id="cb7-45"><a href="#cb7-45" aria-hidden="true" tabindex="-1"></a>RISIKOFREI <span class="op">=</span> <span class="fl">0.03</span> <span class="co"># 3 % p.a.</span></span>
<span id="cb7-46"><a href="#cb7-46" aria-hidden="true" tabindex="-1"></a>HANDELSTAGE <span class="op">=</span> <span class="dv">252</span></span>
<span id="cb7-47"><a href="#cb7-47" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-48"><a href="#cb7-48" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-49"><a href="#cb7-49" aria-hidden="true" tabindex="-1"></a><span class="kw">def</span> lade_daten():</span>
<span id="cb7-50"><a href="#cb7-50" aria-hidden="true" tabindex="-1"></a> <span class="co">&quot;&quot;&quot;Laedt Kurse und garantiert die Spaltenreihenfolge.&quot;&quot;&quot;</span></span>
<span id="cb7-51"><a href="#cb7-51" aria-hidden="true" tabindex="-1"></a> ende <span class="op">=</span> pd.Timestamp.today().normalize()</span>
<span id="cb7-52"><a href="#cb7-52" aria-hidden="true" tabindex="-1"></a> start <span class="op">=</span> ende <span class="op">-</span> pd.DateOffset(years<span class="op">=</span><span class="dv">2</span>)</span>
<span id="cb7-53"><a href="#cb7-53" aria-hidden="true" tabindex="-1"></a> roh <span class="op">=</span> yf.download(TICKER, start<span class="op">=</span>start, end<span class="op">=</span>ende, auto_adjust<span class="op">=</span><span class="va">True</span>, progress<span class="op">=</span><span class="va">False</span>)</span>
<span id="cb7-54"><a href="#cb7-54" aria-hidden="true" tabindex="-1"></a> <span class="cf">if</span> roh.empty:</span>
<span id="cb7-55"><a href="#cb7-55" aria-hidden="true" tabindex="-1"></a> <span class="cf">raise</span> <span class="pp">SystemExit</span>(<span class="st">&quot;Download fehlgeschlagen (Netz, Ticker oder Rate-Limit pruefen).&quot;</span>)</span>
<span id="cb7-56"><a href="#cb7-56" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-57"><a href="#cb7-57" aria-hidden="true" tabindex="-1"></a> <span class="cf">if</span> <span class="bu">isinstance</span>(roh.columns, pd.MultiIndex):</span>
<span id="cb7-58"><a href="#cb7-58" aria-hidden="true" tabindex="-1"></a> kurse <span class="op">=</span> roh[<span class="st">&quot;Close&quot;</span>][TICKER].dropna() <span class="co"># [TICKER] erzwingt die Reihenfolge</span></span>
<span id="cb7-59"><a href="#cb7-59" aria-hidden="true" tabindex="-1"></a> <span class="cf">else</span>:</span>
<span id="cb7-60"><a href="#cb7-60" aria-hidden="true" tabindex="-1"></a> kurse <span class="op">=</span> roh[[<span class="st">&quot;Close&quot;</span>]].dropna()</span>
<span id="cb7-61"><a href="#cb7-61" aria-hidden="true" tabindex="-1"></a> kurse.columns <span class="op">=</span> TICKER</span>
<span id="cb7-62"><a href="#cb7-62" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-63"><a href="#cb7-63" aria-hidden="true" tabindex="-1"></a> <span class="cf">assert</span> <span class="bu">list</span>(kurse.columns) <span class="op">==</span> TICKER, <span class="st">&quot;Spaltenreihenfolge weicht ab!&quot;</span></span>
<span id="cb7-64"><a href="#cb7-64" aria-hidden="true" tabindex="-1"></a> renditen <span class="op">=</span> kurse.pct_change().dropna()</span>
<span id="cb7-65"><a href="#cb7-65" aria-hidden="true" tabindex="-1"></a> mu <span class="op">=</span> renditen.mean().values <span class="op">*</span> HANDELSTAGE</span>
<span id="cb7-66"><a href="#cb7-66" aria-hidden="true" tabindex="-1"></a> sigma <span class="op">=</span> LedoitWolf().fit(renditen.values).covariance_ <span class="op">*</span> HANDELSTAGE</span>
<span id="cb7-67"><a href="#cb7-67" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> kurse, renditen, mu, sigma</span>
<span id="cb7-68"><a href="#cb7-68" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-69"><a href="#cb7-69" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-70"><a href="#cb7-70" aria-hidden="true" tabindex="-1"></a><span class="kw">def</span> sektor_indizes():</span>
<span id="cb7-71"><a href="#cb7-71" aria-hidden="true" tabindex="-1"></a> <span class="co">&quot;&quot;&quot;Uebersetzt Sektornamen einmalig in Positionsindizes - mit Pruefung.&quot;&quot;&quot;</span></span>
<span id="cb7-72"><a href="#cb7-72" aria-hidden="true" tabindex="-1"></a> ergebnis <span class="op">=</span> {}</span>
<span id="cb7-73"><a href="#cb7-73" aria-hidden="true" tabindex="-1"></a> <span class="cf">for</span> sektor, titel <span class="kw">in</span> SEKTOREN.items():</span>
<span id="cb7-74"><a href="#cb7-74" aria-hidden="true" tabindex="-1"></a> fehlend <span class="op">=</span> [t <span class="cf">for</span> t <span class="kw">in</span> titel <span class="cf">if</span> t <span class="kw">not</span> <span class="kw">in</span> TICKER]</span>
<span id="cb7-75"><a href="#cb7-75" aria-hidden="true" tabindex="-1"></a> <span class="cf">if</span> fehlend:</span>
<span id="cb7-76"><a href="#cb7-76" aria-hidden="true" tabindex="-1"></a> <span class="cf">raise</span> <span class="pp">ValueError</span>(<span class="ss">f&quot;Sektor &#39;</span><span class="sc">{</span>sektor<span class="sc">}</span><span class="ss">&#39;: Ticker </span><span class="sc">{</span>fehlend<span class="sc">}</span><span class="ss"> nicht im Universum.&quot;</span>)</span>
<span id="cb7-77"><a href="#cb7-77" aria-hidden="true" tabindex="-1"></a> ergebnis[sektor] <span class="op">=</span> [TICKER.index(t) <span class="cf">for</span> t <span class="kw">in</span> titel]</span>
<span id="cb7-78"><a href="#cb7-78" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> ergebnis</span>
<span id="cb7-79"><a href="#cb7-79" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-80"><a href="#cb7-80" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-81"><a href="#cb7-81" aria-hidden="true" tabindex="-1"></a><span class="kw">def</span> basis_restriktionen(w, skala<span class="op">=</span><span class="va">None</span>):</span>
<span id="cb7-82"><a href="#cb7-82" aria-hidden="true" tabindex="-1"></a> <span class="co">&quot;&quot;&quot;</span></span>
<span id="cb7-83"><a href="#cb7-83" aria-hidden="true" tabindex="-1"></a><span class="co"> Standardrestriktionen. Bei der Korn-Transformation muessen ALLE Grenzen</span></span>
<span id="cb7-84"><a href="#cb7-84" aria-hidden="true" tabindex="-1"></a><span class="co"> mit kappa mitskaliert werden - dafuer dient der Parameter &#39;skala&#39;.</span></span>
<span id="cb7-85"><a href="#cb7-85" aria-hidden="true" tabindex="-1"></a><span class="co"> &quot;&quot;&quot;</span></span>
<span id="cb7-86"><a href="#cb7-86" aria-hidden="true" tabindex="-1"></a> eins <span class="op">=</span> <span class="fl">1.0</span> <span class="cf">if</span> skala <span class="kw">is</span> <span class="va">None</span> <span class="cf">else</span> skala</span>
<span id="cb7-87"><a href="#cb7-87" aria-hidden="true" tabindex="-1"></a> idx <span class="op">=</span> sektor_indizes()</span>
<span id="cb7-88"><a href="#cb7-88" aria-hidden="true" tabindex="-1"></a> bedingungen <span class="op">=</span> [w <span class="op">&gt;=</span> <span class="dv">0</span>, w <span class="op">&lt;=</span> MAX_GEWICHT <span class="op">*</span> eins]</span>
<span id="cb7-89"><a href="#cb7-89" aria-hidden="true" tabindex="-1"></a> <span class="cf">for</span> sektor, positionen <span class="kw">in</span> idx.items():</span>
<span id="cb7-90"><a href="#cb7-90" aria-hidden="true" tabindex="-1"></a> bedingungen.append(cp.<span class="bu">sum</span>(w[positionen]) <span class="op">&lt;=</span> SEKTORGRENZEN[sektor] <span class="op">*</span> eins)</span>
<span id="cb7-91"><a href="#cb7-91" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> bedingungen</span>
<span id="cb7-92"><a href="#cb7-92" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-93"><a href="#cb7-93" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-94"><a href="#cb7-94" aria-hidden="true" tabindex="-1"></a><span class="kw">def</span> loese_gmv(sigma):</span>
<span id="cb7-95"><a href="#cb7-95" aria-hidden="true" tabindex="-1"></a> <span class="co">&quot;&quot;&quot;Global Minimum Variance: minimiere Risiko, ignoriere Rendite.&quot;&quot;&quot;</span></span>
<span id="cb7-96"><a href="#cb7-96" aria-hidden="true" tabindex="-1"></a> w <span class="op">=</span> cp.Variable(<span class="bu">len</span>(sigma))</span>
<span id="cb7-97"><a href="#cb7-97" aria-hidden="true" tabindex="-1"></a> problem <span class="op">=</span> cp.Problem(cp.Minimize(<span class="fl">0.5</span> <span class="op">*</span> cp.quad_form(w, sigma)),</span>
<span id="cb7-98"><a href="#cb7-98" aria-hidden="true" tabindex="-1"></a> [cp.<span class="bu">sum</span>(w) <span class="op">==</span> <span class="dv">1</span>] <span class="op">+</span> basis_restriktionen(w))</span>
<span id="cb7-99"><a href="#cb7-99" aria-hidden="true" tabindex="-1"></a> problem.solve()</span>
<span id="cb7-100"><a href="#cb7-100" aria-hidden="true" tabindex="-1"></a> <span class="cf">if</span> problem.status <span class="kw">not</span> <span class="kw">in</span> (<span class="st">&quot;optimal&quot;</span>, <span class="st">&quot;optimal_inaccurate&quot;</span>):</span>
<span id="cb7-101"><a href="#cb7-101" aria-hidden="true" tabindex="-1"></a> <span class="cf">raise</span> <span class="pp">SystemExit</span>(<span class="ss">f&quot;GMV nicht loesbar: </span><span class="sc">{</span>problem<span class="sc">.</span>status<span class="sc">}</span><span class="ss">&quot;</span>)</span>
<span id="cb7-102"><a href="#cb7-102" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> w.value</span>
<span id="cb7-103"><a href="#cb7-103" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-104"><a href="#cb7-104" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-105"><a href="#cb7-105" aria-hidden="true" tabindex="-1"></a><span class="kw">def</span> loese_max_sharpe(mu, sigma, r_f):</span>
<span id="cb7-106"><a href="#cb7-106" aria-hidden="true" tabindex="-1"></a> <span class="co">&quot;&quot;&quot;Maximum Sharpe Ratio ueber die Korn-Transformation.&quot;&quot;&quot;</span></span>
<span id="cb7-107"><a href="#cb7-107" aria-hidden="true" tabindex="-1"></a> n <span class="op">=</span> <span class="bu">len</span>(mu)</span>
<span id="cb7-108"><a href="#cb7-108" aria-hidden="true" tabindex="-1"></a> ueberrendite <span class="op">=</span> mu <span class="op">-</span> r_f</span>
<span id="cb7-109"><a href="#cb7-109" aria-hidden="true" tabindex="-1"></a> <span class="cf">if</span> np.<span class="bu">all</span>(ueberrendite <span class="op">&lt;=</span> <span class="dv">0</span>):</span>
<span id="cb7-110"><a href="#cb7-110" aria-hidden="true" tabindex="-1"></a> <span class="cf">raise</span> <span class="pp">SystemExit</span>(<span class="st">&quot;Kein Titel schlaegt den risikofreien Zins - &quot;</span></span>
<span id="cb7-111"><a href="#cb7-111" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;Max-Sharpe-Portfolio existiert nicht.&quot;</span>)</span>
<span id="cb7-112"><a href="#cb7-112" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-113"><a href="#cb7-113" aria-hidden="true" tabindex="-1"></a> y <span class="op">=</span> cp.Variable(n)</span>
<span id="cb7-114"><a href="#cb7-114" aria-hidden="true" tabindex="-1"></a> kappa <span class="op">=</span> cp.Variable(nonneg<span class="op">=</span><span class="va">True</span>)</span>
<span id="cb7-115"><a href="#cb7-115" aria-hidden="true" tabindex="-1"></a> bedingungen <span class="op">=</span> ([ueberrendite <span class="op">@</span> y <span class="op">==</span> <span class="dv">1</span>, cp.<span class="bu">sum</span>(y) <span class="op">==</span> kappa]</span>
<span id="cb7-116"><a href="#cb7-116" aria-hidden="true" tabindex="-1"></a> <span class="op">+</span> basis_restriktionen(y, skala<span class="op">=</span>kappa))</span>
<span id="cb7-117"><a href="#cb7-117" aria-hidden="true" tabindex="-1"></a> problem <span class="op">=</span> cp.Problem(cp.Minimize(<span class="fl">0.5</span> <span class="op">*</span> cp.quad_form(y, sigma)), bedingungen)</span>
<span id="cb7-118"><a href="#cb7-118" aria-hidden="true" tabindex="-1"></a> problem.solve()</span>
<span id="cb7-119"><a href="#cb7-119" aria-hidden="true" tabindex="-1"></a> <span class="cf">if</span> problem.status <span class="kw">not</span> <span class="kw">in</span> (<span class="st">&quot;optimal&quot;</span>, <span class="st">&quot;optimal_inaccurate&quot;</span>):</span>
<span id="cb7-120"><a href="#cb7-120" aria-hidden="true" tabindex="-1"></a> <span class="cf">raise</span> <span class="pp">SystemExit</span>(<span class="ss">f&quot;Max-Sharpe nicht loesbar: </span><span class="sc">{</span>problem<span class="sc">.</span>status<span class="sc">}</span><span class="ss">&quot;</span>)</span>
<span id="cb7-121"><a href="#cb7-121" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> y.value <span class="op">/</span> kappa.value</span>
<span id="cb7-122"><a href="#cb7-122" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-123"><a href="#cb7-123" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-124"><a href="#cb7-124" aria-hidden="true" tabindex="-1"></a><span class="kw">def</span> max_erreichbare_rendite(mu, sigma):</span>
<span id="cb7-125"><a href="#cb7-125" aria-hidden="true" tabindex="-1"></a> <span class="co">&quot;&quot;&quot;</span></span>
<span id="cb7-126"><a href="#cb7-126" aria-hidden="true" tabindex="-1"></a><span class="co"> Achtung: max(mu)*0.95 als obere Grenze der Frontier anzunehmen, ist unter</span></span>
<span id="cb7-127"><a href="#cb7-127" aria-hidden="true" tabindex="-1"></a><span class="co"> Positions- und Sektorgrenzen oft unerreichbar; die Kurve wuerde dann</span></span>
<span id="cb7-128"><a href="#cb7-128" aria-hidden="true" tabindex="-1"></a><span class="co"> stillschweigend abbrechen. Hier wird die tatsaechliche Obergrenze berechnet.</span></span>
<span id="cb7-129"><a href="#cb7-129" aria-hidden="true" tabindex="-1"></a><span class="co"> &quot;&quot;&quot;</span></span>
<span id="cb7-130"><a href="#cb7-130" aria-hidden="true" tabindex="-1"></a> w <span class="op">=</span> cp.Variable(<span class="bu">len</span>(mu))</span>
<span id="cb7-131"><a href="#cb7-131" aria-hidden="true" tabindex="-1"></a> problem <span class="op">=</span> cp.Problem(cp.Maximize(mu <span class="op">@</span> w), [cp.<span class="bu">sum</span>(w) <span class="op">==</span> <span class="dv">1</span>] <span class="op">+</span> basis_restriktionen(w))</span>
<span id="cb7-132"><a href="#cb7-132" aria-hidden="true" tabindex="-1"></a> problem.solve()</span>
<span id="cb7-133"><a href="#cb7-133" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> <span class="bu">float</span>(problem.value)</span>
<span id="cb7-134"><a href="#cb7-134" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-135"><a href="#cb7-135" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-136"><a href="#cb7-136" aria-hidden="true" tabindex="-1"></a><span class="kw">def</span> berechne_frontier(mu, sigma, ret_min, ret_max, punkte<span class="op">=</span><span class="dv">40</span>):</span>
<span id="cb7-137"><a href="#cb7-137" aria-hidden="true" tabindex="-1"></a> <span class="co">&quot;&quot;&quot;Effizienzgrenze durch Variation der Mindestrendite.&quot;&quot;&quot;</span></span>
<span id="cb7-138"><a href="#cb7-138" aria-hidden="true" tabindex="-1"></a> n <span class="op">=</span> <span class="bu">len</span>(mu)</span>
<span id="cb7-139"><a href="#cb7-139" aria-hidden="true" tabindex="-1"></a> w <span class="op">=</span> cp.Variable(n)</span>
<span id="cb7-140"><a href="#cb7-140" aria-hidden="true" tabindex="-1"></a> ziel_rendite <span class="op">=</span> cp.Parameter()</span>
<span id="cb7-141"><a href="#cb7-141" aria-hidden="true" tabindex="-1"></a> problem <span class="op">=</span> cp.Problem(</span>
<span id="cb7-142"><a href="#cb7-142" aria-hidden="true" tabindex="-1"></a> cp.Minimize(<span class="fl">0.5</span> <span class="op">*</span> cp.quad_form(w, sigma)),</span>
<span id="cb7-143"><a href="#cb7-143" aria-hidden="true" tabindex="-1"></a> [cp.<span class="bu">sum</span>(w) <span class="op">==</span> <span class="dv">1</span>, mu <span class="op">@</span> w <span class="op">&gt;=</span> ziel_rendite] <span class="op">+</span> basis_restriktionen(w))</span>
<span id="cb7-144"><a href="#cb7-144" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-145"><a href="#cb7-145" aria-hidden="true" tabindex="-1"></a> volas, renditen, uebersprungen <span class="op">=</span> [], [], <span class="dv">0</span></span>
<span id="cb7-146"><a href="#cb7-146" aria-hidden="true" tabindex="-1"></a> <span class="cf">for</span> ziel <span class="kw">in</span> np.linspace(ret_min, ret_max, punkte):</span>
<span id="cb7-147"><a href="#cb7-147" aria-hidden="true" tabindex="-1"></a> ziel_rendite.value <span class="op">=</span> ziel</span>
<span id="cb7-148"><a href="#cb7-148" aria-hidden="true" tabindex="-1"></a> problem.solve()</span>
<span id="cb7-149"><a href="#cb7-149" aria-hidden="true" tabindex="-1"></a> <span class="cf">if</span> problem.status <span class="kw">in</span> (<span class="st">&quot;optimal&quot;</span>, <span class="st">&quot;optimal_inaccurate&quot;</span>):</span>
<span id="cb7-150"><a href="#cb7-150" aria-hidden="true" tabindex="-1"></a> volas.append(<span class="bu">float</span>(np.sqrt(w.value <span class="op">@</span> sigma <span class="op">@</span> w.value)))</span>
<span id="cb7-151"><a href="#cb7-151" aria-hidden="true" tabindex="-1"></a> renditen.append(<span class="bu">float</span>(mu <span class="op">@</span> w.value))</span>
<span id="cb7-152"><a href="#cb7-152" aria-hidden="true" tabindex="-1"></a> <span class="cf">else</span>:</span>
<span id="cb7-153"><a href="#cb7-153" aria-hidden="true" tabindex="-1"></a> uebersprungen <span class="op">+=</span> <span class="dv">1</span></span>
<span id="cb7-154"><a href="#cb7-154" aria-hidden="true" tabindex="-1"></a> <span class="cf">if</span> uebersprungen:</span>
<span id="cb7-155"><a href="#cb7-155" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(<span class="ss">f&quot; Hinweis: </span><span class="sc">{</span>uebersprungen<span class="sc">}</span><span class="ss"> Zielrenditen waren nicht erreichbar.&quot;</span>)</span>
<span id="cb7-156"><a href="#cb7-156" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> np.array(volas), np.array(renditen)</span>
<span id="cb7-157"><a href="#cb7-157" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-158"><a href="#cb7-158" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-159"><a href="#cb7-159" aria-hidden="true" tabindex="-1"></a><span class="kw">def</span> pruefe_restriktionen(w, bezeichnung):</span>
<span id="cb7-160"><a href="#cb7-160" aria-hidden="true" tabindex="-1"></a> <span class="co">&quot;&quot;&quot;Nach dem Loesen: haelt die Loesung wirklich alle Regeln ein?&quot;&quot;&quot;</span></span>
<span id="cb7-161"><a href="#cb7-161" aria-hidden="true" tabindex="-1"></a> <span class="cf">assert</span> <span class="bu">abs</span>(w.<span class="bu">sum</span>() <span class="op">-</span> <span class="dv">1</span>) <span class="op">&lt;</span> <span class="fl">1e-6</span>, <span class="ss">f&quot;</span><span class="sc">{</span>bezeichnung<span class="sc">}</span><span class="ss">: Summe != 1&quot;</span></span>
<span id="cb7-162"><a href="#cb7-162" aria-hidden="true" tabindex="-1"></a> <span class="cf">assert</span> w.<span class="bu">min</span>() <span class="op">&gt;</span> <span class="op">-</span><span class="fl">1e-6</span>, <span class="ss">f&quot;</span><span class="sc">{</span>bezeichnung<span class="sc">}</span><span class="ss">: negatives Gewicht&quot;</span></span>
<span id="cb7-163"><a href="#cb7-163" aria-hidden="true" tabindex="-1"></a> <span class="cf">assert</span> w.<span class="bu">max</span>() <span class="op">&lt;</span> MAX_GEWICHT <span class="op">+</span> <span class="fl">1e-6</span>, <span class="ss">f&quot;</span><span class="sc">{</span>bezeichnung<span class="sc">}</span><span class="ss">: Positionsgrenze verletzt&quot;</span></span>
<span id="cb7-164"><a href="#cb7-164" aria-hidden="true" tabindex="-1"></a> <span class="cf">for</span> sektor, positionen <span class="kw">in</span> sektor_indizes().items():</span>
<span id="cb7-165"><a href="#cb7-165" aria-hidden="true" tabindex="-1"></a> anteil <span class="op">=</span> w[positionen].<span class="bu">sum</span>()</span>
<span id="cb7-166"><a href="#cb7-166" aria-hidden="true" tabindex="-1"></a> <span class="cf">assert</span> anteil <span class="op">&lt;</span> SEKTORGRENZEN[sektor] <span class="op">+</span> <span class="fl">1e-6</span>, <span class="op">\</span></span>
<span id="cb7-167"><a href="#cb7-167" aria-hidden="true" tabindex="-1"></a> <span class="ss">f&quot;</span><span class="sc">{</span>bezeichnung<span class="sc">}</span><span class="ss">: Sektor </span><span class="sc">{</span>sektor<span class="sc">}</span><span class="ss"> bei </span><span class="sc">{</span>anteil<span class="sc">:.3f}</span><span class="ss"> ueber Grenze&quot;</span></span>
<span id="cb7-168"><a href="#cb7-168" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-169"><a href="#cb7-169" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-170"><a href="#cb7-170" aria-hidden="true" tabindex="-1"></a><span class="kw">def</span> kennzahlen(w, mu, sigma, r_f):</span>
<span id="cb7-171"><a href="#cb7-171" aria-hidden="true" tabindex="-1"></a> rendite <span class="op">=</span> <span class="bu">float</span>(mu <span class="op">@</span> w)</span>
<span id="cb7-172"><a href="#cb7-172" aria-hidden="true" tabindex="-1"></a> vola <span class="op">=</span> <span class="bu">float</span>(np.sqrt(w <span class="op">@</span> sigma <span class="op">@</span> w))</span>
<span id="cb7-173"><a href="#cb7-173" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> rendite, vola, (rendite <span class="op">-</span> r_f) <span class="op">/</span> vola</span>
<span id="cb7-174"><a href="#cb7-174" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-175"><a href="#cb7-175" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-176"><a href="#cb7-176" aria-hidden="true" tabindex="-1"></a><span class="cf">if</span> <span class="va">__name__</span> <span class="op">==</span> <span class="st">&quot;__main__&quot;</span>:</span>
<span id="cb7-177"><a href="#cb7-177" aria-hidden="true" tabindex="-1"></a> kurse, renditen, mu, sigma <span class="op">=</span> lade_daten()</span>
<span id="cb7-178"><a href="#cb7-178" aria-hidden="true" tabindex="-1"></a> n <span class="op">=</span> <span class="bu">len</span>(TICKER)</span>
<span id="cb7-179"><a href="#cb7-179" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-180"><a href="#cb7-180" aria-hidden="true" tabindex="-1"></a> w_gmv <span class="op">=</span> loese_gmv(sigma)</span>
<span id="cb7-181"><a href="#cb7-181" aria-hidden="true" tabindex="-1"></a> w_sharpe <span class="op">=</span> loese_max_sharpe(mu, sigma, RISIKOFREI)</span>
<span id="cb7-182"><a href="#cb7-182" aria-hidden="true" tabindex="-1"></a> w_gleich <span class="op">=</span> np.ones(n) <span class="op">/</span> n</span>
<span id="cb7-183"><a href="#cb7-183" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-184"><a href="#cb7-184" aria-hidden="true" tabindex="-1"></a> pruefe_restriktionen(w_gmv, <span class="st">&quot;GMV&quot;</span>)</span>
<span id="cb7-185"><a href="#cb7-185" aria-hidden="true" tabindex="-1"></a> pruefe_restriktionen(w_sharpe, <span class="st">&quot;Max Sharpe&quot;</span>)</span>
<span id="cb7-186"><a href="#cb7-186" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-187"><a href="#cb7-187" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(<span class="st">&quot;=&quot;</span> <span class="op">*</span> <span class="dv">88</span>)</span>
<span id="cb7-188"><a href="#cb7-188" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(<span class="st">&quot; ERGEBNISSE DER MEAN-VARIANCE-OPTIMIERUNG&quot;</span>)</span>
<span id="cb7-189"><a href="#cb7-189" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(<span class="st">&quot;=&quot;</span> <span class="op">*</span> <span class="dv">88</span>)</span>
<span id="cb7-190"><a href="#cb7-190" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(<span class="ss">f&quot;Datenbasis: </span><span class="sc">{</span><span class="bu">len</span>(renditen)<span class="sc">}</span><span class="ss"> Handelstage, </span><span class="sc">{</span>n<span class="sc">}</span><span class="ss"> Titel, &quot;</span></span>
<span id="cb7-191"><a href="#cb7-191" aria-hidden="true" tabindex="-1"></a> <span class="ss">f&quot;risikofreier Zins </span><span class="sc">{</span>RISIKOFREI<span class="op">*</span><span class="dv">100</span><span class="sc">:.1f}</span><span class="ss"> %&quot;</span>)</span>
<span id="cb7-192"><a href="#cb7-192" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(<span class="ss">f&quot;Restriktionen: max. </span><span class="sc">{</span>MAX_GEWICHT<span class="op">*</span><span class="dv">100</span><span class="sc">:.0f}</span><span class="ss"> % je Titel, &quot;</span></span>
<span id="cb7-193"><a href="#cb7-193" aria-hidden="true" tabindex="-1"></a> <span class="ss">f&quot;Sektorgrenzen </span><span class="sc">{</span>SEKTORGRENZEN<span class="sc">}</span><span class="ch">\n</span><span class="ss">&quot;</span>)</span>
<span id="cb7-194"><a href="#cb7-194" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-195"><a href="#cb7-195" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(<span class="ss">f&quot;</span><span class="sc">{</span><span class="st">&#39;Portfolio&#39;</span><span class="sc">:&lt;26}</span><span class="ss"> </span><span class="sc">{</span><span class="st">&#39;Rendite&#39;</span><span class="sc">:&gt;10}</span><span class="ss"> </span><span class="sc">{</span><span class="st">&#39;Volatilitaet&#39;</span><span class="sc">:&gt;13}</span><span class="ss"> </span><span class="sc">{</span><span class="st">&#39;Sharpe&#39;</span><span class="sc">:&gt;9}</span><span class="ss">&quot;</span>)</span>
<span id="cb7-196"><a href="#cb7-196" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(<span class="st">&quot;-&quot;</span> <span class="op">*</span> <span class="dv">88</span>)</span>
<span id="cb7-197"><a href="#cb7-197" aria-hidden="true" tabindex="-1"></a> <span class="cf">for</span> name, w <span class="kw">in</span> [(<span class="st">&quot;Global Minimum Variance&quot;</span>, w_gmv),</span>
<span id="cb7-198"><a href="#cb7-198" aria-hidden="true" tabindex="-1"></a> (<span class="st">&quot;Maximum Sharpe Ratio&quot;</span>, w_sharpe),</span>
<span id="cb7-199"><a href="#cb7-199" aria-hidden="true" tabindex="-1"></a> (<span class="st">&quot;Gleichgewichtung (1/N)&quot;</span>, w_gleich)]:</span>
<span id="cb7-200"><a href="#cb7-200" aria-hidden="true" tabindex="-1"></a> r, v, sr <span class="op">=</span> kennzahlen(w, mu, sigma, RISIKOFREI)</span>
<span id="cb7-201"><a href="#cb7-201" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(<span class="ss">f&quot;</span><span class="sc">{</span>name<span class="sc">:&lt;26}</span><span class="ss"> </span><span class="sc">{</span>r<span class="op">*</span><span class="dv">100</span><span class="sc">:&gt;9.2f}</span><span class="ss"> % </span><span class="sc">{</span>v<span class="op">*</span><span class="dv">100</span><span class="sc">:&gt;12.2f}</span><span class="ss"> % </span><span class="sc">{</span>sr<span class="sc">:&gt;9.2f}</span><span class="ss">&quot;</span>)</span>
<span id="cb7-202"><a href="#cb7-202" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-203"><a href="#cb7-203" aria-hidden="true" tabindex="-1"></a> <span class="co"># --- Gewichte je Titel ------------------------------------------------</span></span>
<span id="cb7-204"><a href="#cb7-204" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(<span class="st">&quot;</span><span class="ch">\n</span><span class="st">--- Optimierte Portfoliogewichte ---&quot;</span>)</span>
<span id="cb7-205"><a href="#cb7-205" aria-hidden="true" tabindex="-1"></a> sektor_je_titel <span class="op">=</span> {t: s <span class="cf">for</span> s, titel <span class="kw">in</span> SEKTOREN.items() <span class="cf">for</span> t <span class="kw">in</span> titel}</span>
<span id="cb7-206"><a href="#cb7-206" aria-hidden="true" tabindex="-1"></a> tabelle <span class="op">=</span> pd.DataFrame({</span>
<span id="cb7-207"><a href="#cb7-207" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;Ticker&quot;</span>: TICKER,</span>
<span id="cb7-208"><a href="#cb7-208" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;Sektor&quot;</span>: [sektor_je_titel[t] <span class="cf">for</span> t <span class="kw">in</span> TICKER],</span>
<span id="cb7-209"><a href="#cb7-209" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;Rendite p.a.&quot;</span>: [<span class="ss">f&quot;</span><span class="sc">{</span>r<span class="op">*</span><span class="dv">100</span><span class="sc">:+6.1f}</span><span class="ss"> %&quot;</span> <span class="cf">for</span> r <span class="kw">in</span> mu],</span>
<span id="cb7-210"><a href="#cb7-210" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;Vola p.a.&quot;</span>: [<span class="ss">f&quot;</span><span class="sc">{</span>np<span class="sc">.</span>sqrt(sigma[i, i])<span class="op">*</span><span class="dv">100</span><span class="sc">:5.1f}</span><span class="ss"> %&quot;</span> <span class="cf">for</span> i <span class="kw">in</span> <span class="bu">range</span>(n)],</span>
<span id="cb7-211"><a href="#cb7-211" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;GMV&quot;</span>: [<span class="ss">f&quot;</span><span class="sc">{</span>w<span class="op">*</span><span class="dv">100</span><span class="sc">:5.1f}</span><span class="ss"> %&quot;</span> <span class="cf">for</span> w <span class="kw">in</span> w_gmv],</span>
<span id="cb7-212"><a href="#cb7-212" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;Max Sharpe&quot;</span>: [<span class="ss">f&quot;</span><span class="sc">{</span>w<span class="op">*</span><span class="dv">100</span><span class="sc">:5.1f}</span><span class="ss"> %&quot;</span> <span class="cf">for</span> w <span class="kw">in</span> w_sharpe],</span>
<span id="cb7-213"><a href="#cb7-213" aria-hidden="true" tabindex="-1"></a> })</span>
<span id="cb7-214"><a href="#cb7-214" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(tabelle.to_string(index<span class="op">=</span><span class="va">False</span>))</span>
<span id="cb7-215"><a href="#cb7-215" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-216"><a href="#cb7-216" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(<span class="st">&quot;</span><span class="ch">\n</span><span class="st">--- Sektoraufteilung (Kontrolle) ---&quot;</span>)</span>
<span id="cb7-217"><a href="#cb7-217" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(<span class="ss">f&quot;</span><span class="sc">{</span><span class="st">&#39;Sektor&#39;</span><span class="sc">:&lt;14}</span><span class="ss"> </span><span class="sc">{</span><span class="st">&#39;Grenze&#39;</span><span class="sc">:&gt;8}</span><span class="ss"> </span><span class="sc">{</span><span class="st">&#39;GMV&#39;</span><span class="sc">:&gt;9}</span><span class="ss"> </span><span class="sc">{</span><span class="st">&#39;Max Sharpe&#39;</span><span class="sc">:&gt;12}</span><span class="ss">&quot;</span>)</span>
<span id="cb7-218"><a href="#cb7-218" aria-hidden="true" tabindex="-1"></a> <span class="cf">for</span> sektor, positionen <span class="kw">in</span> sektor_indizes().items():</span>
<span id="cb7-219"><a href="#cb7-219" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(<span class="ss">f&quot;</span><span class="sc">{</span>sektor<span class="sc">:&lt;14}</span><span class="ss"> </span><span class="sc">{</span>SEKTORGRENZEN[sektor]<span class="op">*</span><span class="dv">100</span><span class="sc">:&gt;7.0f}</span><span class="ss"> % &quot;</span></span>
<span id="cb7-220"><a href="#cb7-220" aria-hidden="true" tabindex="-1"></a> <span class="ss">f&quot;</span><span class="sc">{</span>w_gmv[positionen]<span class="sc">.</span><span class="bu">sum</span>()<span class="op">*</span><span class="dv">100</span><span class="sc">:&gt;8.1f}</span><span class="ss"> % &quot;</span></span>
<span id="cb7-221"><a href="#cb7-221" aria-hidden="true" tabindex="-1"></a> <span class="ss">f&quot;</span><span class="sc">{</span>w_sharpe[positionen]<span class="sc">.</span><span class="bu">sum</span>()<span class="op">*</span><span class="dv">100</span><span class="sc">:&gt;11.1f}</span><span class="ss"> %&quot;</span>)</span>
<span id="cb7-222"><a href="#cb7-222" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-223"><a href="#cb7-223" aria-hidden="true" tabindex="-1"></a> <span class="co"># --- Effizienzgrenze --------------------------------------------------</span></span>
<span id="cb7-224"><a href="#cb7-224" aria-hidden="true" tabindex="-1"></a> ret_gmv <span class="op">=</span> <span class="bu">float</span>(mu <span class="op">@</span> w_gmv)</span>
<span id="cb7-225"><a href="#cb7-225" aria-hidden="true" tabindex="-1"></a> ret_max <span class="op">=</span> max_erreichbare_rendite(mu, sigma)</span>
<span id="cb7-226"><a href="#cb7-226" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(<span class="ss">f&quot;</span><span class="ch">\n</span><span class="ss">Effizienzgrenze von </span><span class="sc">{</span>ret_gmv<span class="op">*</span><span class="dv">100</span><span class="sc">:.2f}</span><span class="ss"> % bis </span><span class="sc">{</span>ret_max<span class="op">*</span><span class="dv">100</span><span class="sc">:.2f}</span><span class="ss"> % &quot;</span></span>
<span id="cb7-227"><a href="#cb7-227" aria-hidden="true" tabindex="-1"></a> <span class="ss">f&quot;(unter Restriktionen tatsaechlich erreichbar)&quot;</span>)</span>
<span id="cb7-228"><a href="#cb7-228" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(<span class="ss">f&quot; Zum Vergleich: bester Einzeltitel </span><span class="sc">{</span>mu<span class="sc">.</span><span class="bu">max</span>()<span class="op">*</span><span class="dv">100</span><span class="sc">:.2f}</span><span class="ss"> % - &quot;</span></span>
<span id="cb7-229"><a href="#cb7-229" aria-hidden="true" tabindex="-1"></a> <span class="ss">f&quot;durch die Grenzen nicht erreichbar.&quot;</span>)</span>
<span id="cb7-230"><a href="#cb7-230" aria-hidden="true" tabindex="-1"></a> volas, rets <span class="op">=</span> berechne_frontier(mu, sigma, ret_gmv, ret_max)</span>
<span id="cb7-231"><a href="#cb7-231" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-232"><a href="#cb7-232" aria-hidden="true" tabindex="-1"></a> <span class="co"># --- Diagramm ---------------------------------------------------------</span></span>
<span id="cb7-233"><a href="#cb7-233" aria-hidden="true" tabindex="-1"></a> plt.figure(figsize<span class="op">=</span>(<span class="dv">11</span>, <span class="fl">6.5</span>))</span>
<span id="cb7-234"><a href="#cb7-234" aria-hidden="true" tabindex="-1"></a> plt.plot(volas <span class="op">*</span> <span class="dv">100</span>, rets <span class="op">*</span> <span class="dv">100</span>, <span class="st">&quot;b-&quot;</span>, lw<span class="op">=</span><span class="fl">2.5</span>, label<span class="op">=</span><span class="st">&quot;Effizienzgrenze (restringiert)&quot;</span>)</span>
<span id="cb7-235"><a href="#cb7-235" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-236"><a href="#cb7-236" aria-hidden="true" tabindex="-1"></a> <span class="cf">for</span> w, farbe, marker, groesse, name <span class="kw">in</span> [</span>
<span id="cb7-237"><a href="#cb7-237" aria-hidden="true" tabindex="-1"></a> (w_gmv, <span class="st">&quot;green&quot;</span>, <span class="st">&quot;o&quot;</span>, <span class="dv">150</span>, <span class="st">&quot;GMV&quot;</span>),</span>
<span id="cb7-238"><a href="#cb7-238" aria-hidden="true" tabindex="-1"></a> (w_sharpe, <span class="st">&quot;red&quot;</span>, <span class="st">&quot;*&quot;</span>, <span class="dv">260</span>, <span class="st">&quot;Max Sharpe&quot;</span>),</span>
<span id="cb7-239"><a href="#cb7-239" aria-hidden="true" tabindex="-1"></a> (w_gleich, <span class="st">&quot;purple&quot;</span>, <span class="st">&quot;D&quot;</span>, <span class="dv">110</span>, <span class="st">&quot;Gleichgewichtung&quot;</span>)]:</span>
<span id="cb7-240"><a href="#cb7-240" aria-hidden="true" tabindex="-1"></a> r, v, sr <span class="op">=</span> kennzahlen(w, mu, sigma, RISIKOFREI)</span>
<span id="cb7-241"><a href="#cb7-241" aria-hidden="true" tabindex="-1"></a> plt.scatter([v <span class="op">*</span> <span class="dv">100</span>], [r <span class="op">*</span> <span class="dv">100</span>], color<span class="op">=</span>farbe, marker<span class="op">=</span>marker, s<span class="op">=</span>groesse,</span>
<span id="cb7-242"><a href="#cb7-242" aria-hidden="true" tabindex="-1"></a> zorder<span class="op">=</span><span class="dv">5</span>, label<span class="op">=</span><span class="ss">f&quot;</span><span class="sc">{</span>name<span class="sc">}</span><span class="ss"> (SR=</span><span class="sc">{</span>sr<span class="sc">:.2f}</span><span class="ss">)&quot;</span>)</span>
<span id="cb7-243"><a href="#cb7-243" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-244"><a href="#cb7-244" aria-hidden="true" tabindex="-1"></a> <span class="co"># Kapitalmarktlinie durch den risikofreien Zins und das Tangentialportfolio</span></span>
<span id="cb7-245"><a href="#cb7-245" aria-hidden="true" tabindex="-1"></a> r_s, v_s, _ <span class="op">=</span> kennzahlen(w_sharpe, mu, sigma, RISIKOFREI)</span>
<span id="cb7-246"><a href="#cb7-246" aria-hidden="true" tabindex="-1"></a> x_linie <span class="op">=</span> np.array([<span class="dv">0</span>, v_s <span class="op">*</span> <span class="fl">1.25</span>])</span>
<span id="cb7-247"><a href="#cb7-247" aria-hidden="true" tabindex="-1"></a> plt.plot(x_linie <span class="op">*</span> <span class="dv">100</span>, (RISIKOFREI <span class="op">+</span> (r_s <span class="op">-</span> RISIKOFREI) <span class="op">/</span> v_s <span class="op">*</span> x_linie) <span class="op">*</span> <span class="dv">100</span>,</span>
<span id="cb7-248"><a href="#cb7-248" aria-hidden="true" tabindex="-1"></a> color<span class="op">=</span><span class="st">&quot;orange&quot;</span>, ls<span class="op">=</span><span class="st">&quot;:&quot;</span>, lw<span class="op">=</span><span class="dv">2</span>, label<span class="op">=</span><span class="st">&quot;Kapitalmarktlinie&quot;</span>)</span>
<span id="cb7-249"><a href="#cb7-249" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-250"><a href="#cb7-250" aria-hidden="true" tabindex="-1"></a> <span class="cf">for</span> i, t <span class="kw">in</span> <span class="bu">enumerate</span>(TICKER):</span>
<span id="cb7-251"><a href="#cb7-251" aria-hidden="true" tabindex="-1"></a> plt.scatter(np.sqrt(sigma[i, i]) <span class="op">*</span> <span class="dv">100</span>, mu[i] <span class="op">*</span> <span class="dv">100</span>, color<span class="op">=</span><span class="st">&quot;gray&quot;</span>, alpha<span class="op">=</span><span class="fl">0.5</span>, s<span class="op">=</span><span class="dv">40</span>)</span>
<span id="cb7-252"><a href="#cb7-252" aria-hidden="true" tabindex="-1"></a> plt.annotate(t, (np.sqrt(sigma[i, i]) <span class="op">*</span> <span class="dv">100</span> <span class="op">+</span> <span class="fl">0.4</span>, mu[i] <span class="op">*</span> <span class="dv">100</span>), fontsize<span class="op">=</span><span class="dv">8</span>)</span>
<span id="cb7-253"><a href="#cb7-253" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-254"><a href="#cb7-254" aria-hidden="true" tabindex="-1"></a> plt.title(<span class="st">&quot;Markowitz-Effizienzgrenze mit Sektor- und Positionsgrenzen&quot;</span>, fontsize<span class="op">=</span><span class="dv">12</span>)</span>
<span id="cb7-255"><a href="#cb7-255" aria-hidden="true" tabindex="-1"></a> plt.xlabel(<span class="st">&quot;Annualisierte Volatilitaet [%]&quot;</span>)</span>
<span id="cb7-256"><a href="#cb7-256" aria-hidden="true" tabindex="-1"></a> plt.ylabel(<span class="st">&quot;Annualisierte erwartete Rendite [%]&quot;</span>)</span>
<span id="cb7-257"><a href="#cb7-257" aria-hidden="true" tabindex="-1"></a> plt.grid(<span class="va">True</span>, linestyle<span class="op">=</span><span class="st">&quot;:&quot;</span>, alpha<span class="op">=</span><span class="fl">0.6</span>)</span>
<span id="cb7-258"><a href="#cb7-258" aria-hidden="true" tabindex="-1"></a> plt.legend(loc<span class="op">=</span><span class="st">&quot;best&quot;</span>)</span>
<span id="cb7-259"><a href="#cb7-259" aria-hidden="true" tabindex="-1"></a> plt.tight_layout()</span>
<span id="cb7-260"><a href="#cb7-260" aria-hidden="true" tabindex="-1"></a> ziel <span class="op">=</span> os.path.join(OUTPUT_DIR, <span class="st">&quot;markowitz_efficient_frontier.png&quot;</span>)</span>
<span id="cb7-261"><a href="#cb7-261" aria-hidden="true" tabindex="-1"></a> plt.savefig(ziel, dpi<span class="op">=</span><span class="dv">150</span>)</span>
<span id="cb7-262"><a href="#cb7-262" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(<span class="ss">f&quot;</span><span class="ch">\n</span><span class="ss">Diagramm gespeichert unter &#39;</span><span class="sc">{</span>ziel<span class="sc">}</span><span class="ss">&#39;&quot;</span>)</span>
<span id="cb7-263"><a href="#cb7-263" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(<span class="st">&quot;=&quot;</span> <span class="op">*</span> <span class="dv">88</span>)</span></code></pre></div>
<blockquote>
<p><strong>💻 Code-Durchgang: vier typische Fehlerquellen und ihre Absicherung</strong></p>
<table>
<colgroup>
<col style="width: 33%" />
<col style="width: 33%" />
<col style="width: 33%" />
</colgroup>
<thead>
<tr class="header">
<th>Stelle</th>
<th>Naiver Ansatz</th>
<th>Robuster Ansatz (hier verwendet)</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td><code>roh["Close"][TICKER]</code></td>
<td><code>roh["Close"]</code> — alphabetisch</td>
<td>Reihenfolge erzwungen + <code>assert</code></td>
</tr>
<tr class="even">
<td><code>SEKTOREN</code> als Namensdict</td>
<td><code>tech_indices = [0,1,2,3]</code></td>
<td>Namen, mit Existenzprüfung</td>
</tr>
<tr class="odd">
<td><code>basis_restriktionen(y, skala=kappa)</code></td>
<td>Grenzen von Hand mitskaliert</td>
<td>zentral, dadurch nicht vergessbar</td>
</tr>
<tr class="even">
<td><code>max_erreichbare_rendite()</code></td>
<td><code>max(mu)*0.95</code> geraten</td>
<td>tatsächliche Grenze berechnet</td>
</tr>
</tbody>
</table>
<p><strong>Zur letzten Zeile:</strong> Unter der 20-%-Positionsgrenze kann kein Portfolio die Rendite des besten Einzeltitels erreichen — man muss mindestens fünf Titel halten. Würde man die Obergrenze der Effizienzgrenze dennoch bei <span class="math inline">0{,}95 \cdot \max(\mu)</span> ansetzen, würden die unerreichbaren Zielrenditen vom <code>if status == "optimal"</code> <strong>stillschweigend übersprungen</strong> — die gezeichnete Kurve bräche dadurch früher ab, ohne dass es auffiele.</p>
</blockquote>
<blockquote>
<p><strong>⚠️ Zur Reproduzierbarkeit</strong> Dieses Programm lädt Live-Daten. <strong>Ihre Zahlen werden abweichen.</strong> Prüfen Sie stattdessen die <strong>Struktur</strong> des Ergebnisses: Hält die Sektorgrenze? Summieren sich die Gewichte auf 100 %? Liegt die Sharpe Ratio des Max-Sharpe-Portfolios über der des GMV? Genau dafür sind die <code>assert</code>-Prüfungen da.</p>
</blockquote>
<blockquote>
<p><strong>🎯 Der Realitätscheck: Gleichgewichtung</strong> Das Programm vergleicht immer mit dem <strong>1/N-Portfolio</strong>. Das ist kein Scherz: DeMiguel, Garlappi und Uppal zeigten 2009 in einer viel beachteten Studie, dass die naive Gleichgewichtung viele optimierte Strategien out of sample schlägt — weil sie keinerlei Schätzung benötigt und damit auch keinen Schätzfehler enthält. <strong>Wenn Ihre Optimierung 1/N nicht schlägt, ist sie ihren Aufwand nicht wert.</strong> Diese Messlatte sollte in jedem Portfolioprojekt stehen.</p>
</blockquote>
<hr />
<h2 id="sec:markowitz-uebungsaufgaben">19.7 Übungsaufgaben</h2>
<blockquote>
<p>Lösungen: <a href="anhang-loesungen.html#sec:loesungen-markowitz">Abschnitt A.19</a>.</p>
</blockquote>
<p><strong>Aufgabe 19.1 ⭐ — Diversifikationseffekt rechnen.</strong> Zwei Titel: <span class="math inline">\mu_1 = 10\,\%</span>, <span class="math inline">\sigma_1 = 25\,\%</span>; <span class="math inline">\mu_2 = 6\,\%</span>, <span class="math inline">\sigma_2 = 12\,\%</span>; <span class="math inline">\rho = -0{,}2</span>. Berechnen Sie Rendite und Volatilität für die Gewichtungen <span class="math inline">(1;0)</span>, <span class="math inline">(0{,}5;0{,}5)</span>, <span class="math inline">(0{,}3;0{,}7)</span> und <span class="math inline">(0;1)</span>. Welche Kombination hat die beste Sharpe Ratio bei <span class="math inline">r_f = 2\,\%</span>?</p>
<p><strong>Aufgabe 19.2 ⭐ — Lambda deuten.</strong> Was passiert mit dem optimalen Portfolio, wenn <span class="math inline">\lambda</span> von 0 auf <span class="math inline">\infty</span> steigt? Skizzieren Sie den Weg auf der Effizienzgrenze.</p>
<p><strong>Aufgabe 19.3 ⭐⭐ — Korn-Transformation nachvollziehen.</strong> Zeigen Sie rechnerisch, dass die Sharpe Ratio invariant gegenüber positiver Skalierung ist: <span class="math inline">\text{SR}(c\,\mathbf{w}) = \text{SR}(\mathbf{w})</span> für <span class="math inline">c &gt; 0</span>. Warum gilt das <strong>nicht</strong>, wenn die Nebenbedingung <span class="math inline">\sum w_i = 1</span> mitgeführt wird — und wie löst die Transformation dieses Problem?</p>
<p><strong>Aufgabe 19.4 ⭐⭐ — Restriktionen kosten Rendite.</strong> Lassen Sie <code>Markowitz_CVXPY.py</code> mit <code>MAX_GEWICHT</code> von 1,0 (keine Grenze) bis 0,10 in Schritten von 0,05 laufen. Tabellieren Sie Sharpe Ratio und maximal erreichbare Rendite. (a) Was kostet die 20-%-Grenze an Sharpe Ratio? (b) Ab welcher Grenze wird das Problem unlösbar? Warum?</p>
<p><strong>Aufgabe 19.5 ⭐⭐ — Den Sektorfehler nachstellen.</strong> Bauen Sie den Fehler bewusst nach: Verwenden Sie <code>tech_indices = [0,1,2,3]</code> auf den alphabetisch sortierten Spalten. Vergleichen Sie das Ergebnis mit der korrekten Version. (a) Welche Titel werden tatsächlich beschränkt? (b) Wie stark unterscheiden sich die Portfoliogewichte? (c) Fällt der Fehler in den ausgegebenen Kennzahlen auf?</p>
<p><strong>Aufgabe 19.6 ⭐⭐⭐ — Kardinalität ergänzen.</strong> Erweitern Sie das Modell um „höchstens <span class="math inline">K = 5</span> Titel“ mit Binärvariablen. CVXPY braucht dafür <code>cp.Variable(n, boolean=True)</code> und einen MIQP-fähigen Solver (z. B. <code>SCIP</code> über <code>cp.SCIP</code> oder <code>ECOS_BB</code>). Vergleichen Sie Sharpe Ratio und Rechenzeit mit dem unbeschränkten Fall.</p>
<p><strong>Aufgabe 19.7 ⭐⭐⭐ — Out-of-Sample-Test.</strong> Teilen Sie die Historie in zwei Hälften. Optimieren Sie auf der ersten, bewerten Sie auf der zweiten. Vergleichen Sie GMV, Max Sharpe und 1/N. (a) Welches Portfolio gewinnt out of sample? (b) Wie ändert sich das Bild mit Ledoit-Wolf gegenüber der Stichprobenkovarianz? (c) Welche Schlussfolgerung ziehen Sie für die Praxis?</p>
<hr />
<h2 id="sec:markowitz-denkfehler">19.8 Finde den Denkfehler</h2>
<p><a href="finanzdaten.html#kap-finanzdaten">Kapitel 18</a> hat gezeigt, was eine schlecht geschätzte <strong>Kovarianzmatrix</strong> anrichtet. Bei den erwarteten <strong>Renditen</strong> ist es schlimmer — und weil sie in der Zielfunktion stehen statt in der Nebenbedingung, fällt es schwerer auf.</p>
<div class="card card-denkfehler">
<blockquote>
<p><strong>🐛 Finde den Denkfehler 12.1: Zwölf gleiche Anlagen, ein sehr ungleiches Portfolio</strong></p>
<p>Ein Analyst optimiert ein Portfolio aus zwölf Anlagen. Erwartete Renditen und Kovarianzen schätzt er aus einem Jahr Tagesdaten — 250 Beobachtungen, in der Praxis durchaus üblich.</p>
<p>Zur Kontrolle bauen wir das Experiment so, dass die richtige Antwort <strong>feststeht</strong>: Alle zwölf Anlagen haben in Wahrheit exakt dieselbe Rendite (0,0400 % täglich) und dieselbe Schwankung, und sie sind unabhängig. Ein korrektes Verfahren müsste also gleichgewichten.</p>
<p>Der Optimierer legt stattdessen im Mittel <strong>38 %</strong> in eine einzige Anlage — und meldet für das Portfolio eine Tagesrendite von <strong>0,1261 %</strong>, mehr als das Dreifache dessen, was überhaupt erzielbar ist.</p>
<p><strong>Ihre Aufgabe:</strong> (a) Woher kommt die Spanne von 0,24 Prozentpunkten zwischen der höchsten und der niedrigsten geschätzten Rendite, wenn doch alle Anlagen identisch sind? (b) Rechnen Sie nach, wie viele Beobachtungen nötig wären, um eine Rendite von 0,04 % bei 1,2 % Tagesschwankung überhaupt von null zu unterscheiden. (c) Warum wirkt sich derselbe Schätzfehler bei Renditen stärker aus als bei Kovarianzen? (d) Nennen Sie drei Gegenmittel — und begründen Sie, warum das erste davon das wirksamste ist.</p>
<p><em>Auflösung: <a href="anhang-loesungen.html#sec:loesungen-markowitz">Abschnitt A.19</a>.</em></p>
</blockquote>
</div>
<div class="sourceCode" id="cb8"><pre class="sourceCode python"><code class="sourceCode python"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true" tabindex="-1"></a><span class="co">#!/usr/bin/env python3</span></span>
<span id="cb8-2"><a href="#cb8-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb8-3"><a href="#cb8-3" aria-hidden="true" tabindex="-1"></a><span class="co"># Renditeschaetzung_Falle.py</span></span>
<span id="cb8-4"><a href="#cb8-4" aria-hidden="true" tabindex="-1"></a><span class="co">&quot;&quot;&quot;</span></span>
<span id="cb8-5"><a href="#cb8-5" aria-hidden="true" tabindex="-1"></a><span class="co">Kapitel Markowitz: Warum geschaetzte Renditen noch gefaehrlicher sind als geschaetzte</span></span>
<span id="cb8-6"><a href="#cb8-6" aria-hidden="true" tabindex="-1"></a><span class="co">Kovarianzen.</span></span>
<span id="cb8-7"><a href="#cb8-7" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb8-8"><a href="#cb8-8" aria-hidden="true" tabindex="-1"></a><span class="co">Das Kapitel Finanzdaten hat gezeigt, was eine schlecht geschaetzte Kovarianzmatrix</span></span>
<span id="cb8-9"><a href="#cb8-9" aria-hidden="true" tabindex="-1"></a><span class="co">anrichtet. Bei den erwarteten RENDITEN ist es schlimmer - aus einem einfachen</span></span>
<span id="cb8-10"><a href="#cb8-10" aria-hidden="true" tabindex="-1"></a><span class="co">statistischen Grund: Um eine Rendite von 0,04 % pro Tag von null zu</span></span>
<span id="cb8-11"><a href="#cb8-11" aria-hidden="true" tabindex="-1"></a><span class="co">unterscheiden, braucht man bei 1,2 % Tagesschwankung ueber tausend</span></span>
<span id="cb8-12"><a href="#cb8-12" aria-hidden="true" tabindex="-1"></a><span class="co">Beobachtungen. Kovarianzen konvergieren dagegen deutlich schneller.</span></span>
<span id="cb8-13"><a href="#cb8-13" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb8-14"><a href="#cb8-14" aria-hidden="true" tabindex="-1"></a><span class="co">Das Experiment ist bewusst so gebaut, dass die Antwort feststeht: ALLE zwoelf</span></span>
<span id="cb8-15"><a href="#cb8-15" aria-hidden="true" tabindex="-1"></a><span class="co">Anlagen haben exakt dieselbe wahre Rendite und dieselbe Schwankung. Ein</span></span>
<span id="cb8-16"><a href="#cb8-16" aria-hidden="true" tabindex="-1"></a><span class="co">korrektes Ergebnis waere also Gleichgewichtung. Was der Optimierer stattdessen</span></span>
<span id="cb8-17"><a href="#cb8-17" aria-hidden="true" tabindex="-1"></a><span class="co">tut, zeigt der Lauf.</span></span>
<span id="cb8-18"><a href="#cb8-18" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb8-19"><a href="#cb8-19" aria-hidden="true" tabindex="-1"></a><span class="co">Wiederholt wird 200 mal, damit das Ergebnis nicht von einer Zufallsstichprobe</span></span>
<span id="cb8-20"><a href="#cb8-20" aria-hidden="true" tabindex="-1"></a><span class="co">abhaengt.</span></span>
<span id="cb8-21"><a href="#cb8-21" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb8-22"><a href="#cb8-22" aria-hidden="true" tabindex="-1"></a><span class="co">Benoetigt: numpy, cvxpy</span></span>
<span id="cb8-23"><a href="#cb8-23" aria-hidden="true" tabindex="-1"></a><span class="co">&quot;&quot;&quot;</span></span>
<span id="cb8-24"><a href="#cb8-24" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb8-25"><a href="#cb8-25" aria-hidden="true" tabindex="-1"></a><span class="im">from</span> __future__ <span class="im">import</span> annotations</span>
<span id="cb8-26"><a href="#cb8-26" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb8-27"><a href="#cb8-27" aria-hidden="true" tabindex="-1"></a><span class="im">import</span> numpy <span class="im">as</span> np</span>
<span id="cb8-28"><a href="#cb8-28" aria-hidden="true" tabindex="-1"></a><span class="im">import</span> cvxpy <span class="im">as</span> cp</span>
<span id="cb8-29"><a href="#cb8-29" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb8-30"><a href="#cb8-30" aria-hidden="true" tabindex="-1"></a>ANZAHL_ANLAGEN <span class="op">=</span> <span class="dv">12</span></span>
<span id="cb8-31"><a href="#cb8-31" aria-hidden="true" tabindex="-1"></a>BEOBACHTUNGEN <span class="op">=</span> <span class="dv">250</span> <span class="co"># ein Jahr Tagesdaten</span></span>
<span id="cb8-32"><a href="#cb8-32" aria-hidden="true" tabindex="-1"></a>BEOBACHTUNGEN_SPAETER <span class="op">=</span> <span class="dv">2000</span> <span class="co"># der &quot;spaetere Verlauf&quot;</span></span>
<span id="cb8-33"><a href="#cb8-33" aria-hidden="true" tabindex="-1"></a>WIEDERHOLUNGEN <span class="op">=</span> <span class="dv">200</span></span>
<span id="cb8-34"><a href="#cb8-34" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb8-35"><a href="#cb8-35" aria-hidden="true" tabindex="-1"></a><span class="co"># Die Wahrheit, die der Optimierer nicht kennt: alle Anlagen sind gleich.</span></span>
<span id="cb8-36"><a href="#cb8-36" aria-hidden="true" tabindex="-1"></a>WAHRE_RENDITE <span class="op">=</span> <span class="fl">0.0004</span> <span class="co"># 0,04 % pro Tag</span></span>
<span id="cb8-37"><a href="#cb8-37" aria-hidden="true" tabindex="-1"></a>WAHRE_SCHWANKUNG <span class="op">=</span> <span class="fl">0.012</span> <span class="co"># 1,2 % pro Tag</span></span>
<span id="cb8-38"><a href="#cb8-38" aria-hidden="true" tabindex="-1"></a>RISIKOAVERSION <span class="op">=</span> <span class="fl">10.0</span></span>
<span id="cb8-39"><a href="#cb8-39" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb8-40"><a href="#cb8-40" aria-hidden="true" tabindex="-1"></a>RNG <span class="op">=</span> np.random.default_rng(<span class="dv">5</span>)</span>
<span id="cb8-41"><a href="#cb8-41" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb8-42"><a href="#cb8-42" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb8-43"><a href="#cb8-43" aria-hidden="true" tabindex="-1"></a><span class="kw">def</span> baue_optimierer() <span class="op">-&gt;</span> <span class="bu">tuple</span>[cp.Problem, cp.Variable, cp.Parameter, cp.Parameter]:</span>
<span id="cb8-44"><a href="#cb8-44" aria-hidden="true" tabindex="-1"></a> <span class="co">&quot;&quot;&quot;Baut das Markowitz-Problem EINMAL mit Parametern.</span></span>
<span id="cb8-45"><a href="#cb8-45" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb8-46"><a href="#cb8-46" aria-hidden="true" tabindex="-1"></a><span class="co"> Bei 200 Wiederholungen ist das der Unterschied zwischen Sekunden und</span></span>
<span id="cb8-47"><a href="#cb8-47" aria-hidden="true" tabindex="-1"></a><span class="co"> Minuten: cp.Parameter erlaubt es, nur die Daten zu tauschen, statt den</span></span>
<span id="cb8-48"><a href="#cb8-48" aria-hidden="true" tabindex="-1"></a><span class="co"> Ausdrucksbaum jedes Mal neu zu kompilieren (siehe Kapitel Oekosystem).</span></span>
<span id="cb8-49"><a href="#cb8-49" aria-hidden="true" tabindex="-1"></a><span class="co"> &quot;&quot;&quot;</span></span>
<span id="cb8-50"><a href="#cb8-50" aria-hidden="true" tabindex="-1"></a> gewichte <span class="op">=</span> cp.Variable(ANZAHL_ANLAGEN, nonneg<span class="op">=</span><span class="va">True</span>)</span>
<span id="cb8-51"><a href="#cb8-51" aria-hidden="true" tabindex="-1"></a> renditen <span class="op">=</span> cp.Parameter(ANZAHL_ANLAGEN)</span>
<span id="cb8-52"><a href="#cb8-52" aria-hidden="true" tabindex="-1"></a> kovarianz <span class="op">=</span> cp.Parameter((ANZAHL_ANLAGEN, ANZAHL_ANLAGEN), PSD<span class="op">=</span><span class="va">True</span>)</span>
<span id="cb8-53"><a href="#cb8-53" aria-hidden="true" tabindex="-1"></a> problem <span class="op">=</span> cp.Problem(</span>
<span id="cb8-54"><a href="#cb8-54" aria-hidden="true" tabindex="-1"></a> cp.Maximize(renditen <span class="op">@</span> gewichte</span>
<span id="cb8-55"><a href="#cb8-55" aria-hidden="true" tabindex="-1"></a> <span class="op">-</span> RISIKOAVERSION <span class="op">*</span> cp.quad_form(gewichte, kovarianz)),</span>
<span id="cb8-56"><a href="#cb8-56" aria-hidden="true" tabindex="-1"></a> [cp.<span class="bu">sum</span>(gewichte) <span class="op">==</span> <span class="dv">1</span>])</span>
<span id="cb8-57"><a href="#cb8-57" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> problem, gewichte, renditen, kovarianz</span>
<span id="cb8-58"><a href="#cb8-58" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb8-59"><a href="#cb8-59" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb8-60"><a href="#cb8-60" aria-hidden="true" tabindex="-1"></a><span class="kw">def</span> erzeuge(perioden: <span class="bu">int</span>) <span class="op">-&gt;</span> np.ndarray:</span>
<span id="cb8-61"><a href="#cb8-61" aria-hidden="true" tabindex="-1"></a> <span class="co">&quot;&quot;&quot;Renditen, bei denen alle Anlagen identisch verteilt und unabhaengig sind.&quot;&quot;&quot;</span></span>
<span id="cb8-62"><a href="#cb8-62" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> RNG.normal(WAHRE_RENDITE, WAHRE_SCHWANKUNG,</span>
<span id="cb8-63"><a href="#cb8-63" aria-hidden="true" tabindex="-1"></a> (perioden, ANZAHL_ANLAGEN))</span>
<span id="cb8-64"><a href="#cb8-64" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb8-65"><a href="#cb8-65" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb8-66"><a href="#cb8-66" aria-hidden="true" tabindex="-1"></a><span class="cf">if</span> <span class="va">__name__</span> <span class="op">==</span> <span class="st">&quot;__main__&quot;</span>:</span>
<span id="cb8-67"><a href="#cb8-67" aria-hidden="true" tabindex="-1"></a> problem, gewichte, renditen, kovarianz <span class="op">=</span> baue_optimierer()</span>
<span id="cb8-68"><a href="#cb8-68" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb8-69"><a href="#cb8-69" aria-hidden="true" tabindex="-1"></a> im_zeitraum, spaeter, spaeter_gleich <span class="op">=</span> [], [], []</span>
<span id="cb8-70"><a href="#cb8-70" aria-hidden="true" tabindex="-1"></a> groesstes_gewicht, schaetzspanne <span class="op">=</span> [], []</span>
<span id="cb8-71"><a href="#cb8-71" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb8-72"><a href="#cb8-72" aria-hidden="true" tabindex="-1"></a> <span class="cf">for</span> _ <span class="kw">in</span> <span class="bu">range</span>(WIEDERHOLUNGEN):</span>
<span id="cb8-73"><a href="#cb8-73" aria-hidden="true" tabindex="-1"></a> schaetzdaten <span class="op">=</span> erzeuge(BEOBACHTUNGEN)</span>
<span id="cb8-74"><a href="#cb8-74" aria-hidden="true" tabindex="-1"></a> spaetere_daten <span class="op">=</span> erzeuge(BEOBACHTUNGEN_SPAETER)</span>
<span id="cb8-75"><a href="#cb8-75" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb8-76"><a href="#cb8-76" aria-hidden="true" tabindex="-1"></a> geschaetzte_rendite <span class="op">=</span> schaetzdaten.mean(axis<span class="op">=</span><span class="dv">0</span>)</span>
<span id="cb8-77"><a href="#cb8-77" aria-hidden="true" tabindex="-1"></a> geschaetzte_kovarianz <span class="op">=</span> np.cov(schaetzdaten, rowvar<span class="op">=</span><span class="va">False</span>)</span>
<span id="cb8-78"><a href="#cb8-78" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb8-79"><a href="#cb8-79" aria-hidden="true" tabindex="-1"></a> renditen.value <span class="op">=</span> geschaetzte_rendite</span>
<span id="cb8-80"><a href="#cb8-80" aria-hidden="true" tabindex="-1"></a> <span class="co"># Symmetrisieren und minimal anheben: numerisches Rauschen kann die</span></span>
<span id="cb8-81"><a href="#cb8-81" aria-hidden="true" tabindex="-1"></a> <span class="co"># Matrix sonst knapp unter die PSD-Grenze druecken (Kapitel Fundament).</span></span>
<span id="cb8-82"><a href="#cb8-82" aria-hidden="true" tabindex="-1"></a> kovarianz.value <span class="op">=</span> ((geschaetzte_kovarianz <span class="op">+</span> geschaetzte_kovarianz.T) <span class="op">/</span> <span class="dv">2</span></span>
<span id="cb8-83"><a href="#cb8-83" aria-hidden="true" tabindex="-1"></a> <span class="op">+</span> <span class="fl">1e-10</span> <span class="op">*</span> np.eye(ANZAHL_ANLAGEN))</span>
<span id="cb8-84"><a href="#cb8-84" aria-hidden="true" tabindex="-1"></a> problem.solve()</span>
<span id="cb8-85"><a href="#cb8-85" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb8-86"><a href="#cb8-86" aria-hidden="true" tabindex="-1"></a> w <span class="op">=</span> np.array(gewichte.value).ravel()</span>
<span id="cb8-87"><a href="#cb8-87" aria-hidden="true" tabindex="-1"></a> im_zeitraum.append(<span class="bu">float</span>((schaetzdaten <span class="op">@</span> w).mean()))</span>
<span id="cb8-88"><a href="#cb8-88" aria-hidden="true" tabindex="-1"></a> spaeter.append(<span class="bu">float</span>((spaetere_daten <span class="op">@</span> w).mean()))</span>
<span id="cb8-89"><a href="#cb8-89" aria-hidden="true" tabindex="-1"></a> spaeter_gleich.append(<span class="bu">float</span>(spaetere_daten.mean()))</span>
<span id="cb8-90"><a href="#cb8-90" aria-hidden="true" tabindex="-1"></a> groesstes_gewicht.append(<span class="bu">float</span>(w.<span class="bu">max</span>()))</span>
<span id="cb8-91"><a href="#cb8-91" aria-hidden="true" tabindex="-1"></a> schaetzspanne.append(<span class="bu">float</span>(geschaetzte_rendite.<span class="bu">max</span>()</span>
<span id="cb8-92"><a href="#cb8-92" aria-hidden="true" tabindex="-1"></a> <span class="op">-</span> geschaetzte_rendite.<span class="bu">min</span>()))</span>
<span id="cb8-93"><a href="#cb8-93" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb8-94"><a href="#cb8-94" aria-hidden="true" tabindex="-1"></a> prozent <span class="op">=</span> <span class="kw">lambda</span> werte: <span class="bu">float</span>(np.mean(werte)) <span class="op">*</span> <span class="dv">100</span></span>
<span id="cb8-95"><a href="#cb8-95" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb8-96"><a href="#cb8-96" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(<span class="st">&quot;=&quot;</span> <span class="op">*</span> <span class="dv">78</span>)</span>
<span id="cb8-97"><a href="#cb8-97" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(<span class="st">&quot; WENN DER OPTIMIERER GESCHAETZTE RENDITEN GLAUBT&quot;</span>)</span>
<span id="cb8-98"><a href="#cb8-98" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(<span class="st">&quot;=&quot;</span> <span class="op">*</span> <span class="dv">78</span>)</span>
<span id="cb8-99"><a href="#cb8-99" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(<span class="ss">f&quot;</span><span class="sc">{</span>ANZAHL_ANLAGEN<span class="sc">}</span><span class="ss"> Anlagen, </span><span class="sc">{</span>WIEDERHOLUNGEN<span class="sc">}</span><span class="ss"> Wiederholungen, &quot;</span></span>
<span id="cb8-100"><a href="#cb8-100" aria-hidden="true" tabindex="-1"></a> <span class="ss">f&quot;je </span><span class="sc">{</span>BEOBACHTUNGEN<span class="sc">}</span><span class="ss"> Beobachtungen zur Schaetzung.&quot;</span>)</span>
<span id="cb8-101"><a href="#cb8-101" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(<span class="ss">f&quot;In Wahrheit haben ALLE dieselbe Tagesrendite von &quot;</span></span>
<span id="cb8-102"><a href="#cb8-102" aria-hidden="true" tabindex="-1"></a> <span class="ss">f&quot;</span><span class="sc">{</span>WAHRE_RENDITE <span class="op">*</span> <span class="dv">100</span><span class="sc">:.4f}</span><span class="ss"> % und dieselbe Schwankung.&quot;</span>)</span>
<span id="cb8-103"><a href="#cb8-103" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(<span class="st">&quot;Die richtige Antwort waere also: gleichgewichten.&quot;</span>)</span>
<span id="cb8-104"><a href="#cb8-104" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>()</span>
<span id="cb8-105"><a href="#cb8-105" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(<span class="ss">f&quot;Mittlere Spanne der geschaetzten Renditen: &quot;</span></span>
<span id="cb8-106"><a href="#cb8-106" aria-hidden="true" tabindex="-1"></a> <span class="ss">f&quot;</span><span class="sc">{</span>prozent(schaetzspanne)<span class="sc">:.4f}</span><span class="ss"> Prozentpunkte&quot;</span>)</span>
<span id="cb8-107"><a href="#cb8-107" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(<span class="ss">f&quot; -&gt; Das ist das </span><span class="sc">{</span>prozent(schaetzspanne) <span class="op">/</span> (WAHRE_RENDITE <span class="op">*</span> <span class="dv">100</span>)<span class="sc">:.1f}</span><span class="ss">-Fache &quot;</span></span>
<span id="cb8-108"><a href="#cb8-108" aria-hidden="true" tabindex="-1"></a> <span class="ss">f&quot;des wahren Werts. Aus reinem Rauschen.&quot;</span>)</span>
<span id="cb8-109"><a href="#cb8-109" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(<span class="ss">f&quot;Mittleres groesstes Einzelgewicht: &quot;</span></span>
<span id="cb8-110"><a href="#cb8-110" aria-hidden="true" tabindex="-1"></a> <span class="ss">f&quot;</span><span class="sc">{</span>prozent(groesstes_gewicht)<span class="sc">:.1f}</span><span class="ss"> % &quot;</span></span>
<span id="cb8-111"><a href="#cb8-111" aria-hidden="true" tabindex="-1"></a> <span class="ss">f&quot;(bei Gleichgewichtung waeren es </span><span class="sc">{</span><span class="dv">100</span> <span class="op">/</span> ANZAHL_ANLAGEN<span class="sc">:.1f}</span><span class="ss"> %)&quot;</span>)</span>
<span id="cb8-112"><a href="#cb8-112" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>()</span>
<span id="cb8-113"><a href="#cb8-113" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(<span class="ss">f&quot;</span><span class="sc">{</span><span class="st">&#39;&#39;</span><span class="sc">:&lt;38}</span><span class="ss"> </span><span class="sc">{</span><span class="st">&#39;Tagesrendite&#39;</span><span class="sc">:&gt;14}</span><span class="ss">&quot;</span>)</span>
<span id="cb8-114"><a href="#cb8-114" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(<span class="st">&quot;-&quot;</span> <span class="op">*</span> <span class="dv">78</span>)</span>
<span id="cb8-115"><a href="#cb8-115" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(<span class="ss">f&quot;</span><span class="sc">{</span><span class="st">&#39;Wahrheit (alle Anlagen)&#39;</span><span class="sc">:&lt;38}</span><span class="ss"> </span><span class="sc">{</span>WAHRE_RENDITE <span class="op">*</span> <span class="dv">100</span><span class="sc">:&gt;13.4f}</span><span class="ss"> %&quot;</span>)</span>
<span id="cb8-116"><a href="#cb8-116" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(<span class="ss">f&quot;</span><span class="sc">{</span><span class="st">&#39;Optimierer IM Schaetzzeitraum&#39;</span><span class="sc">:&lt;38}</span><span class="ss"> </span><span class="sc">{</span>prozent(im_zeitraum)<span class="sc">:&gt;13.4f}</span><span class="ss"> %&quot;</span></span>
<span id="cb8-117"><a href="#cb8-117" aria-hidden="true" tabindex="-1"></a> <span class="ss">f&quot; &lt;- Illusion&quot;</span>)</span>
<span id="cb8-118"><a href="#cb8-118" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(<span class="ss">f&quot;</span><span class="sc">{</span><span class="st">&#39;Optimierer AUSSERHALB&#39;</span><span class="sc">:&lt;38}</span><span class="ss"> </span><span class="sc">{</span>prozent(spaeter)<span class="sc">:&gt;13.4f}</span><span class="ss"> %&quot;</span>)</span>
<span id="cb8-119"><a href="#cb8-119" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(<span class="ss">f&quot;</span><span class="sc">{</span><span class="st">&#39;Gleichgewichtung AUSSERHALB&#39;</span><span class="sc">:&lt;38}</span><span class="ss"> </span><span class="sc">{</span>prozent(spaeter_gleich)<span class="sc">:&gt;13.4f}</span><span class="ss"> %&quot;</span>)</span>
<span id="cb8-120"><a href="#cb8-120" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(<span class="st">&quot;-&quot;</span> <span class="op">*</span> <span class="dv">78</span>)</span>
<span id="cb8-121"><a href="#cb8-121" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb8-122"><a href="#cb8-122" aria-hidden="true" tabindex="-1"></a> faktor <span class="op">=</span> prozent(im_zeitraum) <span class="op">/</span> (WAHRE_RENDITE <span class="op">*</span> <span class="dv">100</span>)</span>
<span id="cb8-123"><a href="#cb8-123" aria-hidden="true" tabindex="-1"></a> vorsprung <span class="op">=</span> prozent(spaeter) <span class="op">-</span> prozent(spaeter_gleich)</span>
<span id="cb8-124"><a href="#cb8-124" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(<span class="ss">f&quot;</span><span class="ch">\n</span><span class="ss">Im Schaetzzeitraum verspricht der Optimierer das &quot;</span></span>
<span id="cb8-125"><a href="#cb8-125" aria-hidden="true" tabindex="-1"></a> <span class="ss">f&quot;</span><span class="sc">{</span>faktor<span class="sc">:.1f}</span><span class="ss">-Fache der wahren Rendite.&quot;</span>)</span>
<span id="cb8-126"><a href="#cb8-126" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(<span class="ss">f&quot;Ausserhalb bleibt davon nichts: Er liegt </span><span class="sc">{</span><span class="bu">abs</span>(vorsprung)<span class="sc">:.4f}</span><span class="ss"> &quot;</span></span>
<span id="cb8-127"><a href="#cb8-127" aria-hidden="true" tabindex="-1"></a> <span class="ss">f&quot;Prozentpunkte&quot;</span>)</span>
<span id="cb8-128"><a href="#cb8-128" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(<span class="ss">f&quot;</span><span class="sc">{</span><span class="st">&#39;schlechter&#39;</span> <span class="cf">if</span> vorsprung <span class="op">&lt;</span> <span class="dv">0</span> <span class="cf">else</span> <span class="st">&#39;besser&#39;</span><span class="sc">}</span><span class="ss"> als blosse Gleichgewichtung.&quot;</span>)</span>
<span id="cb8-129"><a href="#cb8-129" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>()</span>
<span id="cb8-130"><a href="#cb8-130" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(<span class="st">&quot;Der Grund ist statistisch, nicht finanzwirtschaftlich: Um eine&quot;</span>)</span>
<span id="cb8-131"><a href="#cb8-131" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(<span class="ss">f&quot;Rendite von </span><span class="sc">{</span>WAHRE_RENDITE<span class="op">*</span><span class="dv">100</span><span class="sc">:.2f}</span><span class="ss"> % taeglich von null zu unterscheiden,&quot;</span>)</span>
<span id="cb8-132"><a href="#cb8-132" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(<span class="ss">f&quot;braucht man bei </span><span class="sc">{</span>WAHRE_SCHWANKUNG<span class="op">*</span><span class="dv">100</span><span class="sc">:.1f}</span><span class="ss"> % Schwankung ueber tausend&quot;</span>)</span>
<span id="cb8-133"><a href="#cb8-133" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(<span class="st">&quot;Beobachtungen. Mit 250 misst man ueberwiegend Rauschen - und der&quot;</span>)</span>
<span id="cb8-134"><a href="#cb8-134" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(<span class="st">&quot;Optimierer nimmt jedes Rauschen fuer bare Muenze.&quot;</span>)</span>
<span id="cb8-135"><a href="#cb8-135" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>()</span>
<span id="cb8-136"><a href="#cb8-136" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(<span class="st">&quot;Drei praktische Konsequenzen:&quot;</span>)</span>
<span id="cb8-137"><a href="#cb8-137" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(<span class="st">&quot; 1. Verzichten Sie auf Renditeschaetzungen, wo es geht. Das&quot;</span>)</span>
<span id="cb8-138"><a href="#cb8-138" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(<span class="st">&quot; Minimum-Varianz-Portfolio braucht gar keine.&quot;</span>)</span>
<span id="cb8-139"><a href="#cb8-139" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(<span class="st">&quot; 2. Wenn Sie welche brauchen: schrumpfen Sie sie stark zur Mitte&quot;</span>)</span>
<span id="cb8-140"><a href="#cb8-140" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(<span class="st">&quot; (James-Stein, Black-Litterman) - viel staerker als Kovarianzen.&quot;</span>)</span>
<span id="cb8-141"><a href="#cb8-141" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(<span class="st">&quot; 3. Begrenzen Sie Einzelgewichte. Was der Optimierer nicht darf,&quot;</span>)</span>
<span id="cb8-142"><a href="#cb8-142" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(<span class="st">&quot; kann er auch nicht auf Rauschen setzen.&quot;</span>)</span>
<span id="cb8-143"><a href="#cb8-143" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(<span class="st">&quot;=&quot;</span> <span class="op">*</span> <span class="dv">78</span>)</span></code></pre></div>
<p><strong>Erwartete Ausgabe:</strong></p>
<pre><code>==============================================================================
WENN DER OPTIMIERER GESCHAETZTE RENDITEN GLAUBT
==============================================================================
12 Anlagen, 200 Wiederholungen, je 250 Beobachtungen zur Schaetzung.
In Wahrheit haben ALLE dieselbe Tagesrendite von 0.0400 % und dieselbe Schwankung.
Die richtige Antwort waere also: gleichgewichten.
Mittlere Spanne der geschaetzten Renditen: 0.2433 Prozentpunkte
-&gt; Das ist das 6.1-Fache des wahren Werts. Aus reinem Rauschen.
Mittleres groesstes Einzelgewicht: 38.0 % (bei Gleichgewichtung waeren es 8.3 %)
Tagesrendite
------------------------------------------------------------------------------
Wahrheit (alle Anlagen) 0.0400 %
Optimierer IM Schaetzzeitraum 0.1261 % &lt;- Illusion
Optimierer AUSSERHALB 0.0390 %
Gleichgewichtung AUSSERHALB 0.0396 %
------------------------------------------------------------------------------
Im Schaetzzeitraum verspricht der Optimierer das 3.2-Fache der wahren Rendite.
Ausserhalb bleibt davon nichts: Er liegt 0.0006 Prozentpunkte
schlechter als blosse Gleichgewichtung.
Der Grund ist statistisch, nicht finanzwirtschaftlich: Um eine
Rendite von 0.04 % taeglich von null zu unterscheiden,
braucht man bei 1.2 % Schwankung ueber tausend
Beobachtungen. Mit 250 misst man ueberwiegend Rauschen - und der
Optimierer nimmt jedes Rauschen fuer bare Muenze.
Drei praktische Konsequenzen:
1. Verzichten Sie auf Renditeschaetzungen, wo es geht. Das
Minimum-Varianz-Portfolio braucht gar keine.
2. Wenn Sie welche brauchen: schrumpfen Sie sie stark zur Mitte
(James-Stein, Black-Litterman) - viel staerker als Kovarianzen.
3. Begrenzen Sie Einzelgewichte. Was der Optimierer nicht darf,
kann er auch nicht auf Rauschen setzen.
==============================================================================</code></pre>
<blockquote>
<p><strong>🎯 Merksatz</strong> Die Effizienzlinie aus dem Kapitelanfang ist mathematisch tadellos — und praktisch nur so viel wert wie die Renditen, die man hineinsteckt. Das <strong>Minimum-Varianz-Portfolio</strong> ist deshalb in der Praxis oft die bessere Wahl als das Maximum-Sharpe-Portfolio: Es braucht überhaupt keine Renditeschätzung, sondern nur die Kovarianzmatrix — und die lässt sich ungleich zuverlässiger schätzen.</p>
</blockquote>
<hr />
<h2 id="sec:markowitz-quiz">19.9 Micro-Quiz</h2>
<div class="card card-quiz">
<blockquote>
<p><strong>❓ Micro-Quiz 12: Drei Fragen zum Selbstcheck</strong></p>
<p>Genau eine Antwort ist jeweils richtig. Auflösung in <a href="anhang-loesungen.html#quiz-loesung-markowitz">Anhang A</a>.</p>
<p><strong>1. Auf der Effizienzlinie liegt das Portfolio mit der höchsten Rendite. Warum ist es trotzdem selten die richtige Wahl?</strong> (a) Weil es rechnerisch instabil ist. (b) Weil es das schlechteste Verhältnis von Rendite zu Risiko hat und zwangsläufig vollständig in die renditestärkste Einzelanlage geht — also gar nicht mehr diversifiziert ist. (c) Weil CVXPY dort keine Lösung mehr findet.</p>
<p><strong>2. Warum ist das Minimum-Varianz-Portfolio in der Praxis oft robuster als das Maximum-Sharpe-Portfolio?</strong> (a) Weil es weniger Nebenbedingungen hat. (b) Weil es <strong>ohne Renditeschätzung</strong> auskommt. Renditen sind die mit Abstand am unzuverlässigsten geschätzte Eingangsgröße; wer sie nicht braucht, umgeht das Problem. (c) Weil es immer die höhere Rendite erzielt.</p>
<p><strong>3. Ihr optimiertes Portfolio legt 44 % in einen einzigen von zwölf Titeln. Was ist Ihre erste Vermutung?</strong> (a) Dieser Titel ist tatsächlich deutlich besser als die anderen. (b) Der Optimierer folgt einem Schätzfehler in den erwarteten Renditen. Prüfen Sie, wie stark die Gewichte auf kleine Datenänderungen reagieren, und begrenzen Sie Einzelpositionen. (c) Die Kovarianzmatrix ist falsch skaliert.</p>
</blockquote>
</div>
<hr />
<h2 id="sec:markowitz-selbsttest">19.10 Selbsttest</h2>
<blockquote>
<p>Antworten: <a href="anhang-loesungen.html#selbsttest-loesung-markowitz">Anhang A</a>.</p>
</blockquote>
<ol type="1">
<li>Warum senkt Diversifikation das Risiko, ohne Rendite zu kosten?</li>
<li>Welches Portfolio erhält man für <span class="math inline">\lambda = 0</span>, und warum braucht es keine Renditeprognose?</li>
<li>Warum ist die Sharpe Ratio nicht konvex, und wie behebt die Korn-Transformation das?</li>
<li>Was muss man bei der Korn-Transformation mit den Nebenbedingungen tun?</li>
<li>Warum ist die Gleichgewichtung ein ernstzunehmender Vergleichsmaßstab?</li>
</ol>
<hr />
<h2 id="sec:markowitz-zusammenfassung">19.11 Zusammenfassung</h2>
<ul>
<li><strong>Diversifikation ist das einzige Gratis-Mittagessen:</strong> Risiko sinkt, Rendite bleibt. Aber: In Krisen steigen Korrelationen, genau wenn man die Streuung braucht.</li>
<li><strong><span class="math inline">\lambda</span> steuert zwischen GMV und Renditemaximierung.</strong> Das GMV benötigt keine Renditeprognose und ist deshalb robuster.</li>
<li><strong>Die Korn-Transformation</strong> macht aus der nicht-konvexen Sharpe-Maximierung ein QP — alle Nebenbedingungen müssen dabei mit <span class="math inline">\kappa</span> mitskaliert werden.</li>
<li><strong>Sektoren immer über Namen definieren</strong>, nie über Positionsindizes.</li>
<li><strong>Die Obergrenze der Effizienzgrenze muss berechnet werden</strong>, nicht geraten — sonst bricht die Kurve stillschweigend ab.</li>
<li><strong>Vergleichen Sie immer mit 1/N.</strong> Wer die naive Gleichgewichtung nicht schlägt, hat Schätzrauschen optimiert.</li>
<li><strong>Renditeschätzungen sind die schwächste Stelle des ganzen Modells.</strong> Der Standardfehler einer Renditeschätzung aus einem Jahr Tagesdaten ist rund doppelt so groß wie der geschätzte Wert selbst; für eine belastbare Schätzung bräuchte man über ein Jahrzehnt. Deshalb ist „keine Renditeschätzung brauchen“ (GMV) wirksamer als jede Verbesserung der Schätzung.</li>
<li><strong>Die Effizienzlinie ist eine Speisekarte, keine Empfehlung.</strong> Welcher Punkt richtig ist, entscheidet die Risikotragfähigkeit — eine unternehmerische, keine mathematische Frage.</li>
</ul>
<p><strong>Ausblick.</strong> <a href="cvar.html#kap-cvar">Kapitel 20</a> ersetzt die Varianz durch ein Risikomaß, das die tatsächlichen Verlustränder erfasst — und fügt Transaktionskosten hinzu.</p>
</article>
<button type="button" class="fortschritt-knopf" data-kapitel="markowitz.html"><svg class="icon" aria-hidden="true"><use href="#icon-check"></use></svg> <span>Als gelesen markieren</span></button>
<nav class="prev-next"><a class="prev-next-knopf prev-next-prev" href="finanzdaten.html"><svg class="icon" aria-hidden="true"><use href="#icon-chevron-left"></use></svg><span><small>Zurück</small>Kapitel 18: Finanzdaten-Modellierung — Renditen, Kovarianz und Shrinkage</span></a><a class="prev-next-knopf prev-next-next" href="cvar.html"><span><small>Weiter</small>Kapitel 20: Tail-Risiko, CVaR und Transaktionskosten</span><svg class="icon" aria-hidden="true"><use href="#icon-chevron-right"></use></svg></a></nav>
</main>
</div>
<footer class="site-footer">
<p>© Dieter Schlüter · <a href="gesamtdokument.html">Gesamtdokument</a> ·
<a href="programme.html">Beispielprogramme</a></p>
</footer>
<script defer src="assets/plotly.min.js"></script>
<script defer src="assets/search-index.js"></script>
<script defer src="assets/programme.js"></script>
<script defer src="assets/site.js"></script>
</body>
</html>