Giter VIP home page Giter VIP logo

ttitcombe / casset Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 137 KB

Casset (C++ Asset management) allows the tracking, comparison, and analysis of a portfolio of stocks. This is a mini project designed to practice project management and using various technologies, such as CMake, Conan, catch2 (unit testing), CI, and more.

License: BSD 2-Clause "Simplified" License

CMake 54.88% Dockerfile 3.92% Shell 3.11% C++ 31.39% Python 6.70%

casset's People

Contributors

matthew-d-jones avatar ttitcombe avatar

Watchers

 avatar  avatar

casset's Issues

Select between different portfolios

As a user, I want to be able to easily switch between my saved portfolios

Acceptance criteria:

  • The gui should have a switchbox populated with the names of portfolios in the database
  • Selecting a portfolio in the switchbox will load the portfolio to the table

Update License

The current license was provided as part of the simple cpp project boilerplate upon which this project was started.
The correct license for this project should be chosen

Portfolio information should be displayed in a table

As a user, I want a structured, scalable way to display my portfolio. The stocks contained in a portfolio should be displayed in a table

Acceptance criteria:

  • The portfolio is displayed in a table, with one row for each stock
  • Each row should have the columns: stock name, number of shares, total value
  • Up to 5 stocks should be displayed at any one time
  • If more than 5 stocks are present, the table should have a scroll bar to show the remaining entries
  • The portfolio name and total value should always be displayed

Points: 8

Portfolio should have an editable name

As a user, I want to be able to set the name of my portfolio so I can remember its contents easier

Acceptance criteria:

  • On the portfolio gui tab, you should be able to edit the portfolio name displayed

Points: 1

Use spdlog and CLI11

spdlog logging library and CLI11 command line interface library are very useful tools to know about. Both have conan packages:
CLI11/1.7.1@cliutils/stable (remote: https://api.bintray.com/conan/cliutils/CLI11)
spdlog/1.3.1@bincrafters/stable

Form a portfolio from a user selected group of stocks

As a user, I must be able to select multiple stocks, associated with a number of shares. I should be able to see the value of this portfolio.

Acceptance criteria:

  • The gui should display current stocks in the portfolio, the number of shares for the stock, and the total value of the portfolio in dollars
  • The gui should have a button for adding and removing stocks from a portfolio
  • You should be able to add or remove shares from a stock in the portfolio without removing it from the portfolio
  • The number of shares should be validated to ensure it is a positive integer which is less than total number of shares available for the company

Points: 5

Add time to portfolios

As a user, I want my portfolios to evolve over time. E.g. I should be able to by 10 shares of Apple on Monday, sell 3 on Tuesday, and buy 4 on Wednesday.

Acceptance criteria:

  • The gui should allow a user to enter a stock, number of shares, and the date of the transaction.
    • Adding/removing shares for a certain company on multiple days will add multiple entries to the csv.
    • If no date is selected, it should be assumed to be the current day.
    • Entering the date of a current entry will amend that position. E.g. If you buy 5 shares and sell 3 on one day, the entry for that day will just be +2 shares
  • The gui should display only currently held positions.
  • A user should not be able to sell more shares than they currently have (shorting not supported at this point)

Points: 5

Only build travis on PRs

Currently Travis will build each commit twice: once for branch, and once for the PR. Currently we only want to build once

Add a UI which displays current apple stock price

As a user, I want to click a button on a gui to display recent price information about Apple.

Acceptance criteria:

  • Running Casset should open a gui
  • This gui should contain a button
  • When clicked, recent information about Apple stock should be displayed on the gui. This should include:
    • Date of information
    • Close price

Points: 3

Add CI

Add CI build and run tests with Travis

Stock parser can't distinguish between timeout and no stock

If you search for a valid stock symbol with a slow internet connection, you will receive a timeout. Currently, the presenter interprets this to mean the stock was not found and displays a message to tell you so.
A check should be made for timeouts, and a relevant message should be displayed if that is the case

Clean User input

Currently, user input of ticker symbols must be in upper case.
Casset should automatically make the symbol uppercase

Portfolio handling should be separate from checking stock information

As a user I want clear divisions between the different functions of the app. Therefore, portfolio handling should be on a separate tab of the gui to the button/line edit where you can grab the latest information on a particular stock.

Acceptance criteria

  • The gui has a main tab, which contains stock information functionality
  • The gui contains a second tab, which contains portfolio information functionality

Points: 2

Begin Unit testing

Get unit testing in place for Casset.
We will use catch2 for testing and Trompeloeil for mocking, where necessary

Allow saving of portfolios

As a user, I want to be able to save portfolios I have created

Acceptance criteria:

  • The gui contains a button to save the current portfolio. This will create a database table with the name of the portfolio

Points: 5

Unclear handling of empty api responses

When an API call comes back with an error, the check for an error code currently takes place at IEX::getParsedJson. If the reponse code is not 200, the returned object is an empty json.
Casset then tries to turn this (empty) json into a string, which throws nlohhman:detail:type_error exception.

The status of the reponse must be checked in the presenter as well, before attempting to convert to a string

Windows build unstable

Windows builds of Casset using VisualStudio have errors caused by current Conan set-up.
conanfile needs to be changed and docs updated to describe how to get the build to work on windows

Basic Portfolio Management

Allow the user to add and remove stocks to a portfolio. They should be able to specify when this event occurred, which stock was involved, and how much (either price or number of shares)

Allow loading of portfolios

As a user, I want to be able to load a saved portfolio

Acceptance criteria:

  • The gui should have a button to load a portfolio
  • When clicked, you can select which portfolio from those saved in the database
  • Selecting a portfolio will populate the portfolio table
  • You cannot attempt to load the same portfolio as you are currently viewing
  • If you attempt to load a new portfolio while editing a different portfolio, you will be prompted if you want to save changes before loading

Allow user to configure which stock is displayed

As a user, I want to be able to choose which stock Casset displays information about.

Acceptance criteria:

  • The gui should contain an editable toolbar into which a user can enter a stock symbol (e.g. "AAPL" for Apple)
  • When the stock button is clicked, recent information about the stock is displayed on the gui. This should include:
    • The stock symbol for which the information relates
    • The date of the information
    • The close price
  • The user-entered symbols should be case-insensitive. E.g. "aapl" and "AAPL" should both return information on Apple
  • A clear message should displayed if the stock symbol cannot be found
  • A clear message should be displayed if GET requests cannot be made
  • Users should be able to continue using the application after successful and unsuccessful requests for information

Points: 3

Create Basic GUI

Add a QT GUI that will allow a user to select and manage portfolios, plots etc.

Create requirements doc

Create a document outlining the necessary requirements of Casset functionality, and additional functionality.

Unit test IEX class

Unit test the functionality in the IEX class. We should mock out calls to the API, but test that 1. we can find a valid ticker in a json containing ticker information 2. We can extract valid data from the full stock information json

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.