Shaokang's Blog

This is an app provide a easy to use interface to help user organize their spendings/earning and see a summary and guidance by visiting yearly budgeting tool on capitaltwo’s tools page, which will generate those results based on user’s history spending and provide user guidance about their future spending. User is able to provide an importance level to each future spending to guide system which item should be fulfilled at first. System will also intelligently detect user’s past earning and spending and ensure user’s future spending/earning include those fixed monthly/bi-monthly income/expense. Everything is done locally without risk of leaking privacy information. The stage 1 of the app provide a wonderful, easy to use interface and basic functionality, together with cross platform support, including android, ios. More details is in below. Dark and light theme is following user’s system default. This app is done solely by me.

Usage

Select past date for your spent or income, and select the future date for the stuff you planned. Expense and Income in a future date consider as whatever you plan to do or have, in a past date will be considered as whatever you have done. If an expense or income have a high occurence ratio, like exist >50%, future income and expense will be calculated based on this. So, do not add recurring expense or income in a future date as they will be considered as extra income/plan to buy(like wishlist). And the order of expense category will be used to fulfill this wishlist in order.

Categories: Expense is orderable, order is the importancec level, Income are all important

Features

This app is an organization app contains basic functions, such as add, edit, delete, batch deletion, reorder categories, remove empty categories. A short demo:

First demo is to show the basic appearance, including add, delete, reorder in dark theme:

Second demo is to show some appearance in light theme:

Running

Click here for source code.

Click here for an expo runable version.

Download Apk for android

Download for ios

Compile from source

To compile and run locally:

1
2
3
4
5
git clone https://github.com/CapitalTwo/CapitalTwo-Financial.git
cd CapitalTwo-Financial
npm install
expo install
expo start

And use our phone to scan the QR code on screen.

Yearly Budgeting Tool

This Budgeting tools allows you to create a spending plan for your money and see your past spending more interactively, it ensures that you will have enough money for your top priorities which you can assign in the app. Budget plan will also keep you out of debt or help you work your
way out of debt if you currently in debt. Starting by adding some information in the next page.

Methods behind this

User could type their money on each category or item with an importance level associated to it. With those information, we will solve it by using an optimization rules. User could choose either optimizing saving or optimizing consuming (maybe another word at here).

User will have choices to indicate if this is a one time purchase or not, like wishlist. Then we will make a plan to tell user when would be the best time to buy it. And in order to achieve this goal, what they should do in each month.

In this category, we will consider the saved money will be used in some low-risk investment, like 0.036 APR. The report generated would be the item should be bought at that month.

We could support up to 100 level of priority, but priority of 1 is the essential stuff, like housing, foods. Snacks might be in a lower priority.

Optimize saving

This process doesn’t require optimization, thought it could be used to reach this purpose. But it might be as easy as loop through the list and select all components that have a priority level of 1. Sample methods as below:

Optimize consume

Define variables: PijP_{ij} – The amount of money that needs to be spent in different categories i in month j.

LijL_{ij} – The priority level associate with each spending category, PijP_{ij}. It is the reverse of the original list done by user. Like for high priority stuff, LijL_{ij} will be high

IjI_{j} – The anticipated money in in each month.

TjT_j – The money available at the end of month J.

SijS_{ij} – The binary selector to indicate this category should be selected or not in the month j.

A – The one month rate of buying some low-risk investment product.

O – Set including one time purchase, like wait list.

R – Set including repeating purchase.

Formula:

Maxmize iROj12LijSijSubject toinPijSijATj1+IjTj=ATj1inPijSij+IjiOj12Sij=1iRSij=1j{1...12}\begin{aligned} & \text{Maxmize } & \sum_{i}^{R\cup O}\sum_{j}^{12}L_{ij}S_{ij} \\ & \text{Subject to} & \sum_{i}^{n}P_{ij}S_{ij}\le AT_{j-1}+I_j \\ & & T_{j} = AT_{j-1} - \sum_{i}^{n}P_{ij}S_{ij} +I_j \\ & & \sum_{i}^{O}\sum_{j}^{12}S_{ij} = 1 \\ & & \sum_{i}^{R}S_{ij} = 1 \quad \forall j\in \{1...12\} \\ \end{aligned}

Though optimization might give us the optimal solution in complex cases, but it is also acceptable to use normal methods as shown below.

This is the method the website is using, though small modification is made basedd on this description. The website will calculate your history spending and get a expected income and expense in your future spending. But the core part of calculation is this.

Next Stage

By considering non-stable testing, the current version is the stable version and compatible to multiple different platforms. The future version of this app will contains future stuff, such as locally voice interaction to add stuff with local trained Natural language processing. And local trained command to handle nearly all functions this app is able to do.

Stage two is nearly published now, which is a stable and compatible to multiple different platforms version that user is able to add items using chats.

 Comments