Skip to content

ketralnis/tinystocks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

Make a ~/.stocks as CSV with columns

    symbol,num_shares,purchase_price

For example:

    ibm,50,47.06
    aapl,2,5.00
    vti,10.5,50.00
    # bought a second round for cheaper
    vti,20,45.00
    cash,123.45,1
    # brokerage transaction fees
    fee,4,9.99

And run like:

    ./tinystocks.py

Output will look like

    symbol  count  curprice   curvalue  purchaseprice    today  today%  gaintoday  totalgainper  totalgain  totalgain%
      AAPL      2   $448.85    $897.70         $10.00  -$11.14  -2.42%    -$22.28       $443.85    $887.70    8877.00%
      CASH    123     $1.00    $123.45        $123.45    $0.00   0.00%      $0.00         $0.00      $0.00       0.00%
       FEE      4     $0.00      $0.00         $39.96    $0.00   0.00%      $0.00        -$9.99    -$39.96    -100.00%
       IBM     50   $199.31  $9,965.50      $2,353.00   -$1.01  -0.50%    -$50.50       $152.25  $7,612.50     323.52%
       VTI     30    $78.09  $2,381.75      $1,425.00   -$1.05  -1.33%    -$32.02        $31.37    $956.75      67.14%
    Portfolio value:       $13,368.40
    Total purchase price:   $3,951.41
    Total gain today:	     -$104.81 (-0.778%)
    Total portfolio gain:   $9,416.99 (238.320%)

About

Track a small stock portfolio's value simply

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages