Skip to content

🤑 A free, fast, in-browser stock portfolio tracker

License

Notifications You must be signed in to change notification settings

ssorallen/finance

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Finance!

A fast, free, in-browser stock portfolio manager that you can deploy anywhere. You can use the version deployed at https://ssorallen.github.io/finance/ or deploy your own.

Getting Started

  1. Create an IEX Cloud account if you don't already have one
  2. Create an IEX API Token on the API Tokens section of the console
  3. Copy the "publishable" token from the API Token console page
  4. Open "Settings" in the upper right of your Finance! instance
  5. Past the "publishable" API token and click "Save"
  6. Start creating your portfolio!

Importing Your Portfolio

If you have a spreadsheet (.csv) file containting transactions in your portfolio, you can import the entire file at once in Finance!.

  1. Click the "Import Portfolio" link in the upper right-ish area of any page
  2. Select your portfolio file
    • If you're importing a Google Finance portfolio the file is potentially called "My Portfolio.csv" since that was the default. Otherwise the filename will be whatever your portfolio was called in Google Finance.
  3. Click "Open"
  4. 🎉🎉🎉

Data Format

Your portfolio CSV file is expected to have the following columns:

Symbol,Name,Type,Date,Shares,Price,'Cash value',Commission,Notes

the values should be of the following types:

{
  'Cash value': ?number,
  Commission: number,
  Date: ?string,
  Name: ?string,
  Notes: ?string,
  Price: number,
  Shares: number,
  Symbol: string,
  Type: 'Buy' | 'Sell',
}

Other formats are currently not supported, and Finance! might fall apart if you try to use another format.

Google Finance Portfolios

If you exported your Google Finance portfolio to a spreadsheet (.csv) file before the site shut down, you can easily import that file into Finance! The data format is fully supported, so jump up to Importing Your Portfolio and follow the steps.

Exporting your portfolio

  1. Click the "Download to spreadsheet" button in the upper right-ish area of any page.
  2. The file will be called "My Portfolio.csv" and be in the data format described in the Importing Your Portfolio section.

Data Privacy

Finance! doesn't collect or store any of your data. Actually, Finance! has no server of any kind, the entire app runs inside your browser.

What does Finance! do with my transaction data?

Your IEX API key, transaction data, and which symbols you're watching are stored entirely in your browser (using local storage). Transaction data is never sent anywhere; it never leaves your computer.

What data of mine does leave my computer?

In order to see the value of your portfolio, a list of the symbols in your portfolio is sent to IEX to get the latest quotes for each symbol. None of your transaction data is sent to IEX or to anyone else, only a list of the symbols leaves your computer.

For example, if your portfolio looked like the following:

{
  transactions: [
    {symbol: 'GM', price: 100, shares: 100},
    {symbol: 'GM', price: 150, shares: 100},
    {symbol: 'F', price: 50, shares: 100},
    {symbol: 'F', price: 100, shares: 1000},
  ]
}

the following data would be sent to IEX:

// Note: your publishable IEX API key is necessarily used in every API request to IEX
PUBLISHABLE_IEX_API_KEY
['F', 'GM']

That's it. There's no tracking, no advertisements, and no other API requests.

Stock Data

All stock data is provided for free by IEX. Use is subject to IEX Exhibit A.

How do I track market indices?

The IEX API currently does not provide market index data. For more information, check out IEX-API Issue #36.

The best replacement is ETFs that track associated indices like SPY for the S&P500 and DIA for the Dow Jones Industrial Average (DJIA).

How to Build

  1. Clone this repository

  2. Use Yarn to install dependencies

    $ yarn install
    
  3. (Optional) To develop and make changes, use start

    $ yarn start
    
  4. Build the app for deployment

    $ yarn build
    

Deploy Your Own

All the code necessary to run Finance! is in this repository. There's no database required, no other application server. Once you build the app, you can copy the static files to any webserver you like.

Using GitHub Pages

If you want to do this all on GitHub and deploy with GitHub Pages, follow these steps:

  1. Fork this repo with the "Fork" button in the upper right

  2. Clone your new repo to your computer

  3. Change the "homepage" in package.json to your site's new home, https://YOURNAME.github.io/finance/

  4. Build the app for release using the How to Build instructions

  5. Using the gh-pages package that's already installed, deploy to your very own page

    $ yarn deploy
    
  6. ✨✨ Your version of Finance! will be available at https://YOURNAME.github.io/finance/ ✨✨

Inspiration

As an unsophisticated investor, I liked Google Finance and missed the simple interface for managing a stock portfolio. Alternatives offer more than I need, so I built only the functionality I wanted.

The idea to run this all in a browser was sparked by seeing Todd Schneider's toddwschneider/stocks project.