All Projects â†’ dashed â†’ rebalance-app

dashed / rebalance-app

Licence: GPL-3.0 license
💸 Optimal lazy portfolio rebalancing calculator (in Rust)

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to rebalance-app

FinanceKit
FinanceKit is a Framework for iOS and Mac to build apps working with financial data, like money, currencies, stocks, portfolio, transactions and other concepts.
Stars: ✭ 15 (-59.46%)
Mutual labels:  money, portfolio, stocks
lakshmi
Investing library and command-line interface inspired by the Bogleheads philosophy
Stars: ✭ 107 (+189.19%)
Mutual labels:  portfolio, investing
pr-www
Portfolio Report Website - the data source for Portfolio Performance
Stars: ✭ 50 (+35.14%)
Mutual labels:  portfolio, stocks
AIPortfolio
Use AI to generate a optimized stock portfolio
Stars: ✭ 28 (-24.32%)
Mutual labels:  portfolio, stocks
Stocksera
Web application that provides alternative data to retail investors
Stars: ✭ 426 (+1051.35%)
Mutual labels:  investing, stocks
AutoTrader
A Python-based development platform for automated trading systems - from backtesting to optimisation to livetrading.
Stars: ✭ 227 (+513.51%)
Mutual labels:  investing, stocks
portfolio
A virtual investing portfolio app (aka Kytra)
Stars: ✭ 32 (-13.51%)
Mutual labels:  portfolio, investing
ark invest
daily report of @ARKInvest ETF activity + data collection
Stars: ✭ 25 (-32.43%)
Mutual labels:  investing, stocks
Portfolio
A simple tool to calculate the overall performance of an investment portfolio.
Stars: ✭ 1,326 (+3483.78%)
Mutual labels:  portfolio, stocks
Fast arrow
(no longer maintained) A simple yet robust (stock+options) API client for Robinhood
Stars: ✭ 127 (+243.24%)
Mutual labels:  portfolio, stocks
Python Trading Robot
A trading robot, that can submit basic orders in an automated fashion using the TD API.
Stars: ✭ 235 (+535.14%)
Mutual labels:  portfolio, stocks
Open Crypto Tracker
Bitcoin / Alts private portfolio tracker, with email / text / alexa / telegram price alerts, charts, leverage support and much more.
Stars: ✭ 59 (+59.46%)
Mutual labels:  portfolio, investing
Alphapy
Automated Machine Learning [AutoML] with Python, scikit-learn, Keras, XGBoost, LightGBM, and CatBoost
Stars: ✭ 564 (+1424.32%)
Mutual labels:  portfolio, stocks
bankster
Money Creation Made Easy
Stars: ✭ 30 (-18.92%)
Mutual labels:  money, funds
py-investment
Extensible Algo-Trading Python Package.
Stars: ✭ 19 (-48.65%)
Mutual labels:  money, investing
CryptoTracker
Minimal yet powerful crypto-currency tracker UWP.
Stars: ✭ 50 (+35.14%)
Mutual labels:  portfolio
Portfolio
✨ A simple and responsive portfolio template.
Stars: ✭ 33 (-10.81%)
Mutual labels:  portfolio
Blankly
🚀 💸 Easily build, backtest and deploy your algo in just a few lines of code. Trade stocks, cryptos, and forex across exchanges w/ one package.
Stars: ✭ 1,456 (+3835.14%)
Mutual labels:  stocks
saakshaat.github.io
My personal website.
Stars: ✭ 25 (-32.43%)
Mutual labels:  portfolio
k3yss.github.io
Portfolio
Stars: ✭ 12 (-67.57%)
Mutual labels:  portfolio

rebalance-app

Build Status

Optimal lazy portfolio rebalancing calculator (in Rust)

Usage

$ rebalance-app --help
rebalance-app 1.2.0
Alberto Leal (github.com/dashed) <[email protected]>
Optimal lazy portfolio rebalancing calculator

USAGE:
    rebalance-app [OPTIONS] <contribution> --portfolio <FILE> --targets <FILE>

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -p, --portfolio <FILE>                 Sets a portfolio file
    -i, --portfolio_value_index <INDEX>    Sets CSV index of the portfolio value
    -t, --targets <FILE>                   Sets a targets file

ARGS:
    <contribution>    Sets the contribution amount

Quickstart

  1. Set up targets.csv. Example: example/targets.csv

  2. Set up portfolio.csv. Usually you export this from your favourite broker. Example: example/portfolio.csv

  3. Run: rebalance-app --portfolio example/portfolio.csv --targets example/targets.csv 5000

By default, rebalance-app assumes the values of your assets in your portfolio CSV file is at the 2nd column (i.e. index 1). For example:

Bond fund,                 roi %, ticker symbol, $16500.00
TIPS fund,                 roi %, ticker symbol, $6500.00
Domestic Stock ETF,        roi %, ticker symbol, $43500.00
International Stock ETF,   roi %, ticker symbol, $33500.00

You can adjust this using the -i flag:

rebalance-app -i 3 --portfolio example/portfolio.csv --targets example/targets.csv 5000

About

Rationale: Rather than rebalance your portfolio internally, add/remove money such that your asset targets % are achieved as close as possible.

See this article on rebalancing: https://www.bogleheads.org/wiki/Rebalancing

Based on:

How it works:

Source: http://optimalrebalancing.tk/explanation.html

Step 1: Calculate the fractional deviations

Define the fractional deviation f of an asset to be a/t − 1, where t is the asset's target allocation and a is its actual portion of the portfolio. Calculate f for each asset. f will be negative for underweighted assets and positive for overweighted assets. Note that a denotes the portion relative to the final total portfolio value; this is obtained by adding the contribution amount to the original total portfolio value.

Step 2: Add money to asset(s) with lowest fractional deviation

Add money to the asset(s) with least f until they are tied with the asset(s) with the next-least f. The money added to each asset must be proportional to that asset's target allocation so that the minimum f's increase in synchrony. Repeat this until the contribution amount is exhausted. If the assets are pre-sorted according to f, this process can be implemented such that its running time increases linearly with the number of assets.

Chores

  • cargo fmt

License

GPL-3.0+.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].