Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Managing Personal Finances using Python

Managing Personal Finances using Python

Siddhant Goel

October 24, 2018
Tweet

More Decks by Siddhant Goel

Other Decks in Programming

Transcript

  1. Big Fat Disclaimers ™ I'm not a nancial advisor Aim

    is to show you the tip of the iceberg Next slide may or may not contain some maths
  2. ; Date format - YYYY-MM-DD option "title" "Mustermann" option "operating_currency"

    "EUR" 2018-10-01 open Assets:DKB 2018-10-01 open Income:BigCorp 2018-10-01 open Expenses:Food 2018-10-01 open Expenses:Rent ; ... ; ... ; ... 2018-10-25 "*" "Überweisung BigCorp" Assets:DKB 3000.00 EUR Income:BigCorp -3000.00 EUR 2018-11-01 "*" "Miete" Assets:DKB -1500.00 EUR Expenses:Rent 1500.00 EUR 2018-11-02 "*" "Essen" Assets:DKB -50.00 EUR Expenses:Food 50.00 EUR 2018-10-26 balance Assets:DKB 3000.00 EUR 2018-11-03 balance Expenses:Food 50.00 EUR
  3. Sample Importer from beancount.core.amount import Amount from beancount.core.number import Number

    from beancount.ingest.importer import ImporterProtocol class SampleImporter(ImporterProtocol): # ... def identify(self, file_): """Check if file_ is from the bank we're supposed to work with """ # ... def extract(self, file_): """Read file_, and emit a list of beancount data structures """
  4. Bean SQL SELECT month, SUM(position) FROM year = 2017 WHERE

    account ~ 'Expenses:Supermarket' GROUP BY month