Skip to content

TylerHillery/RePort

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RePort ⚖️

A portfolio rebalancing tool to help investors get their positions back to target weights. Powered by DuckDB & Streamlit.

Streamlit App

RePort

WARNING: This tool is not meant for "production" use. Please use caution if using this tool to rebalance your actual portfolio and verify the orders it recommends before placing them.

Overview

RePort is designed to help investors get their positions back to their target weights. RePort has 3 different types of rebalance methods.

  1. Investable Cash Dynamic

    Investable cash dynamic will only invest the cash you have in your account, meaning it will only create buy orders for underweight positions and no sell orders for overweight positions. This method will proportionally invest money into the positions that are the most underweight. It will also will invest the cash until no more shares can be purchased.

    This rebalance technique was inspired by M1 Finance's Dynamic Rebalancing.

  2. Investable Cash Target

    This method will invest the cash according to the target weight for that security.

  3. Whole Portfolio

    This method will rebalance the entire portfolio by creating sell orders for overweight positions and buy orders for underweight positions.

Configurations

  • Input Method
    • File: Can upload a csv file with holdings. Take a look at the examples on the format expected for the csv files.
    • Manual: Can edit an editable DataFrame similar to an spreadsheet
  • Allow Fractional Shares
    • This will impact the calculations for the rebalance by allowing the ability to purchase fractional shares.
  • Add Sample Data
    • Will delete all current data and load sample data to show how the app can be used.
  • Select Brokerage Platform
    • This impacts the file parser used on the holdings file. Each brokerage platform outputs your positions in different ways. RePort only supports Charles Schwab at this time.
  • Upload Holidngs File
    • Allows the ability to upload a file (typically an export from your brokerage account) of your portfolio positions.
  • Upload Target Weights File
    • Upload the target weights you have for each account. You can look at the example_target_weights.json file to see how to structure the file for your target weights.
  • Add holdings data
    • Check this box after uploading your holdings file and target weights to run the rebalance calculations.

Disclaimer

This app does not store any data. After the streamlit sessions ends your data will be lost. The easiest way to get the data to persist would be to clone this repo and instead of using the :memory: connection you can create a duckdb database file.

The tool is for informational purposes only, you should not construe any such information or other material as legal, tax, investment, financial, or other advice.

Future Work

  • CI/CD
    • Show Streamlit preview in PR
    • Map Volumes for Docker File
  • Tests
  • Connect to brokerage account
  • Clean up database.py to something like DuckPond
  • Add dev container

About

Portfolio rebalancing tool for investors

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published