/morpheus-portfolio-generator

Sample project for generation and analysis of financial portfolios applying the Modern Portfolio Theory (MPT)

Primary LanguageJavaGNU General Public License v3.0GPL-3.0

Portfolio Analysis in Java GitHub Workflow Status

A Java 15 project for generation and analysis of financial portfolios applying the Modern Portfolio Theory (MPT).

The project uses the ZavTech Morpheus Library to generate random portfolios for groups os assets (stocks) extracted from the Yahoo Finance WebSite using the morpheus-yahoo unofficial API.

The image below shows an example of the graph generated for groups of N random generated portfolios, each group containing a different number of assets.

portfolios analysis by assets group

Credits

This example was based on the code available at the documentation page for the ZavTech Morpheus Library by Xavier Witdouck. It uses a custom version of the Morpheus Yahoo library available here.

The example extracted from the library documentation (aimed to be direct and succinct) was totally refactored and documented, extracting several methods to make it easier to (i) reuse and (ii) understand the code and the data structures.