The efficient frontier is the set of optimal portfolios that offer the highest expected return for a defined level of risk or the lowest risk for a given level of expected return.
The efficient frontier theory was introduced by Nobel Laureate Harry Markowitz in 1952 and is a cornerstone of modern portfolio theory (MPT).
For more information on the general idea of the model, visit: Efficient Frontier - Investopedia
This particular implementation will take as input a JSON file specifying:
a. Historical data for a portfolio of funds. b. A set of percentage constraints on the maximum investment amount for each fund. c. Selection of optimization mode: volatility, return, custom. d. Target.
For more details on the formatting of each set, see comments on the mockJSON.R file.
The output is a JSON file containing tables on:
a. Selected portfolio. b. Backtesting on some crisis periods (Covid-19, Subprime crisis, etc.). c. Historical performance of the selected portfolio over some time periods (1Y, 5Y, etc.). d. Time series of the selected portfolio over the duration of available data. e. Data for plotting the efficient frontier and the selected portfolio.
The ensemble of modules utilizes the following R packages:
- utils
- methods
- modules
- timeSeries
- timeDate
- fBasics
- fAssets
- fPortfolio