Documentation
¶
Overview ¶
Package statement parses stock gain/loss statements as issued by MSSB.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Entry ¶
type Entry struct { Index int // batch index Acquired time.Time // when the shares were issued Plan string // under what plan Available int // how many shares are available Via string // how they were received IssuePrice currency.Value // price per share at issue Price currency.Value // value per share currently (estimated) Gain currency.Value // capital gain/loss per share (via estimated value) }
An Entry represents a group of shares acquired at a particular time.
func ParseCSV ¶
ParseCSV extracts the gain/loss entries from the statement in data, returning those matched by the options (or all if opts == nil).
The input data are expected to have a header row containing the standard fields of the MSSB gain/loss report:
Acquired Date: date as mm/dd/yyyy Plan Name: string Acquired Price: price as $ddd.cc Acquired Via: string Shares Available for Sale: integer Current Market Value: price as $ddd.cc Unrealized Total Gain/Loss: price as $ddd.cc (possibly negative)
Click to show internal directories.
Click to hide internal directories.