Git Product home page Git Product logo

asset-allocation-python's People

Contributors

mistery avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

asset-allocation-python's Issues

Difference threshold

allow setting difference threshold (i.e. 20%)
and mark the rows in the output, with difference % larger than this value

Add a CLI interface

Allow a command-line interface (CLI) for easy testing and use.

  • the default action is to display the standard allocation report (this is the main output)
  • Try it on Android.
  • add option to output HTML

Links:

display full aa model, with stock info

In addition to #16, allow displaying stock information for each asset class:

  • name/symbol
  • current value
  • current %, based on value

Indent stock info one level below each class. This is not shown by default but a switch enables it.

manual check

check the values manually:

  • stock value
  • currency calculation
  • ac sum of stock values
  • allocation diff calculation
  • % calculation (set value)

Editing Asset Class from cli

Allow editing asset class from cli.
If modifying Allocation, always recalculate total. It has to be 100%. Provide a Warning if it does not. Exception would block editing while Warning allows the user to modify another record and correct the allocation.

aa edit "id" --allocation "10"

Setting for cash accounts

In order to get the cash asset class amount, there must be a setting that lists the cash accounts to use.
Options:

  • specify all the cash accounts to use
  • specify one, top-level, account to use for cash

The second option should work well, unless there is a specific need to list multiple accounts explicitly.

Option to output HTML

Since the default option is to output ASCII-formatted asset allocation report, a parameter would allow formatting the output as HTML.
Only works with the print (default) option.

--output html

option to identify unallocated holdings

Find holdings that are not part of asset allocation.
These are securities (non-currency) that

  • exist in the book
  • have non-zero balance
  • are not found in the aa mapping table (stock links)

Default Currency

Add the setting for default currency, and perhaps a cli parameter.
The currency is currently hard-coded.

Read prices from external source

As noted in #1, the price database will need to be external. Perhaps another tool, that populates the data?

  • Look into Finance::Quote scripts.
  • GnuCash book has a price database
  • Separate project? (again, shared for Android MMEX and PC)

Run on Android

Try some of the available options on Android, based on the list:

  • Chaquopy. Android Studio plugin. Builds into a native Android app.
  • PyBee
    VOC => transpiles single modules into .class files. Does not convert the project dependencies but only individual python modules. Errors when running. No go.
  • Kivy
  • QPython; can not install SQLAlchemy.
  • PyDroid. Interpreter on Android. Works!
  • Termux <= works! This is the option of choice.

Add command for creation of asset class

Allow creating an asset class record through cli.

  • create asset class with minimum attributes, i.e. name. Others are set to default and can be modified by editing.
  • auto-assign and return id on creation

aa add "asset class name" --parent "id"

Depends on #5.

Allow partial allocation

One stock can belong to multiple asset classes. I.e. a bond fund belongs 60% to international and 40% to domestic bonds.

calculate allocation difference

between allocated % / value and current.
add columns to the output
this is used for threshold (i.e. 20% diff triggers a notification)

Model Validation

Create a method for AA model validation.
It can be called via CLI explicitly. It is also utilized at some key points in the app. The validation errors are not exceptions but are reported to the user so that they can be mitigated.

Especially useful when the partial allocation is implemented as it will ensure that the value of any specific symbol is correctly allocated among asset classes.

Allow manual adjustments to diff amount

From alensiljak/gnucash-portfolio#44.

Allow manual adjustments (buffers) to allocation difference amounts.
This is used when switching allocations but do not want to make an immediate transfer but freeze the amount based on the current prices.
The resulting amount will then depend on the price swings. When allocation is increased by purchasing more stock, the adjustment can be modified.

Create a data store

Create a data store for asset allocation. Use the implementation from MoneyManagerEx for Android for start.

Create a view model for display

Instead of assembling the rows, create a view model that is to be used for display.
The model is a display row, with columns as properties. Simple string values?

Add initial parser

  • Get the parser from GnuCash Portfolio project.
  • load values from GC book
  • load prices from price db

Configuration

Configuration file is required in order not to constantly repeat parameters.

  • create configuration file
  • add logic for reading the configuration values
  • add option for the location of the database, with default value.
  • add option for the location of the Price database.
  • add cli command for editing config value? It is easier to edit it via text editor.
  • add cli command for deleting the current user's file (when run the next time, it will be created automatically)
  • add cli command to set the aa db path

Compare to AA in MMEX

Compare the report to the one in MMEX for Android and identify any discrepancies.
Also compare to GC Portfolio.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.