Project 4 Portfolio Optimizer and Risk Report
This tool builds a portfolio with your own optimizer and sums up its risk in a report on one page.
Already bought a plan? Sign in to open this project.
Sign inHow this project is built
The whole project consists of these five steps.
- Inputs from return seriesThe optimizer needs estimates of return, risk and correlation, so these come first, with error bars that show how uncertain they are.
- An optimizer with constraintsYour own solver turns these inputs into the efficient frontier under realistic limits, and the next steps study one portfolio on it.
- Monte Carlo scenarios for the futureMany simulated futures then show what could happen to the money over the years, from typical to bad outcomes.
- Value at risk and expected shortfallTwo numbers then sum up the large losses of the portfolio, under normal and under fat tailed returns.
- The risk reportThe report comes last, because it puts every number of the earlier steps on one page with its assumptions.
After the last step, all five parts run together in one program,
portfolio_tool.py. What the finished tool does
What the finished tool does
You give it a few asset classes with their limits, and it finds the portfolios with the best balance of return and risk. It then simulates the chosen one over ten years and sums up its risk in a report on one page.
What you get
- 01The five steps with their code Each step explains its idea, walks through its code piece by piece and names its limits.
- 02The working tool,
portfolio_tool.pyThe full program in one file, with its settings and experiments to try. - 03Defend it in an interview Typical follow-up questions, each with the reasoning you need to answer it.
- 04Use it with real data Which data the tool needs, how to load it and what to change in the code.