Skip to content
Tim edited this page Nov 19, 2019 · 1 revision

Python Finance Portfolio Research Wiki


The Big Picture: to eventually build a robust framework to run complex portfolio strategies.

Summary Goal Stages:

  1. Write up the original project with discussion. Done!
  2. Improve the code structure (pretty much rewrite all the code).
  3. Overhaul new code with useful features to increase usability.
  4. Overhaul the backend and work on code efficiency.
  5. Add paint and bells and whistles and finalize usability.
  6. Major release?

Do this all while pushing out notebooks showcasing a variety of equity portfolio strategies and how they are implemented using whatever code I'm working with.

More detailed discussion on stages.

Improving the code and increasing usability

The big thing here is to move away from function only scripts and rely more on classes and methods. While this ought to have been done from the beginning it's never to late to make this vital switch.

Some vital features needed.

  • ability to pull data from a variety of sources (and handle importing as well)
  • ability to change observation frequency
  • ability to change re-balancing frequency
  • ability to test what if at any point in time
  • ability to manually imput (or better yet, import) tickers and portfolio weights of a given portfolio.
  • ability to record results to files (including appropriate dataframe, variables, meta data, etc)

Some vital backend stuff needed:

  • Better handling of pandas datareader (especially Yahoo data reader)
  • Well defined and consistent datetime handling (including ability to smartly recognize different date formats and react accordingly).
  • Performance tracking
  • Speeding up optimization method
  • Simple file structure for code.
Why I'm doing this.

I'm mainly doing this for myself so that I might learn and grow. When I worked on the original project back in graduate school I found this to be the type of work that put all my skills to use and then some. It felt like all my classes had led to this one project. By expanding this project I can keep those skills sharp and hopefully learn along the way. All feedback and/or help is appreciated!