Code Monkey home page Code Monkey logo

accrual's Introduction

Accrual

Accrual is a bond portfolio analytics tool written in Kotlin.

Features:

  • calculates portfolio statistics (totals, weighted-average yield and maturity)
  • bond distributions by security type, maturity, and credit ratings
  • detailed bond listings by security type, maturity, and credit ratings
  • parses CSV files containing bond data
  • shell CLI with ASCII table output

Setup Locally

Requirements

  • Java 8 or later
  • Maven

Installation

 git clone https://github.com/xiao-vincent/accrual.git
 cd accrual 

Running the Application

Use your IDE's build/run tool or use Kotlin's command-line compiler to run App.kt

Usage

Running the app presents an interative console:

Choose from the following menu to view portfolio analytics and bond data:

  Main Menu
  ---------
  [1] Portfolio Stats
  [2] Distributions
    [a] Sector
    [b] Maturity
    [c] Credit
  [3] Detailed Bond Listings
    [a] Sector
    [b] Maturity
    [c] Credit

>> 1
┌─────────────────────────────────┐
│      Portfolio Statistics       │
│          As of 12/31/18         │
├────────────────┬────────────────┤
│ Par            │ 172,175,288.50 │
├────────────────┼────────────────┤
│ Market Value   │ 172,463,172.88 │
├────────────────┼────────────────┤
│ Amortized Cost │ 173,172,162.34 │
├────────────────┼────────────────┤
│ Original Cost  │ 175,780,852.49 │
├────────────────┼────────────────┤
│ Accrued        │ 750,033.51     │
│ Interest       │                │
├────────────────┼────────────────┤
│ Yield At Cost  │ 1.55%          │
├────────────────┼────────────────┤
│ Average        │ 2.81 Years     │
│ Maturity       │                │
└────────────────┴────────────────┘

>> 2c
┌─────────────────────────────────┐
│       Credit Distribution       │
│    Ratings by Standard & Poors  │
├────────────────┬────────────────┤
│ AAA            │ 6.9%           │
├────────────────┼────────────────┤
│ AA+            │ 59.3%          │
├────────────────┼────────────────┤
│ AA             │ 0.2%           │
├────────────────┼────────────────┤
│ AA-            │ 5.7%           │
├────────────────┼────────────────┤
│ A+             │ 13.3%          │
├────────────────┼────────────────┤
│ A              │ 5.8%           │
├────────────────┼────────────────┤
│ A-             │ 3.9%           │
├────────────────┼────────────────┤
│ BBB+           │ 1.5%           │
├────────────────┼────────────────┤
│ A-1+           │ 2.0%           │
├────────────────┼────────────────┤
│ NR             │ 1.5%           │
└────────────────┴────────────────┘

accrual's People

Contributors

vxio avatar

Watchers

 avatar  avatar

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.